Finally, show if features are enabled in Menu.
This commit is contained in:
@@ -10,7 +10,7 @@ I then remembered when one of my friends (BearCat865) suggested making a Dungeon
|
|||||||
---
|
---
|
||||||
# Roadmap
|
# Roadmap
|
||||||
_Currently in beta so expect bugs._
|
_Currently in beta so expect bugs._
|
||||||
- Right shift menu to enable and disable mods (90%)
|
- Right shift menu to enable and disable mods (100%)
|
||||||
- Health & Food bars replaced with dynamic bar similar to EXP bar (100%)
|
- Health & Food bars replaced with dynamic bar similar to EXP bar (100%)
|
||||||
- Auto-Welcome (20%) **WARNING: This feature may prove to be annoying, in which case we will remove it.**
|
- Auto-Welcome (20%) **WARNING: This feature may prove to be annoying, in which case we will remove it.**
|
||||||
- City NPCs (Lively Mode) (0%)
|
- City NPCs (Lively Mode) (0%)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package chickenmanfy.scify.modules
|
|||||||
|
|
||||||
import net.fabricmc.api.EnvType
|
import net.fabricmc.api.EnvType
|
||||||
import net.fabricmc.api.Environment
|
import net.fabricmc.api.Environment
|
||||||
|
import net.minecraft.client.MinecraftClient
|
||||||
import net.minecraft.client.gui.DrawContext
|
import net.minecraft.client.gui.DrawContext
|
||||||
import net.minecraft.client.gui.screen.Screen
|
import net.minecraft.client.gui.screen.Screen
|
||||||
import net.minecraft.client.gui.tooltip.Tooltip
|
import net.minecraft.client.gui.tooltip.Tooltip
|
||||||
@@ -36,39 +37,45 @@ class Menu : Screen(Text.literal("SciFy Menu")) {
|
|||||||
|
|
||||||
dynamicBars = ButtonWidget.builder(Text.literal("Custom Health/Mana")) {
|
dynamicBars = ButtonWidget.builder(Text.literal("Custom Health/Mana")) {
|
||||||
Bars().toggleBars() // Call the function toggleBars() from the bars.kt module
|
Bars().toggleBars() // Call the function toggleBars() from the bars.kt module
|
||||||
|
MinecraftClient.getInstance().setScreen(Menu())
|
||||||
}
|
}
|
||||||
.dimensions(width / 2 - 205, 84, 200, 20)
|
.dimensions(width / 2 - 205, 84, 200, 20)
|
||||||
.tooltip(Tooltip.of(Text.literal("Custom Health and Mana bars.")))
|
.tooltip(Tooltip.of(Text.literal("Custom Health and Mana bars. (${if (barsToggle) "Enabled" else "Disabled"})")))
|
||||||
.build()
|
.build()
|
||||||
fishingNotif = ButtonWidget.builder(Text.literal("Fishing Notifications")) {
|
fishingNotif = ButtonWidget.builder(Text.literal("Fishing Notifications")) {
|
||||||
FishingNotif().toggleFishingNotif() // Call the function toggleFishingNotif() from the FishingNotif.kt module
|
FishingNotif().toggleFishingNotif() // Call the function toggleFishingNotif() from the FishingNotif.kt module
|
||||||
|
MinecraftClient.getInstance().setScreen(Menu())
|
||||||
}
|
}
|
||||||
.dimensions(width / 2 + 5, 84, 200, 20)
|
.dimensions(width / 2 + 5, 84, 200, 20)
|
||||||
.tooltip(Tooltip.of(Text.literal("Fishing Notifications")))
|
.tooltip(Tooltip.of(Text.literal("Fishing Notifications (${if (fishingToggle) "Enabled" else "Disabled"})")))
|
||||||
.build()
|
.build()
|
||||||
watermark = ButtonWidget.builder(Text.literal("Show Watermark")) {
|
watermark = ButtonWidget.builder(Text.literal("Show Watermark")) {
|
||||||
Watermark().toggleWaterMark() // Call the function toggleWaterMark() from the Watermark.kt module
|
Watermark().toggleWaterMark() // Call the function toggleWaterMark() from the Watermark.kt module
|
||||||
|
MinecraftClient.getInstance().setScreen(Menu())
|
||||||
}
|
}
|
||||||
.dimensions(width / 2 - 205, 164, 200, 20)
|
.dimensions(width / 2 - 205, 164, 200, 20)
|
||||||
.tooltip(Tooltip.of(Text.literal("Enable/Disable the small text in the bottom right displaying the mod name.")))
|
.tooltip(Tooltip.of(Text.literal("Enable/Disable the small text in the bottom right displaying the mod name. (${if (watermarkToggle) "Enabled" else "Disabled"})")))
|
||||||
.build()
|
.build()
|
||||||
autoWelcome = ButtonWidget.builder(Text.literal("Auto Welcome Back")) {
|
autoWelcome = ButtonWidget.builder(Text.literal("Auto Welcome Back")) {
|
||||||
AutoWelcome().toggleAutoWelcome() // Call the function toggleAutoWelcome() from the AutoWelcome.kt module
|
AutoWelcome().toggleAutoWelcome() // Call the function toggleAutoWelcome() from the AutoWelcome.kt module
|
||||||
|
MinecraftClient.getInstance().setScreen(Menu())
|
||||||
}
|
}
|
||||||
.dimensions(width / 2 - 205, 124, 200, 20)
|
.dimensions(width / 2 - 205, 124, 200, 20)
|
||||||
.tooltip(Tooltip.of(Text.literal("Automatically sends \"wb\" when a player joins.")))
|
.tooltip(Tooltip.of(Text.literal("Automatically sends \"wb\" when a player joins. (${if (autoWelcomeToggle) "Enabled" else "Disabled"})")))
|
||||||
.build()
|
.build()
|
||||||
livelyMode = ButtonWidget.builder(Text.literal("City NPCs (Lively Mode)")) {
|
livelyMode = ButtonWidget.builder(Text.literal("City NPCs (Lively Mode)")) {
|
||||||
LivelyMode().toggleLivelyMode() // Call the function toggleLivelyMode() from the LivelyMode.kt module
|
LivelyMode().toggleLivelyMode() // Call the function toggleLivelyMode() from the LivelyMode.kt module
|
||||||
|
MinecraftClient.getInstance().setScreen(Menu())
|
||||||
}
|
}
|
||||||
.dimensions(width / 2 - 205, 164, 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 (${if (livelyModeToggle) "Enabled" else "Disabled"})")))
|
||||||
.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
|
||||||
|
MinecraftClient.getInstance().setScreen(Menu())
|
||||||
}
|
}
|
||||||
.dimensions(width / 2 + 5, 124, 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. (${if (fishingToggle) "Enabled" else "Disabled"})")))
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
addDrawableChild(dynamicBars)
|
addDrawableChild(dynamicBars)
|
||||||
|
|||||||
Reference in New Issue
Block a user