summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/play.js b/play.js
index b6aa855..33917d9 100644
--- a/play.js
+++ b/play.js
@@ -622,6 +622,17 @@ function create_building(region, className, xoff, yoff) {
return e
}
+function create_support_buttons(region) {
+ let [ x0, y0 ] = LAYOUT_SUPPORT[region]
+ for (let i = 0; i <= 4; ++i) {
+ let x = Math.floor(-1 + x0 + i * 51.6666)
+ let y = (-1 + y0)
+ let e = create_thing({ className: "support", my_action: "support", my_id: (region << 3) + i })
+ e.style.top = y + "px"
+ e.style.left = x + "px"
+ }
+}
+
function is_action(action, arg) {
if (arg === undefined)
return !!(view.actions && view.actions[action] === 1)
@@ -691,6 +702,8 @@ function on_init() {
register_action(ui.capital[region], "capital", region)
register_action(ui.regions[region], "region", region)
+ create_support_buttons(region)
+
ui.neutral_governors[region] = create_thing({ className: "neutral governor hide" })
}
for (let region = 12; region < 21; ++region) {
@@ -1103,7 +1116,6 @@ function on_update() {
action_button("roll", "Roll")
action_button("place_militia", "Place Militia")
- action_button("support", "Increase Support Level")
action_button("hold_games", "Hold Games")
action_button("build_improvement", "Build an Improvement")