https://github.com/tttsaurus/ingame-info-reborn
Inspired by InGame-Info-XML and it's bringing more modular controls and layouts to hud and also mvvm architecture
https://github.com/tttsaurus/ingame-info-reborn
crafttweaker forge ingameinfo minecraft minecraft-mod minecraft112
Last synced: 10 months ago
JSON representation
Inspired by InGame-Info-XML and it's bringing more modular controls and layouts to hud and also mvvm architecture
- Host: GitHub
- URL: https://github.com/tttsaurus/ingame-info-reborn
- Owner: tttsaurus
- License: mit
- Created: 2024-11-22T06:34:36.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-19T16:33:38.000Z (over 1 year ago)
- Last Synced: 2025-01-19T17:38:01.472Z (over 1 year ago)
- Topics: crafttweaker, forge, ingameinfo, minecraft, minecraft-mod, minecraft112
- Language: Java
- Homepage: https://www.curseforge.com/minecraft/mc-mods/ingame-info-reborn
- Size: 344 KB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
InGame Info Reborn
"In-game HUDs and GUIs done with structure — reactive, declarative, composable, and built to handle the rest."
[](https://www.curseforge.com/minecraft/mc-mods/ingame-info-reborn)
[](https://www.curseforge.com/minecraft/mc-mods/ingame-info-reborn)
[](https://modrinth.com/mod/ingame-info-reborn)
[](https://www.codefactor.io/repository/github/tttsaurus/ingame-info-reborn)
[](https://app.codacy.com/gh/tttsaurus/Ingame-Info-Reborn/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
This is a _Work-In-Progress_ spiritual successor of [InGame-Info-XML](https://github.com/Lunatrius/InGame-Info-XML), **not a fork**.
If you like this project, don't forget to give it a star⭐!
Suggestions/PRs are welcome
## Overview
This is a library mod that helps you to create in-game overlaid (or focused) GUI with ease.

(Nothing will pop up with the default configuration!)
### Architectural Modules Chart
Click to Expand
| Module | Role | Status |
|------------------------------------------|------------------------------------------------------------------|----------------|
| **MVVM Base** | Separates logic (ViewModel) from rendering (View) | ✅ Done |
| **XAML-Style DSL For View** | Declarative XAML-style layout to build static UI trees | ✅ Done |
| **Reactive Binding** | View reacts to changes in ViewModel automatically | ✅ Done |
| **Compose (Injected via Slot)** | Immediate-mode UI embedded in ViewModel | ⚠️ Partially |
| **Snapshot Diffing** | Virtual tree diffing for Compose-based UI | ✅ Done |
| **Shared Context** | Shared runtime context between ViewModel and Compose blocks | ✅ Done |
| **DOM-Like Event System** | Input propagation and event capturing/bubbling | ✅ Done |
| **Interactable Control** | Captures input, intercepts propagation (works with Event System) | ✅ Done |
| **Fixed / Render Update** | Dual update loop for logic vs render | ✅ Done |
| **Annotation Driven Auto-Interpolation** | Utility for smooth interpolation during render updates | ✅ Done |
| **Render Op Queue** | Abstract draw commands for controls | ✅ Done |
| **UI Decoration** | Draw custom visuals on existing controls | ✅ Mostly Done |
| **Transition API** | Externally trigger view transitions | 🚧 Planned |
| **Theme Manager** | Global theme system (colors, font scale, etc) | ✅ Mostly Done |
| **Modal Layer** | Stack-based modal / dialog system | 🚧 Planned |
### Example
```xml
...
```
```java
// snippet from View and ViewModel classes
@Reactive(targetUid = "fps", property = "text", initiativeSync = true)
public ReactiveObject fpsText = new ReactiveObject<>(){};
EventCenter.gameFpsEvent.addListener((fps) ->
{
fpsText.set("FPS: " + fps);
});
```
```java
// registration entry point
@SubscribeEvent
public static void onIgiRuntimeEntryPoint(IgiRuntimeEntryPointEvent event)
{
event.runtime.initPhase
.registerMvvm("example", ExampleViewModel.class)
.openGuiOnStartup("example");
}
```
## Wiki
- [WIP Wiki](https://tttsaurus.github.io/Ingame-Info-Reborn-Wiki/)
## Implementation Todo List / Overview
Click to Expand
_**Currently working on the architecture.**_
_**Not adding controls or QoL updates.**_
My Detailed Todo List:
- https://trello.com/b/MTLHeyGn/ingameinfo
Implementation Overview:
- Add framebuffer to the GUI rendering life cycle (✔)
- Introduce a custom GUI container (✔)
- Maintain a list of GUI containers so that GUIs can stack together (✔)
- A GUI container can be ingame-overlaid/focused (runtime switchable) (✔)
- Introduce feature-rich GUI layout
- Pivot (✔)
- Alignment (✔)
- Padding (✔)
- Horizontal Group (stack elements horizontally) (✔)
- Vertical Group (stack elements vertically) (✔)
- Sized Group (✔)
- Nesting Groups (group in group) (✔)
- Adaptive Group (fit elements into it adaptively)
- Foldout Group
- Draggable Group
- Add controls like text, button, input field, etc.
- Text (✔)
- Sliding Text (✔)
- Anim Text (✔)
- Button (✔)
- Checkbox
- Input Field
- Image (✔)
- Url Image (✔)
- GIF
- Slide Bar
- Progress Bar (✔)
- Item (✔)
- Add CrT/Zenscript support (✔)
- Ingame spotify support (go to wiki for details) (✔)
## Latest Build
In case you want to use the latest action build
- Go to [GitHub Actions](https://github.com/tttsaurus/Ingame-Info-Reborn/actions)
- Click on the latest workflow
- Scroll down to the bottom and download the `Artifacts`
- Unzip and `ingameinfo-[version].jar` is the mod file
## Credits
- Created using [GregTechCEu's Buildscripts](https://github.com/GregTechCEu/Buildscripts)
- Inspired by [InGame-Info-XML](https://github.com/Lunatrius/InGame-Info-XML)
- Bundled [Configurate](https://github.com/SpongePowered/Configurate) licensed under Apache-2.0