|
18 | 18 | import com.robertx22.mine_and_slash.gui.screens.skill_tree.buttons.PerkConnectionRender; |
19 | 19 | import com.robertx22.mine_and_slash.gui.screens.skill_tree.buttons.PerkPointPair; |
20 | 20 | import com.robertx22.mine_and_slash.gui.screens.skill_tree.buttons.PerkScreenContext; |
| 21 | +import com.robertx22.mine_and_slash.gui.screens.skill_tree.component.TipsWidget; |
21 | 22 | import com.robertx22.mine_and_slash.mmorpg.MMORPG; |
22 | 23 | import com.robertx22.mine_and_slash.mmorpg.SlashRef; |
23 | 24 | import com.robertx22.mine_and_slash.saveclasses.PointData; |
@@ -49,6 +50,7 @@ public abstract class SkillTreeScreen extends BaseScreen implements INamedScreen |
49 | 50 |
|
50 | 51 | static ResourceLocation CON = SlashRef.id("textures/gui/skill_tree/skill_connection.png"); |
51 | 52 | public VertexContainer vertexContainer = new VertexContainer(); |
| 53 | + private TipsWidget tips; |
52 | 54 |
|
53 | 55 |
|
54 | 56 | private void renderConnection(GuiGraphics graphics, PerkConnectionRender renderer) { |
@@ -237,7 +239,8 @@ protected void init() { |
237 | 239 | this.school = ExileDB.TalentTrees().getFilterWrapped(x -> x.getSchool_type().equals(this.schoolType)).list.get(0); |
238 | 240 |
|
239 | 241 | refreshButtons(); |
240 | | - |
| 242 | + this.tips = new TipsWidget(0, 0, 10, 10, Gui.TALENT_SCREEN_SEARCH_TIPS.locName(Gui.TALENT_SCREEN_SEARCH_KEYWORD_ALL.locName().withStyle(ChatFormatting.GOLD), Gui.TALENT_SCREEN_SEARCH_KEYWORD_GAME_CHANGER.locName().withStyle(ChatFormatting.GOLD))); |
| 243 | + addWidget(tips); |
241 | 244 |
|
242 | 245 | goToCenter(); |
243 | 246 | } catch (Exception e) { |
@@ -439,6 +442,7 @@ public void render(GuiGraphics gui, int x, int y, float ticks) { |
439 | 442 | renderBackgroundDirt(gui, this, 0); |
440 | 443 | zoom = Mth.lerp(ClientConfigs.getConfig().SKILL_TREE_ZOOM_SPEED.get().floatValue(), zoom, targetZoom); |
441 | 444 | renderPanels(gui); |
| 445 | + tips.render(gui, x, y, ticks); |
442 | 446 | gui.pose().scale(zoom, zoom, zoom); |
443 | 447 |
|
444 | 448 | try { |
@@ -548,6 +552,9 @@ private void renderPanels(GuiGraphics gui) { |
548 | 552 | SkillTreeScreen.SEARCH.setY(yx); |
549 | 553 | SkillTreeScreen.SEARCH.render(gui, 0, 0, 0); |
550 | 554 |
|
| 555 | + tips.setX(tx + SkillTreeScreen.SEARCH.getWidth() - tips.getWidth() - 2); |
| 556 | + tips.setY(yx + (SkillTreeScreen.SEARCH.getHeight() - tips.getHeight()) / 2); |
| 557 | + |
551 | 558 |
|
552 | 559 | if (MMORPG.RUN_DEV_TOOLS) { |
553 | 560 | MutableComponent debug = Component.literal("Widgets: " + this.children().size() + " - " + msstring); |
|
0 commit comments