Add image to menu
This commit is contained in:
@@ -7,6 +7,7 @@ import net.minecraft.client.gui.screen.Screen
|
|||||||
import net.minecraft.client.gui.tooltip.Tooltip
|
import net.minecraft.client.gui.tooltip.Tooltip
|
||||||
import net.minecraft.client.gui.widget.ButtonWidget
|
import net.minecraft.client.gui.widget.ButtonWidget
|
||||||
import net.minecraft.text.Text
|
import net.minecraft.text.Text
|
||||||
|
import net.minecraft.util.Identifier
|
||||||
|
|
||||||
|
|
||||||
@Environment(EnvType.CLIENT)
|
@Environment(EnvType.CLIENT)
|
||||||
@@ -32,43 +33,46 @@ class Menu : Screen(Text.literal("SciFy Menu")) {
|
|||||||
5,
|
5,
|
||||||
0xff00ff
|
0xff00ff
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val texture = Identifier("scify", "scify.png")
|
||||||
|
context.drawTexture(texture, width / 2 - 32, 20, 0F, 0F, 64, 64, 64, 64);
|
||||||
}
|
}
|
||||||
public override fun init() {
|
public override fun init() {
|
||||||
|
|
||||||
dynamicBars = ButtonWidget.builder(Text.literal("Dynamic Health")) {
|
dynamicBars = ButtonWidget.builder(Text.literal("Dynamic Health")) {
|
||||||
Bars().toggleBars() // Call the function toggleBars() from the bars.kt module
|
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")))
|
.tooltip(Tooltip.of(Text.literal("Health bar similar to XP")))
|
||||||
.build()
|
.build()
|
||||||
fishingNotif = ButtonWidget.builder(Text.literal("Fishing Notifications")) {
|
fishingNotif = ButtonWidget.builder(Text.literal("Fishing Notifications")) {
|
||||||
FishingNotif().toggleFishingNotif() // If toggleFishingNotif() is true, run the fishing notification script.
|
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")))
|
.tooltip(Tooltip.of(Text.literal("Fishing Notifications")))
|
||||||
.build()
|
.build()
|
||||||
warpHotkeys = ButtonWidget.builder(Text.literal("Toggle hotkeys")) {
|
warpHotkeys = ButtonWidget.builder(Text.literal("Toggle hotkeys")) {
|
||||||
// I don't think we actually need this module at all. TODO: replace with something else
|
// 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.")))
|
.tooltip(Tooltip.of(Text.literal("Enable/Disable hotkeys.")))
|
||||||
.build()
|
.build()
|
||||||
autoWelcome = ButtonWidget.builder(Text.literal("Auto-Welcome")) {
|
autoWelcome = ButtonWidget.builder(Text.literal("Auto-Welcome")) {
|
||||||
AutoWelcome().toggleAutoWelcome() // Call the function toggleAutoWelcome() from the fishingnotif.kt module
|
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.")))
|
.tooltip(Tooltip.of(Text.literal("Automatically welcomes new players.")))
|
||||||
.build()
|
.build()
|
||||||
livelyMode = ButtonWidget.builder(Text.literal("City NPCs (Lively Mode)")) {
|
livelyMode = ButtonWidget.builder(Text.literal("City NPCs (Lively Mode)")) {
|
||||||
FishingNotif().toggleFishingNotif() // Call the function toggleFishingNotif() from the fishingnotif.kt module
|
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")))
|
.tooltip(Tooltip.of(Text.literal("Replaces Villagers with player NPCs")))
|
||||||
.build()
|
.build()
|
||||||
resourcePack = ButtonWidget.builder(Text.literal("Toggle Resource Pack")) {
|
resourcePack = ButtonWidget.builder(Text.literal("Toggle Resource Pack")) {
|
||||||
// TODO: Implement 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.")))
|
.tooltip(Tooltip.of(Text.literal("Toggles the community resource pack.")))
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
|
|||||||
BIN
src/main/resources/assets/scify/scify.png
Normal file
BIN
src/main/resources/assets/scify/scify.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 888 B |
Reference in New Issue
Block a user