From 5995e5917879cf4d2b3aa0bc55645776fc98ad99 Mon Sep 17 00:00:00 2001 From: desyncfy Date: Sun, 23 Jun 2024 14:50:20 -0700 Subject: [PATCH] Add image to menu --- .../kotlin/chickenmanfy/scify/Modules/Menu.kt | 16 ++++++++++------ src/main/resources/assets/scify/scify.png | Bin 0 -> 888 bytes 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/assets/scify/scify.png diff --git a/src/client/kotlin/chickenmanfy/scify/Modules/Menu.kt b/src/client/kotlin/chickenmanfy/scify/Modules/Menu.kt index ad9ea81..5bcad7a 100644 --- a/src/client/kotlin/chickenmanfy/scify/Modules/Menu.kt +++ b/src/client/kotlin/chickenmanfy/scify/Modules/Menu.kt @@ -7,6 +7,7 @@ import net.minecraft.client.gui.screen.Screen import net.minecraft.client.gui.tooltip.Tooltip import net.minecraft.client.gui.widget.ButtonWidget import net.minecraft.text.Text +import net.minecraft.util.Identifier @Environment(EnvType.CLIENT) @@ -32,43 +33,46 @@ class Menu : Screen(Text.literal("SciFy Menu")) { 5, 0xff00ff ) + + val texture = Identifier("scify", "scify.png") + context.drawTexture(texture, width / 2 - 32, 20, 0F, 0F, 64, 64, 64, 64); } public override fun init() { dynamicBars = ButtonWidget.builder(Text.literal("Dynamic Health")) { Bars().toggleBars() // Call the function toggleBars() from the bars.kt module } - .dimensions(width / 2 - 205, 20, 200, 20) + .dimensions(width / 2 - 205, 84, 200, 20) .tooltip(Tooltip.of(Text.literal("Health bar similar to XP"))) .build() fishingNotif = ButtonWidget.builder(Text.literal("Fishing Notifications")) { FishingNotif().toggleFishingNotif() // If toggleFishingNotif() is true, run the fishing notification script. } - .dimensions(width / 2 + 5, 20, 200, 20) + .dimensions(width / 2 + 5, 84, 200, 20) .tooltip(Tooltip.of(Text.literal("Fishing Notifications"))) .build() warpHotkeys = ButtonWidget.builder(Text.literal("Toggle hotkeys")) { // I don't think we actually need this module at all. TODO: replace with something else } - .dimensions(width / 2 - 205, 60, 200, 20) + .dimensions(width / 2 - 205, 164, 200, 20) .tooltip(Tooltip.of(Text.literal("Enable/Disable hotkeys."))) .build() autoWelcome = ButtonWidget.builder(Text.literal("Auto-Welcome")) { AutoWelcome().toggleAutoWelcome() // Call the function toggleAutoWelcome() from the fishingnotif.kt module } - .dimensions(width / 2 - 205, 60, 200, 20) + .dimensions(width / 2 - 205, 124, 200, 20) .tooltip(Tooltip.of(Text.literal("Automatically welcomes new players."))) .build() livelyMode = ButtonWidget.builder(Text.literal("City NPCs (Lively Mode)")) { FishingNotif().toggleFishingNotif() // Call the function toggleFishingNotif() from the fishingnotif.kt module } - .dimensions(width / 2 - 205, 100, 200, 20) + .dimensions(width / 2 - 205, 164, 200, 20) .tooltip(Tooltip.of(Text.literal("Replaces Villagers with player NPCs"))) .build() resourcePack = ButtonWidget.builder(Text.literal("Toggle Resource Pack")) { // TODO: Implement Resource pack } - .dimensions(width / 2 + 5, 60, 200, 20) + .dimensions(width / 2 + 5, 124, 200, 20) .tooltip(Tooltip.of(Text.literal("Toggles the community resource pack."))) .build() diff --git a/src/main/resources/assets/scify/scify.png b/src/main/resources/assets/scify/scify.png new file mode 100644 index 0000000000000000000000000000000000000000..2f1514f2c9912973d568bd8559ff2a42ef7a59e2 GIT binary patch literal 888 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSjKx9jP7LeL$-HD>U^en}aSW-L z^Y*TxpR}V$d!coo%PJM2cauyyjM6>kMh6rzO{isx-p8oAeZe`&pr}kIE2Y+ug${m# zoSE}3>Iv_;H}mhlc=H=^`Y+ahPdm0d&F0a~mXAB8Z`L@{z0cp_uMtB58$;iP|C8qZ z|NOV`(}Ra!t?cH1Ft1EtZ7>E&<#qgBxAFP?x${&WH+P>-@tG|g!T5lOVGd(M_08{` zC2Q9{zZ?k_kUk`}z3}e;80Y)q8<-AAGFUJ(q%%O&0*x|VmuVgQeY@nXeGQ@v=NN$U zJEVSx8?oQ0soZ!+Pg{S(Mrf0;cDYQ?JE`U=~h>x*@-c|3pqd~>^dU*{yBwq;}f|4clCwM$>;z7dgyNS@5kTR#~&ZRzWt14>t?7& z!tcr~@Xb5F9L6`_VcB47-w*T2tLF@b`F8K_rpNPt_?c@o@BH(VH?o;bH6SjqXYWWl ze=p^pxInyp3Cz)6bC^x)_!IU>@6U~utFGEJzus(i>b$sD6aTyJ;q=%1^_vOigQ*tm z9(VRt-FppmU)h{*Zx+j*=gdlm#t%3oAtCK`gWcoXxyM$2&(8mHa%ueJ?OV@p(EGia zQ5zInz!*?H!zi@z`RZtx3x3UDHi`ROUS2h+hhI-`GoPIO|Ni6q&syF301KJdwek;k z+U_q|T5kqR59|8>P5%0`zNBLBxvI@;Ya0sYAG~Pwz9RQ{|GW=%=NPZZgCo7_KKqTv z8_tidtUtEA=Dk%_^!Q^o%*E?|SRPP*{cqp;)&BSF>(m48h->_na)&t*9Ae