Skip to content

Commit

Permalink
fix: misc celestial selection bugs
Browse files Browse the repository at this point in the history
* blend the LHS planet name buttons
* fix alignment of click area to drawn planets
* keep zoom state when selecting sub-planets
* use proper color encoding (ARGB not RGBA)
  • Loading branch information
marcus8448 committed May 26, 2024
1 parent 905f8e0 commit 130c165
Show file tree
Hide file tree
Showing 5 changed files with 348 additions and 410 deletions.
2 changes: 1 addition & 1 deletion src/main/generated/assets/galacticraft/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@
"ui.galacticraft.celestialselection.ss_owner": "Space Station Owner",
"ui.galacticraft.celestialselection.surface_composition": "Surface Composition",
"ui.galacticraft.celestialselection.surface_gravity": "Surface Gravity",
"ui.galacticraft.celestialselection.tier": "Tier",
"ui.galacticraft.celestialselection.tier": "Tier %s",
"ui.galacticraft.color": "Color",
"ui.galacticraft.cone": "Cone",
"ui.galacticraft.engine": "Engine",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

import dev.galacticraft.api.rocket.LaunchStage;
import dev.galacticraft.mod.content.entity.orbital.RocketEntity;
import dev.galacticraft.mod.util.ColorUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.util.FastColor;

public class CountdownOverlay {
public static void renderCountdown(GuiGraphics graphics, float tickDelta) {
Expand All @@ -43,10 +43,10 @@ public static void renderCountdown(GuiGraphics graphics, float tickDelta) {

if (count <= 10) {
graphics.pose().scale(4.0F, 4.0F, 0.0F);
graphics.drawString(mc.font, String.valueOf(count), width / 8 - mc.font.width(String.valueOf(count)) / 2, height / 20, ColorUtil.to32BitColor(255, 255, 0, 0), false);
graphics.drawString(mc.font, String.valueOf(count), width / 8 - mc.font.width(String.valueOf(count)) / 2, height / 20, FastColor.ARGB32.color(255, 255, 0, 0), false);
} else {
graphics.pose().scale(2.0F, 2.0F, 0.0F);
graphics.drawString(mc.font, String.valueOf(count), width / 4 - mc.font.width(String.valueOf(count)) / 2, height / 8, ColorUtil.to32BitColor(255, 255, 0, 0), false);
graphics.drawString(mc.font, String.valueOf(count), width / 4 - mc.font.width(String.valueOf(count)) / 2, height / 8, FastColor.ARGB32.color(255, 255, 0, 0), false);
}

graphics.pose().popPose();
Expand Down
Loading

0 comments on commit 130c165

Please sign in to comment.