Skip to content

Commit

Permalink
Icon changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Caedis committed Jan 5, 2024
1 parent d8117d8 commit 0d23a66
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

public class PanelButtonQuest extends PanelButtonStorage<Map.Entry<UUID, IQuest>>
{
private static final IGuiTexture PIN_TEX = PresetIcon.ICON_PIN_IN.getTexture();
private static final IGuiTexture PIN_TEX = PresetIcon.ICON_BOOKMARK.getTexture();
public final GuiRectangle rect;
public final EntityPlayer player;
public final IGuiTexture txFrame;
Expand Down Expand Up @@ -94,7 +94,7 @@ public void drawPanel(int mx, int my, float partialTick) {
super.drawPanel(mx, my, partialTick);
if (isBookmarked){
IGuiRect bounds = this.getTransform();
PIN_TEX.drawTexture(bounds.getX(), bounds.getY() - 4, bounds.getWidth()/3, bounds.getHeight()/3, 1, partialTick);
PIN_TEX.drawTexture(bounds.getX(), bounds.getY(), bounds.getWidth()/4, bounds.getHeight()/4, 1, partialTick);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,11 @@ public enum PresetIcon
ICON_ZOOM_IN("icon_zoom_in"),
ICON_ZOOM_OUT("icon_zoom_out"),

ICON_PIN_IN("icon_pin_in"),
ICON_PIN_OUT("icon_pin_out"),
ICON_BOOKMARK("icon_bookmark"),
ICON_QUEST("icon_quest"),

ICON_CHEST("icon_chest"),
ICON_CHEST_ALL("icon_chest_all"),
ICON_BOOKMARK("icon_bookmark"),
ICON_MENU("icon_menu"),

ICON_PATREON("icon_patreon"),
Expand Down Expand Up @@ -195,9 +194,6 @@ public static void registerIcons(IThemeRegistry reg)
reg.setDefaultTexture(ICON_VISIBILITY_IMPLICIT.key, new SimpleTexture(TX_ICONS, new GuiRectangle(208, 80, 16, 16)).maintainAspect(true));
reg.setDefaultTexture(ICON_VISIBILITY_HIDDEN.key, new SimpleTexture(TX_ICONS, new GuiRectangle(224, 80, 16, 16)).maintainAspect(true));

reg.setDefaultTexture(ICON_PIN_IN.key, new SimpleTexture(TX_ICONS, new GuiRectangle(240, 80, 16, 16)).maintainAspect(true));
reg.setDefaultTexture(ICON_PIN_OUT.key, new SimpleTexture(TX_ICONS, new GuiRectangle(0, 96, 16, 16)).maintainAspect(true));

reg.setDefaultTexture(ICON_LOCKED.key, new SimpleTexture(TX_ICONS, new GuiRectangle(80, 48, 16, 16)).maintainAspect(true));
reg.setDefaultTexture(ICON_UNLOCKED.key, new SimpleTexture(TX_ICONS, new GuiRectangle(96, 48, 16, 16)).maintainAspect(true));

Expand All @@ -213,6 +209,7 @@ public static void registerIcons(IThemeRegistry reg)
reg.setDefaultTexture(ICON_CHEST.key, new SimpleTexture(TX_ICONS, new GuiRectangle(160, 64, 16, 16)).maintainAspect(true));
reg.setDefaultTexture(ICON_BOOKMARK.key, new SimpleTexture(TX_ICONS, new GuiRectangle(176, 64, 16, 16)).maintainAspect(true));
reg.setDefaultTexture(ICON_MENU.key, new SimpleTexture(TX_ICONS, new GuiRectangle(192, 64, 16, 16)).maintainAspect(true));
reg.setDefaultTexture(ICON_QUEST.key, new SimpleTexture(TX_ICONS, new GuiRectangle(80, 80, 16, 16)).maintainAspect(true));

reg.setDefaultTexture(ICON_PATREON.key, new SimpleTexture(TX_ICONS, new GuiRectangle(144, 80, 16, 16)).maintainAspect(true));
reg.setDefaultTexture(ICON_TWITCH.key, new SimpleTexture(TX_ICONS, new GuiRectangle(160, 80, 16, 16)).maintainAspect(true));
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/betterquesting/client/gui2/GuiQuestLines.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public void initPanel()

// Pins button
if (this.bookmarksGui == null) this.bookmarksGui = initBookmarksPanel();
PanelButton btnBookmarks = new PanelButton(new GuiTransform(GuiAlign.BOTTOM_LEFT, 8, -56, 32, 16, 0), -1, "").setIcon(PresetIcon.ICON_PIN_OUT.getTexture());
PanelButton btnBookmarks = new PanelButton(new GuiTransform(GuiAlign.BOTTOM_LEFT, 8, -56, 32, 16, 0), -1, "").setIcon(PresetIcon.ICON_BOOKMARK.getTexture());
btnBookmarks.setClickAction((button) -> {
mc.displayGuiScreen(this.bookmarksGui);
});
Expand Down Expand Up @@ -298,11 +298,11 @@ public void initPanel()
// === LEFT SIDEBAR ===
int yOff = 24;
PanelButton btnTrayToggle = new PanelButton(new GuiTransform(GuiAlign.TOP_LEFT, 8, yOff, 32, 16, 0), -1, "");
btnTrayToggle.setIcon(PresetIcon.ICON_BOOKMARK.getTexture(), selectedLineId == null && !chapterTrayOpened ? new GuiColorPulse(0xFFFFFFFF, 0xFF444444, 2F, 0F) : new GuiColorStatic(0xFFFFFFFF), 0);
btnTrayToggle.setIcon(PresetIcon.ICON_QUEST.getTexture(), selectedLineId == null && !chapterTrayOpened ? new GuiColorPulse(0xFFFFFFFF, 0xFF444444, 2F, 0F) : new GuiColorStatic(0xFFFFFFFF), 0);
btnTrayToggle.setClickAction((b) -> {
cvFrame.setTrayState(cvChapterTray.isTrayOpen(), 200);
cvChapterTray.setTrayState(!cvChapterTray.isTrayOpen(), 200);
btnTrayToggle.setIcon(PresetIcon.ICON_BOOKMARK.getTexture());
btnTrayToggle.setIcon(PresetIcon.ICON_QUEST.getTexture());
});
btnTrayToggle.setTooltip(Collections.singletonList(QuestTranslation.translate("betterquesting.title.quest_lines")));
cvBackground.addPanel(btnTrayToggle);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0d23a66

Please sign in to comment.