summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/scripts
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-06-18 14:14:19 +0200
committerLaG1924 <lag1924@gmail.com>2021-06-18 16:52:47 +0200
commit8c033fff3d82d5f0e4c5d2eb3c5d10efc60ee851 (patch)
treee0f585207f4dde33999e73d3fbde65f0c76f8b16 /cwd/assets/altcraft/scripts
parentImplemented main menu in Rml and improved RmlUi support (diff)
downloadAltCraft-8c033fff3d82d5f0e4c5d2eb3c5d10efc60ee851.tar
AltCraft-8c033fff3d82d5f0e4c5d2eb3c5d10efc60ee851.tar.gz
AltCraft-8c033fff3d82d5f0e4c5d2eb3c5d10efc60ee851.tar.bz2
AltCraft-8c033fff3d82d5f0e4c5d2eb3c5d10efc60ee851.tar.lz
AltCraft-8c033fff3d82d5f0e4c5d2eb3c5d10efc60ee851.tar.xz
AltCraft-8c033fff3d82d5f0e4c5d2eb3c5d10efc60ee851.tar.zst
AltCraft-8c033fff3d82d5f0e4c5d2eb3c5d10efc60ee851.zip
Diffstat (limited to 'cwd/assets/altcraft/scripts')
-rw-r--r--cwd/assets/altcraft/scripts/init.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/cwd/assets/altcraft/scripts/init.lua b/cwd/assets/altcraft/scripts/init.lua
index 96b5ec3..b9b34a7 100644
--- a/cwd/assets/altcraft/scripts/init.lua
+++ b/cwd/assets/altcraft/scripts/init.lua
@@ -9,11 +9,14 @@ local plugin = {
}
function plugin.onLoad ()
- print("Loaded AltCraft plugin!")
+ rmlui:LoadFontFace("altcraft/fonts/OpenSans-Regular")
end
function plugin.onChangeState (newState)
- AC.LogWarning("New state: "..newState)
+ if newState == "MainMenu" then
+ local con = rmlui.contexts["default"]
+ con:LoadDocument("altcraft/ui/main-menu"):Show()
+ end
end
function plugin.onUnload ()