diff options
Diffstat (limited to 'cwd/assets/altcraft/ui')
-rw-r--r-- | cwd/assets/altcraft/ui/main-menu.rml | 3 | ||||
-rw-r--r-- | cwd/assets/altcraft/ui/mc-styles.rcss | 6 | ||||
-rw-r--r-- | cwd/assets/altcraft/ui/options-styles.rcss | 84 | ||||
-rw-r--r-- | cwd/assets/altcraft/ui/options.rml | 61 | ||||
-rw-r--r-- | cwd/assets/altcraft/ui/pause.rml | 3 |
5 files changed, 153 insertions, 4 deletions
diff --git a/cwd/assets/altcraft/ui/main-menu.rml b/cwd/assets/altcraft/ui/main-menu.rml index e796b67..0aaac89 100644 --- a/cwd/assets/altcraft/ui/main-menu.rml +++ b/cwd/assets/altcraft/ui/main-menu.rml @@ -3,6 +3,7 @@ <link type="text/rcss" href="mc-styles" /> <link type="text/rcss" href="main-menu-styles" /> <title>MainMenu</title> + <script src="/altcraft/scripts/ui"></script> </head> <body id="body-main-menu"> <strong class="mc-title" id="title">AltCraft</strong> @@ -14,7 +15,7 @@ AC.ConnectToServer( document:GetElementById('hostname'):GetAttribute('value'), document:GetElementById('username'):GetAttribute('value'))">Connect</button> - <input type="button" disabled class="mc-button" id="options">Options...</input> + <button type="button" class="mc-button" id="options" onclick="OpenOptions(document)">Options...</button> <button class="mc-button" id="exit" onclick="AC.Exit()">Quit game</button> </body> </rmL> diff --git a/cwd/assets/altcraft/ui/mc-styles.rcss b/cwd/assets/altcraft/ui/mc-styles.rcss index e6dba35..3549180 100644 --- a/cwd/assets/altcraft/ui/mc-styles.rcss +++ b/cwd/assets/altcraft/ui/mc-styles.rcss @@ -39,8 +39,10 @@ body { .mc-button:hover { background-color: #7e86bc; + color: #cfd69d; } .mc-button:disabled { - background-color: #393939; -}
\ No newline at end of file + background-color: #2b2b2b; + color: #848484; +} diff --git a/cwd/assets/altcraft/ui/options-styles.rcss b/cwd/assets/altcraft/ui/options-styles.rcss new file mode 100644 index 0000000..fbfc685 --- /dev/null +++ b/cwd/assets/altcraft/ui/options-styles.rcss @@ -0,0 +1,84 @@ +.body-options { + background-color: transparent; +} + +form { + width: 70%; + display: block; + margin: 5% auto; + background-color: #211710; +} + +.option { + display: block; + background-color: #0f0b07; + margin: 1vh; + padding: 0.5vh; + font-size: 4vh; + text-align: center; +} + +label { + +} + +span { + +} + +span:hover { + color: #cfd69d; +} + +input { + background-color: #2c2c2c; + height: 4vh; + margin-right: 1vh; + margin-left: 1vh; +} + +input.checkbox { + border-width: 1vh; + border-color: #2c2c2c; +} + +input.checkbox:checked { + background-color: #dcdadc; +} + +input.checkbox:hover { + border-color: #6a6b70; +} + +input.range:hover { + background-color: #6a6b70; +} + +input.range sliderbar { + width: 3vh; + background-color: #9c9c9c; +} + +input.range:hover sliderbar { + background-color: #e9e7e8; +} + +input.range sliderbar:active { + background-color: #cfd69d; +} + +input.range sliderarrowdec { + display: none; +} + +input.range sliderarrowinc { + display: none; +} + +#done { + display: block; + width: 45%; + height: 8%; + position: fixed; + margin: 5% auto auto; +} diff --git a/cwd/assets/altcraft/ui/options.rml b/cwd/assets/altcraft/ui/options.rml new file mode 100644 index 0000000..485dcba --- /dev/null +++ b/cwd/assets/altcraft/ui/options.rml @@ -0,0 +1,61 @@ +<rml> + <head> + <link type="text/rcss" href="mc-styles" /> + <link type="text/rcss" href="options-styles" /> + <script src="/altcraft/scripts/ui"></script> + <title>Options</title> + </head> + <body class="body-options"> + <form> + <div class="option"> + <label>Brightness</label> + <input type="range" min="0.0" max="1.0" step="0.01" id="brightness" /> + <span id="brightness-val"></span> + </div> + + <div class="option"> + <label>Flight</label> + <input type="checkbox" id="flight" /> + <span id="flight-val"></span> + </div> + + <div class="option"> + <label>Mouse sensetivity</label> + <input type="range" min="0.05" max="0.8" step="0.01" id="mouseSensetivity" /> + <span id="mouseSensetivity-val"></span> + </div> + + <div class="option"> + <label>Render distance</label> + <input type="range" min="2" max="16" step="1" id="renderDistance" /> + <span id="renderDistance-val"></span> + </div> + + <div class="option"> + <label>Resolution scale</label> + <input type="range" min="0.1" max="4.0" step="0.05" id="resolutionScale" /> + <span id="resolutionScale-val"></span> + </div> + + <div class="option"> + <label>Fps limit</label> + <input type="range" min="15" max="301" step="1" id="targetFps" /> + <span id="targetFps-val"></span> + </div> + + <div class="option"> + <label>VSync</label> + <input type="checkbox" id="vsync" /> + <span id="vsync-val"></span> + </div> + + <div class="option"> + <label>Wireframe rendering</label> + <input type="checkbox" id="wireframe" /> + <span id="wireframe-val"></span> + </div> + + </form> + <button class="mc-button" id="done" onclick="CloseOptions(document)">Done</button> + </body> +</rml> diff --git a/cwd/assets/altcraft/ui/pause.rml b/cwd/assets/altcraft/ui/pause.rml index 2e366f8..5d652f9 100644 --- a/cwd/assets/altcraft/ui/pause.rml +++ b/cwd/assets/altcraft/ui/pause.rml @@ -2,6 +2,7 @@ <head> <link type="text/rcss" href="mc-styles" /> <link type="text/rcss" href="pause-styles" /> + <script src="/altcraft/scripts/ui"></script> <title>Paused</title> </head> <body class="body-pause"> @@ -9,7 +10,7 @@ <button class="mc-button" onclick="AC.SetStatePlaying()" id="continue">Back to Game</button> <input disabled type="button" class="mc-button" onclick="" id="advancements">Advancements</input> <input disabled type="button" class="mc-button" onclick="" id="statistics">Statistics</input> - <input disabled type="button" class="mc-button" onclick="" id="options">Options...</input> + <button class="mc-button" onclick="OpenOptions(document)" id="options">Options...</button> <button class="mc-button" onclick="AC.Disconnect()" id="disconnect">Disconnect</button> </body> </rml> |