summaryrefslogtreecommitdiffstats
path: root/cwd
diff options
context:
space:
mode:
Diffstat (limited to 'cwd')
-rw-r--r--cwd/assets/altcraft/scripts/init.lua1
-rw-r--r--cwd/assets/altcraft/ui/respawn-styles.rcss24
-rw-r--r--cwd/assets/altcraft/ui/respawn.rml12
3 files changed, 37 insertions, 0 deletions
diff --git a/cwd/assets/altcraft/scripts/init.lua b/cwd/assets/altcraft/scripts/init.lua
index ffd74b7..e13fc81 100644
--- a/cwd/assets/altcraft/scripts/init.lua
+++ b/cwd/assets/altcraft/scripts/init.lua
@@ -16,6 +16,7 @@ function plugin.onLoad ()
con:LoadDocument("altcraft/ui/pause")
con:LoadDocument("altcraft/ui/options")
con:LoadDocument("altcraft/ui/loading")
+ con:LoadDocument("altcraft/ui/respawn")
uiMainMenu:Show()
AC.Settings.Load()
diff --git a/cwd/assets/altcraft/ui/respawn-styles.rcss b/cwd/assets/altcraft/ui/respawn-styles.rcss
new file mode 100644
index 0000000..c6bbd7a
--- /dev/null
+++ b/cwd/assets/altcraft/ui/respawn-styles.rcss
@@ -0,0 +1,24 @@
+.body-respawn {
+ background-color: #800000AA;
+}
+
+#died {
+ font-size: 10vh;
+ margin: 30% auto auto;
+}
+
+#respawn {
+ display: inline-block;
+ width: 45%;
+ height: 8%;
+ position: fixed;
+ margin: 10% auto auto;
+}
+
+#disconnect {
+ display: inline-block;
+ width: 45%;
+ height: 8%;
+ position: fixed;
+ margin: 20% auto auto;
+}
diff --git a/cwd/assets/altcraft/ui/respawn.rml b/cwd/assets/altcraft/ui/respawn.rml
new file mode 100644
index 0000000..093a169
--- /dev/null
+++ b/cwd/assets/altcraft/ui/respawn.rml
@@ -0,0 +1,12 @@
+<rml>
+ <head>
+ <link type="text/rcss" href="mc-styles" />
+ <link type="text/rcss" href="respawn-styles" />
+ <title>NeedRespawn</title>
+ </head>
+ <body class="body-respawn">
+ <strong class="mc-title" id="died">You died!</strong>
+ <button class="mc-button" onclick="AC.GetGameState():PerformRespawn()" id="respawn">Respawn</button>
+ <button class="mc-button" onclick="AC.Disconnect()" id="disconnect">Title screen</button>
+ </body>
+</rml>