Skip to content
Browse files

Remove custom event instancer and convert old inline events to Lua

  • Loading branch information...
DolceTriade committed Aug 25, 2014
1 parent 27eeb5c commit 7779e3658ece82242067a10fac0496d0fd387b0e
@@ -96,7 +96,7 @@ div.infobox {
<body id="alien_build" class="circlemenu alien" onShow="buildDS alienBuildList default; buildDS alienBuildList upgrades">
<body id="alien_build" class="circlemenu alien" onShow='Events.pushevent("buildDS alienBuildList default; buildDS alienBuildList upgrades", event)'>
<div id="foo">
<tabset class="circlemenu">
@@ -97,7 +97,7 @@ div.infobox {
<body id="alien_evo" class="circlemenu alien" onShow="buildDS alienEvolveList default; buildDS alienEvolveList upgrades">
<body id="alien_evo" class="circlemenu alien" onShow='Events.pushevent("buildDS alienEvolveList default; buildDS alienEvolveList upgrades", event)'>
<div id="foo">
<tabset class="circlemenu">
@@ -42,13 +42,13 @@
<body id="alien_spawn" template="window">
<p> Choose your spawn class </p>

<button class="dretch" onClick="hide alien_spawn; exec class level0"> Dretch </button>
<button class="dretch" onClick='Events.pushevent("hide alien_spawn; exec class level0", event)'> Dretch </button>
<!-- FIXME: always spawn as the correct granger version -->
<button class="builder" onClick="hide alien_spawn; exec class builderupg builder"> Granger </button>
<button class="builder" onClick='Events.pushevent("hide alien_spawn; exec class builderupg builder", event)'> Granger </button>

<p> You cannot evolve into a granger from another class</p>

<button class="teamselect" onClick="hide alien_spawn; show ingame_teamselect"> Back to team selection </button>
<button class="teamselect" onClick='Events.pushevent("hide alien_spawn; show ingame_teamselect", event)'> Back to team selection </button>

@@ -13,7 +13,7 @@
<body id="callvote_draw" template="window" style="width: 35em; margin: 10%;">
<h1> Call a Vote for a Draw </h1>

<form onsubmit='execForm "callvote draw $reason$"; hide'>
<form onsubmit='Events.push("execForm \"callvote draw $reason$\"; hide", event)'>
<input type="text" cvar="ui_dialogCvar1" class="text" style="width: 25em;" name="reason"/>
<h3> Reason </h3>
@@ -25,11 +25,11 @@

<body id="callvote_map" template="window" style="width: 40em; margin: 10%;" onShow='buildDS mapList' >
<body id="callvote_map" template="window" style="width: 40em; margin: 10%;" onShow='Events.pushevent("buildDS mapList", event)' >
<h1> Change map </h1>

<form onsubmit='execForm "$action$ $map$"; hide'>
<form onsubmit='Events.pushevent("execForm \"$action$ $map$\"; hide", event)'>
<select cvar="ui_dialogCvar2" name="action">
<option value="callvote nextmap">Vote: change nextmap</option>
@@ -3,11 +3,11 @@
<link type="text/rcss" href="/ui/shared/basics.rcss" />
<link type="text/template" href="/ui/shared/window.rml" />
<body id="error" onhide="exec set com_errorMessage" template="window" style="width: 32em; margin: 10%;">
<body id="error" onhide='Events.pushevent("exec set com_errorMessage", event)' template="window" style="width: 32em; margin: 10%;">
<p class="inline">
<inlinecvar cvar="ui_errorMessage"/>
<button onClick="hide error">Ok</button>
<button onClick='Events.pushevent("hide error", event)'>Ok</button>
@@ -96,7 +96,7 @@ div.infobox {
<body id="human_build" class="circlemenu human" onShow="buildDS humanBuildList default; buildDS humanBuildList upgrades">
<body id="human_build" class="circlemenu human" onShow='Events.pushevent("buildDS humanBuildList default; buildDS humanBuildList upgrades", event)'>
<div id="foo">
<tabset class="circlemenu">
@@ -98,7 +98,7 @@ div.infobox {

<body id="human_buy" class="circlemenu human" onShow="buildDS armouryBuyList weapons; buildDS armouryBuyList upgrades">
<body id="human_buy" class="circlemenu human" onShow='Events.pushevent("buildDS armouryBuyList weapons; buildDS armouryBuyList upgrades", event)'>
<div id="foo">
<tabset class="circlemenu">
@@ -42,12 +42,12 @@
<body id="human_spawn" template="window">
<p> Choose your spawn class </p>

<button class="rifle" onClick="hide human_spawn; exec class rifle"> Rifle </button>
<button class="ckit" onClick="hide human_spawn; exec class ckit"> Construction Kit </button>
<button class="rifle" onClick='Events.pushevent("hide human_spawn; exec class rifle", event)'> Rifle </button>
<button class="ckit" onClick='Events.pushevent("hide human_spawn; exec class ckit", event)'> Construction Kit </button>

<p> All weapons can be traded at the armoury. </p>

<button class="teamselect" onClick="hide human_spawn; show ingame_teamselect"> Back to team selection </button>
<button class="teamselect" onClick='Events.pushevent("hide human_spawn; show ingame_teamselect", event)'> Back to team selection </button>

@@ -52,7 +52,7 @@
<body id="ingame_beaconmenu" class="circlemenu" onShow="buildDS beaconList default">
<body id="ingame_beaconmenu" class="circlemenu" onShow='Events.pushevent("buildDS beaconList default", event)'>
<div id="foo">
<tabset class="circlemenu">
@@ -18,6 +18,6 @@
<body id="ingame_chat">
<chatType/> <chatfield onFocus="setChatCommand" />
<chatType/> <chatfield onFocus='Events.pushevent("setChatCommand", event)' />
@@ -52,7 +52,7 @@

<body id="ingame_teamselect" template="window">

<button class="wide" onClick="hide ingame_teamselect; exec team auto" style="z-index: 10;">
<button class="wide" onClick='Events.pushevent("hide ingame_teamselect; exec team auto", event)' style="z-index: 10;">
<!-- High z-index, so we are placed 'ontop' of the drag-handle at the top of the window -->
Auto-select a team
@@ -66,12 +66,12 @@
than make up for it in upgrades.

<button class="alien" onClick="hide ingame_teamselect; exec team alien"> Join Aliens </button>
<button class="human" onClick="hide ingame_teamselect; exec team human"> Join Humans </button>
<button class="alien" onClick='Events.pushevent("hide ingame_teamselect; exec team alien", event)'> Join Aliens </button>
<button class="human" onClick='Events.pushevent("hide ingame_teamselect; exec team human", event)'> Join Humans </button>

<p> Alternatively you can watch the game without playing.</p>

<button class="wide" onClick="hide ingame_teamselect; exec team spec"> Spectate </button>
<button class="wide" onClick='Events.pushevent("hide ingame_teamselect; exec team spec", event)'> Spectate </button>

@@ -17,64 +17,64 @@

<sidesection id="sidebar_ingame">
<h1> Match menu </h1>
<blocklink class="rightfloat" onClick="exec disconnect"> Leave match</blocklink>
<blocklink class="leftalign" onClick="hide ingame">Resume action</blocklink>
<blocklink class="rightfloat" onClick='Events.pushevent("exec disconnect", event)'> Leave match</blocklink>
<blocklink class="leftalign" onClick='Events.pushevent("hide ingame", event)'>Resume action</blocklink>

<h2> Teams </h2>
<blocklink onClick="exec team alien; hide ingame_menu"> Join aliens</blocklink>
<blocklink onClick="exec team human; hide ingame_menu"> Join humans</blocklink>
<blocklink onClick="exec team spec; hide ingame_menu"> Spectate </blocklink>
<blocklink onClick='Events.pushevent("exec team alien; hide ingame_menu", event)'> Join aliens</blocklink>
<blocklink onClick='Events.pushevent("exec team human; hide ingame_menu", event)'> Join humans</blocklink>
<blocklink onClick='Events.pushevent("exec team spec; hide ingame_menu", event)'> Spectate </blocklink>

<h2> Democracy </h2>
<blocklink class="fake">
Global vote: <ilink onClick="exec vote yes">yes</ilink> or
<ilink onClick="exec vote no">no</ilink>
Global vote: <ilink onClick='Events.pushevent("exec vote yes", event)'>yes</ilink> or
<ilink onClick='Events.pushevent("exec vote no", event)'>no</ilink>
<blocklink class="fake">
Team vote: <ilink onClick="exec teamvote yes">yes</ilink> or
<ilink onClick="exec teamvote no">no</ilink>
Team vote: <ilink onClick='Events.pushevent("exec teamvote yes", event)'>yes</ilink> or
<ilink onClick='Events.pushevent("exec teamvote no", event)'>no</ilink>
<blocklink onClick="exec callvote kickbots"> Kick bots </blocklink>
<!-- <blocklink onClick="show callvote_map"> Change map </blocklink> -->
<blocklink onClick="exec callvote extend"> Extend timelimit </blocklink>
<blocklink onClick="show callvote_draw"> Call a draw </blocklink>
<blocklink onClick="exec callteamvote admitdefeat"> Admit defeat </blocklink>
<blocklink onClick='Events.pushevent("exec callvote kickbots", event)'> Kick bots </blocklink>
<!-- <blocklink onClick='Events.pushevent("show callvote_map", event)'> Change map </blocklink> -->
<blocklink onClick='Events.pushevent("exec callvote extend", event)'> Extend timelimit </blocklink>
<blocklink onClick='Events.pushevent("show callvote_draw", event)'> Call a draw </blocklink>
<blocklink onClick='Events.pushevent("exec callteamvote admitdefeat", event)'> Admit defeat </blocklink>


<if cvar="sv_running" condition="==" value="1">
<sidesection id="sidebar_host">
<h1> Host menu </h1>
<blocklink class="rightfloat" onClick="exec disconnect"> Stop server </blocklink>
<blocklink class="leftalign" onClick="exec pause">Pause server</blocklink>
<blocklink class="rightfloat" onClick='Events.pushevent("exec disconnect", event)'> Stop server </blocklink>
<blocklink class="leftalign" onClick='Events.pushevent("exec pause", event)'>Pause server</blocklink>

<blocklink onClick="show server_general"> Server setup </blocklink>
<blocklink onClick="show server_bots"> Bots </blocklink>
<blocklink onClick='Events.pushevent("show server_general", event)'> Server setup </blocklink>
<blocklink onClick='Events.pushevent("show server_bots", event)'> Bots </blocklink>

<!-- <blocklink onClick="show callvote_map">Change map</blocklink> -->
<blocklink onClick="exec layoutLoad default">Reset match</blocklink>
<!-- <blocklink onClick='Events.pushevent("show callvote_map", event)'>Change map</blocklink> -->
<blocklink onClick='Events.pushevent("exec layoutLoad default", event)'>Reset match</blocklink>

<h2> Bots </h2>
<blocklink onClick="exec bot add Lavishment aliens"> Add an alien bot </blocklink>
<blocklink onClick="exec bot add Pulsifer humans"> Add a human bot </blocklink>
<blocklink onClick="exec bot del all"> Remove all bots </blocklink>
<blocklink onClick='Events.pushevent("exec bot add Lavishment aliens", event)'> Add an alien bot </blocklink>
<blocklink onClick='Events.pushevent("exec bot add Pulsifer humans", event)'> Add a human bot </blocklink>
<blocklink onClick='Events.pushevent("exec bot del all", event)'> Remove all bots </blocklink>

<h2> Players </h2>
<blocklink onClick="show server_discipline">Disclipline: kick/ban/mute/nobuild</blocklink>
<blocklink onClick='Events.pushevent("show server_discipline", event)'>Disclipline: kick/ban/mute/nobuild</blocklink>
@@ -87,31 +87,31 @@

<h2> Play</h2>
<blocklink onClick="show serverbrowser"> Server listings</blocklink>
<blocklink onClick="show createserver"> Start local/LAN game</blocklink>
<!-- <blocklink onClick="show demos"> Recorded demos </blocklink> -->
<blocklink onClick='Events.pushevent("show serverbrowser", event)'> Server listings</blocklink>
<blocklink onClick='Events.pushevent("show createserver", event)'> Start local/LAN game</blocklink>
<!-- <blocklink onClick='Events.pushevent("show demos", event)'> Recorded demos </blocklink> -->

<h2> Options </h2>
<blocklink onClick="show options_player"> Player </blocklink>
<blocklink onClick="show options_graphics"> Graphics </blocklink>
<blocklink onClick="show options_keys"> Key bindings </blocklink>
<blocklink onClick="show options_mouse"> Mouse and aim </blocklink>
<blocklink onClick="show options_sound"> Sound </blocklink>
<blocklink onClick="show options_ui"> User interface and HUD </blocklink>
<!-- <blocklink onClick="show options_fov"> Fields of view </blocklink> -->
<blocklink onClick='Events.pushevent("show options_player", event)'> Player </blocklink>
<blocklink onClick='Events.pushevent("show options_graphics", event)'> Graphics </blocklink>
<blocklink onClick='Events.pushevent("show options_keys", event)'> Key bindings </blocklink>
<blocklink onClick='Events.pushevent("show options_mouse", event)'> Mouse and aim </blocklink>
<blocklink onClick='Events.pushevent("show options_sound", event)'> Sound </blocklink>
<blocklink onClick='Events.pushevent("show options_ui", event)'> User interface and HUD </blocklink>
<!-- <blocklink onClick='Events.pushevent("show options_fov", event)'> Fields of view </blocklink> -->

<h2> Lore </h2>
<blocklink onClick="show help_gameplay"> Gameplay guide </blocklink>
<blocklink onClick="show help_textentry"> Colour codes and symbols </blocklink>
<blocklink onClick='Events.pushevent("show help_gameplay", event)'> Gameplay guide </blocklink>
<blocklink onClick='Events.pushevent("show help_textentry", event)'> Colour codes and symbols </blocklink>

<br />

<blocklink class="rightfloat" onClick="exec quit"> Quit game</blocklink>
<blocklink class="rightfloat" onClick='Events.pushevent("exec quit", event)'> Quit game</blocklink>
<blocklink class="leftalign fake" style="color: #666666;"> Alpha 0.30 </blocklink>

0 comments on commit 7779e36

Please sign in to comment.
You can’t perform that action at this time.