-
Notifications
You must be signed in to change notification settings - Fork 0
26.2 HUD and Diagnostics
Rifa edited this page Aug 21, 2026
·
1 revision
| Parameter | Specification |
|---|---|
| Graphics Extraction Engine | net.minecraft.client.gui.GuiGraphicsExtractor |
| Target Screen Context | net.minecraft.client.gui.screens.worldselection.AbstractGameRulesScreen |
| Hover Text Tint |
0xFFFFFFAA (Soft Yellow Highlight) |
| Default Text Tint |
0xFFFFFFFF (Crisp White) |
| Header Hover Box |
0x22FFFFFF (Subtle Alpha Overlay) |
| Category Separator Line |
0x44AAAAAA (Horizontal Border) |
| Toggle Active Color |
0x4400FF00 (Emerald Green) |
| Toggle Inactive Color |
0x44FF0000 (Ruby Red) |
| Accessibility Narration |
NarratedElementType.TITLE (NarrationPriority.HOVERED) |
Minecraft 26.2 introduced major refactors to the client rendering pipeline, migrating standard GUI drawing operations to the modern GuiGraphicsExtractor subsystem.
Collapsible Game Rules is built natively for this rendering engine, utilizing direct vector color fills, font metrics centering, and accessibility narration output with zero frame-rate overhead.
| Visual Component | Hex ARGB Code | Visual Description | Usage Location |
|---|---|---|---|
| Hover Fill | 0x22FFFFFF |
13% opacity white box overlay. | Category header hover & Global actions hover. |
| Border Divider | 0x44AAAAAA |
27% opacity light gray 1px line. | Bottom edge of category headers and global actions. |
| Hovered Text | 0xFFFFFFAA |
Soft yellow highlighted text. | Category header text & button labels on mouse hover. |
| Standard Text | 0xFFFFFFFF |
100% white text. | Category header title & child count badge. |
| Child Count Badge | ChatFormatting.GRAY |
Vanilla gray text ( (N rules)). |
Suffix appended to category header labels. |
| Toggle Active BG | 0x4400FF00 |
27% opacity emerald green. | Background for โ ON state in BooleanToggleWidget. |
| Toggle Inactive BG | 0x44FF0000 |
27% opacity ruby red. | Background for โ OFF state in BooleanToggleWidget. |
Inside CollapsibleCategoryRuleEntry.extractContent(...):
@Override
public void extractContent(GuiGraphicsExtractor graphics, int mouseX, int mouseY, boolean hovered, float a) {
// 1. Premium Highlight on hover
if (hovered) {
graphics.fill(this.getX() - 2, this.getY(), this.getX() + this.getWidth() + 2, this.getY() + 24, 0x22FFFFFF);
}
// 2. Directional arrow, label, and child count badge
String prefix = this.expanded ? "โผ " : "โถ ";
Component countBadge = Component.literal(" (" + this.childCount + " rules)").withStyle(ChatFormatting.GRAY);
Component display = Component.literal(prefix).append(this.label).append(countBadge);
// 3. Centered text with dynamic hover tint
graphics.centeredText(Minecraft.getInstance().font, display,
this.getContentXMiddle(), this.getContentY() + 5, hovered ? 0xFFFFFFAA : 0xFFFFFFFF);
// 4. Subtle separating line at the bottom
graphics.fill(this.getX() + 10, this.getY() + 23, this.getX() + this.getWidth() - 10, this.getY() + 24, 0x44AAAAAA);
}Whenever players interact with the UI, standard vanilla sounds provide tactile feedback:
-
Event:
SoundEvents.UI_BUTTON_CLICK -
Volume:
1.0F -
Pitch:
1.0F -
Trigger Conditions:
- Mouse left or right click on Category Header.
- Keyboard Space / Enter on Category Header.
- Keyboard Left Arrow (collapse) or Right Arrow (expand).
- Mouse click on
[ Expand All ]or[ Collapse All ].
Collapsible Game Rules โข Built & Maintained by Dasik (Rifaditya)
Released under the GNU General Public License v3.0 (GPL-3.0-or-later)
GitHub Repository โข Modrinth โข CurseForge โข Issue Tracker
๐ Repository Source Disclaimer: The documentation in this Wiki reflects the current source code state in the repository, which may include recent unreleased commits or developmental features ahead of public release builds on CurseForge and Modrinth.
- ๐๏ธ Collapsible Categories
- ๐ Global Actions & Bulk Toggles
- ๐ Smart Search Integration
- โจ๏ธ Keyboard Navigation & Accessibility
- ๐ง State Persistence & JSON Config
- โจ Category Prettification & Naming
- ๐๏ธ Game Rule Presets & Widgets
- ๐ GameRules Reference Table
- ๐ฌ Brigadier Commands & Absence Scope
- ๐ Advancements & Absence Scope
- ๐ฅ๏ธ HUD, Diagnostics & Rendering
- ๐ ๏ธ Developer Setup & Gradle Builds
- ๐งฉ Architecture & Mixin Subsystem
- ๐ DasikLibrary API Integration
Dasik (Rifaditya) | GPLv3