-
-
Notifications
You must be signed in to change notification settings - Fork 31
Feature/1.20.x/UI Overhaul #219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
leafreynolds
merged 57 commits into
develop
from
feature/1.20.x/UIOverhaul2ElectricBoogaloo
May 2, 2026
Merged
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
9d6a8d5
[Cosmere] Stripped SpiritwebMenu bare
Gerbagel 100e7e5
[Cosmere] Added Submenu registry and render calls
Gerbagel 9b5435e
[Cosmere] Minor changes to TabButton layout, background, and highligh…
Gerbagel cedc5bb
[Cosmere] Render internal and external circle segments
Gerbagel efaf5a3
[Cosmere] Pass through mouseClicked to subscreens
Gerbagel f55c1e1
[Cosmere] Colors for mode, hover, and unavailable
Gerbagel fe8f3e1
[Allomancy] Proper metal ordering in menu
Gerbagel 12d0b9c
[Allomancy] Finetuning menu dimensions
Gerbagel af6520a
[Allomancy] Add hover text to buttons
Gerbagel a49b28b
[Allomancy] Added metal stores hover text
Gerbagel e7bd6fb
[Allomancy] Render to info to block instead of hover text
Gerbagel 69bc6de
[Allomancy] Display metal stores as hours, minutes, and seconds
Gerbagel b2438d3
[Cosmere] Clear the infoText array (oops)
Gerbagel f317eaa
[Cosmere] Add backup if no tab background found
Gerbagel 3d0beb6
[Sandmastery] Added sandmastery spiritweb menu (empty)
Gerbagel 2c369d0
[Allomancy] Added metal ingestion limit
Gerbagel 1620eba
[Cosmere] Redesigned active power HUD and how it's populated
Gerbagel 5e383e8
[Cosmere] Added color tint to hud for burning/flaring
Gerbagel bb29e3f
[Cosmere] Refactored how info texts are retrieved
Gerbagel fc9d4e2
[Allomancy] Pixelated power circle and coloured icons
Gerbagel b266b99
[Allomancy] Render ring segments instead of slices
Gerbagel 29decba
[Feruchemy] Make the entire menu lol
Gerbagel 006d4dd
[Feruchemy] Better border
Gerbagel 5aee90c
[Cosmere] Changed font size so it doesn't extend out of the box
Gerbagel 068e715
[Cosmere] Open currently selected manifestation's page instead of alw…
Gerbagel bfd5140
[Feruchemy] Added info texts for submenu and charge to HUD
Gerbagel b52951e
[Feruchemy] Add rendering of usage to HUD
Gerbagel 3f2dcd0
[Allomancy] Added border to allomancy wheel
Gerbagel 81a10ca
[Sandmastery] Sandmastery menu
Gerbagel c31f06c
[Surgebinding] Added entire menu
Gerbagel ecb9199
[Sandmastery] Added hover text
Gerbagel 3122c07
[Cosmere] Missing imports after cherrypick
Gerbagel 0c73c07
[Cosmere] Finishing touches before PR
Gerbagel 0d41d57
[Feruchemy] Handle nicrosil menu
Gerbagel a31cc71
[Cosmere] Fixed click detection bug
Gerbagel d9ef84d
[Cosmere] Add client-only guard for menu registration
Gerbagel 7bab14a
[Cosmere] Fixed a bug where creating a new SpiritwebCap (changing wor…
Gerbagel 4909cf1
[Feruchemy] Renamed DiamondButton to TriangleButton
Gerbagel 77e9bf8
[Feruchemy] Refactored mutex lock code
Gerbagel 66c7dcb
[Cosmere] Cached vertexes instead of calculating every frame
Gerbagel 758c70d
[Cosmere] Don't get static resources every frame
Gerbagel 72b28a6
[Cosmere] Added callback for selected manifestation
Gerbagel 6b061c3
[Cosmere] Added some missing translation strings
Gerbagel a828f3e
[Cosmere] Custom mixin json management
Gerbagel 9cf1c98
Merge branch 'develop' into feature/1.20.x/UIOverhaul2ElectricBoogaloo
Gerbagel 670e6d5
[Cosmere] Claude's nit-pick commit
Gerbagel 5a9fc90
Merge branch 'feature/1.20.x/UIOverhaul2ElectricBoogaloo' of github.c…
Gerbagel c8feccc
[Cosmere] Reimplement optional HUD config
Gerbagel 125cfaa
[Cosmere] Remove leftovers
Gerbagel 6e071d3
[Cosmere] De-green the background color
Gerbagel 2bb8b0d
[Allomancy] Added Atium button
Gerbagel 4bf112a
[Feruchemy] Added atium button
Gerbagel 46d5e2d
Revert "[Cosmere] Custom mixin json management"
Gerbagel 9b2a0bb
[Cosmere] Adjust size of info blocks and add more to GuiUtils
Gerbagel 0c31fef
[Cosmere] Final UI touches
Gerbagel ffba77a
[Cosmere] Do not render HUD if no power selected
Gerbagel 370e4ab
[Cosmere] Only add spiritweb submenus if powers are present
Gerbagel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
106 changes: 106 additions & 0 deletions
106
src/allomancy/java/leaf/cosmere/allomancy/client/gui/AllomancySpiritwebMenu.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| package leaf.cosmere.allomancy.client.gui; | ||
|
|
||
| import com.mojang.blaze3d.systems.RenderSystem; | ||
| import leaf.cosmere.allomancy.common.Allomancy; | ||
| import leaf.cosmere.api.Metals; | ||
| import leaf.cosmere.client.gui.CosmereScreen; | ||
| import leaf.cosmere.client.gui.SpiritwebMenu; | ||
| import leaf.cosmere.common.cap.entity.SpiritwebCapability; | ||
| import net.minecraft.client.Minecraft; | ||
| import net.minecraft.client.gui.GuiGraphics; | ||
| import net.minecraft.client.player.LocalPlayer; | ||
| import net.minecraft.network.chat.Component; | ||
| import net.minecraft.resources.ResourceLocation; | ||
| import org.lwjgl.opengl.GL11; | ||
|
|
||
| public class AllomancySpiritwebMenu extends CosmereScreen | ||
| { | ||
| private static final ResourceLocation BORDER_LOCATION = new ResourceLocation(Allomancy.MODID, "textures/gui/allo_border.png"); | ||
| LocalPlayer player; | ||
| public AllomancySpiritwebMenu() | ||
| { | ||
| super(Component.literal("Allomancy"), SpiritwebMenu::selectManiCallback); | ||
| player = Minecraft.getInstance().player; | ||
| } | ||
|
|
||
| @Override | ||
| protected void init() | ||
| { | ||
| super.init(); | ||
|
|
||
| SpiritwebCapability.get(player).ifPresent( (iSpiritweb -> { | ||
| int circleCenterX = width/2; | ||
| int circleCenterY = height/2 + height/16; // heh, 16, nice | ||
|
|
||
| // Steel | ||
| addRenderableWidget(new OuterRadialButton(circleCenterX, circleCenterY, 4, Metals.MetalType.STEEL, iSpiritweb, manifestationConsumer)); | ||
| // Iron | ||
| addRenderableWidget(new OuterRadialButton(circleCenterX, circleCenterY, 5, Metals.MetalType.IRON, iSpiritweb, manifestationConsumer)); | ||
| // Zinc | ||
| addRenderableWidget(new OuterRadialButton(circleCenterX, circleCenterY, 6, Metals.MetalType.ZINC, iSpiritweb, manifestationConsumer)); | ||
| // Brass | ||
| addRenderableWidget(new OuterRadialButton(circleCenterX, circleCenterY, 7, Metals.MetalType.BRASS, iSpiritweb, manifestationConsumer)); | ||
| // Bendalloy | ||
| addRenderableWidget(new OuterRadialButton(circleCenterX, circleCenterY, 0, Metals.MetalType.BENDALLOY, iSpiritweb, manifestationConsumer)); | ||
| // Cadmium | ||
| addRenderableWidget(new OuterRadialButton(circleCenterX, circleCenterY, 1, Metals.MetalType.CADMIUM, iSpiritweb, manifestationConsumer)); | ||
| // Chromium | ||
| addRenderableWidget(new OuterRadialButton(circleCenterX, circleCenterY, 2, Metals.MetalType.CHROMIUM, iSpiritweb, manifestationConsumer)); | ||
| // Nicrosil | ||
| addRenderableWidget(new OuterRadialButton(circleCenterX, circleCenterY, 3, Metals.MetalType.NICROSIL, iSpiritweb, manifestationConsumer)); | ||
|
|
||
| // Pewter | ||
| addRenderableWidget(new InnerRadialButton(circleCenterX, circleCenterY, 4, Metals.MetalType.PEWTER, iSpiritweb, manifestationConsumer)); | ||
| // Tin | ||
| addRenderableWidget(new InnerRadialButton(circleCenterX, circleCenterY, 5, Metals.MetalType.TIN, iSpiritweb, manifestationConsumer)); | ||
| // Copper | ||
| addRenderableWidget(new InnerRadialButton(circleCenterX, circleCenterY, 6, Metals.MetalType.COPPER, iSpiritweb, manifestationConsumer)); | ||
| // Bronze | ||
| addRenderableWidget(new InnerRadialButton(circleCenterX, circleCenterY, 7, Metals.MetalType.BRONZE, iSpiritweb, manifestationConsumer)); | ||
| // Electrum | ||
| addRenderableWidget(new InnerRadialButton(circleCenterX, circleCenterY, 0, Metals.MetalType.ELECTRUM, iSpiritweb, manifestationConsumer)); | ||
| // Gold | ||
| addRenderableWidget(new InnerRadialButton(circleCenterX, circleCenterY, 1, Metals.MetalType.GOLD, iSpiritweb, manifestationConsumer)); | ||
| // Aluminum | ||
| addRenderableWidget(new InnerRadialButton(circleCenterX, circleCenterY, 2, Metals.MetalType.ALUMINUM, iSpiritweb, manifestationConsumer)); | ||
| // Duralumin | ||
| addRenderableWidget(new InnerRadialButton(circleCenterX, circleCenterY, 3, Metals.MetalType.DURALUMIN, iSpiritweb, manifestationConsumer)); | ||
|
|
||
| // Atium | ||
| addRenderableWidget(new SquareButton(circleCenterX + height/4, circleCenterY + height/3 - height/16, height/8, Metals.MetalType.ATIUM, iSpiritweb, manifestationConsumer)); | ||
| })); | ||
| } | ||
|
|
||
| @Override | ||
| public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) | ||
| { | ||
|
Gerbagel marked this conversation as resolved.
|
||
| super.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); | ||
| renderBorder(pGuiGraphics); | ||
| } | ||
|
|
||
| private void renderBorder(GuiGraphics pGuiGraphics) | ||
| { | ||
| RenderSystem.setShaderTexture(0, BORDER_LOCATION); | ||
| RenderSystem.enableBlend(); | ||
| RenderSystem.blendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0); | ||
|
Gerbagel marked this conversation as resolved.
|
||
| RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f); | ||
|
|
||
| final int diameter = Minecraft.getInstance().getWindow().getGuiScaledHeight() / 3 * 2 + 2; | ||
| final int x = width/2 - diameter/2, y = height/2 - diameter/2 + height/16; | ||
| final int iconSize = 256; | ||
|
|
||
| pGuiGraphics.blit(BORDER_LOCATION, | ||
| x, | ||
| y, | ||
| diameter, | ||
| diameter, | ||
| 0, | ||
| 0, | ||
| iconSize, | ||
| iconSize, | ||
| iconSize, | ||
| iconSize); | ||
|
|
||
| RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f); | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.