-
Notifications
You must be signed in to change notification settings - Fork 7
/
igmenu.lua
64 lines (61 loc) · 2.39 KB
/
igmenu.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
print("Hello from " .. _VERSION .. " !")
local GuiIngameMenu = java.require("net.minecraft.client.gui.GuiIngameMenu")
local GuiOptions = java.require("net.minecraft.client.gui.GuiOptions")
tlCats = {
Category("PROFILE", 0, function(profile)
for _, v in java.ipairs(ItemFilters) do
AddItemCategories(profile, v)
end
profile:category("SKILLS", i18n.format("sao.element.skills"), {}, function(skills)
skills:category("SKILLS", "Test 1")
skills:category("SKILLS", "解散")
end)
profile:crafting()
profile:profile(mc.player, nil)
end),
Category("SOCIAL", 1, function(social)
social:category("GUILD", i18n.format("sao.element.guild"), {}, function(guild)
SetWip(guild)
end)
social:partyMenu()
social:friendMenu()
end),
Category("MESSAGE", 2, function(message)
SetWip(message)
end),
Category("NAVIGATION", 3, function(nav)
SetWip(nav)
end),
Category("SETTINGS", 4, function(settings)
settings:category("OPTION", i18n.format("sao.element.options"), {}, function(options)
options:category("OPTION", i18n.format("guiOptions"), {}, function(vanillaOptions)
vanillaOptions:onClick(function()
OpenGui(GuiOptions:new(vanillaOptions.controllingGUI, mc.gameSettings))
return true
end)
end)
for _, v in java.ipairs(OptionCore.tlOptions) do
options:plusAssign(OptionCategory(options, v))
end
end)
settings:category("HELP", i18n.format("sao.element.menu"), {}, function(menuButton)
menuButton:onClick(function()
OpenGui(GuiIngameMenu:new())
return true
end)
end)
settings:category("LOGOUT", OptionCore.LOGOUT.enabled and i18n.format("sao.element.logout") or "", {}, function(logout)
logout.disabled = OptionCore.LOGOUT.enabled
if (OptionCore.LOGOUT.enabled) then
logout:onClick(function()
logout.controllingGUI.loggingOut = true
return true
end)
end
end)
end)
}
--[[ extra = {
fragment("hex2:label", 10, 100, { text = "Hello World from Fragment loaded by Lua" }),
fragment("hex2:label", 10, 120, { text = "Howdy ?" }),
} ]]