From 4e28bf8ff287a87a65026e2834ec732bc17e7ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20R=C3=BCmpelein?= Date: Fri, 24 Oct 2014 17:14:09 +0200 Subject: [PATCH] Styling and Layout of UI changed --- assets/style.css | 14 +++++++++++++ index.html | 2 +- src/jsds.js | 51 +++++++++++++++++++++++++++++++----------------- 3 files changed, 48 insertions(+), 19 deletions(-) diff --git a/assets/style.css b/assets/style.css index f692d09..1d5424f 100644 --- a/assets/style.css +++ b/assets/style.css @@ -44,6 +44,20 @@ h1 { clear: both; } +.bon { + width: 50px; +} + +.label { + display: inline-block; + width: 160px; + padding: auto; +} + +select { + width: 100px; +} + /* Don't show anything but warning, if too small */ /* handheld doesn't work, don't know why…*/ @media handheld { diff --git a/index.html b/index.html index 10f33d8..cfa027a 100644 --- a/index.html +++ b/index.html @@ -10,8 +10,8 @@

JSDSH - Javascript Dungeonslayers Helper

-
+
diff --git a/src/jsds.js b/src/jsds.js index d32e1a2..6337655 100644 --- a/src/jsds.js +++ b/src/jsds.js @@ -254,7 +254,7 @@ // Write out the UI for attack-selection, including binding. sel_att: function() { var outstr="

"; - outstr += "Angriffstyp?
"; + outstr += "Angriffstyp:"; outstr += "
"; - outstr += "Abwehrbar? "; + outstr += "Abwehrbar:"; outstr += "
"; - outstr += "Waffenbonus Fernkampf:
"; - outstr += "Panzerungsbonus:
"; - outstr += "Zauberbonus:
"; + outstr += "Waffenbonus Nahkampf:
"; + outstr += "Waffenbonus Fernkampf:
"; + outstr += "Panzerungsbonus:
"; + outstr += "Zauberbonus:
"; $('#uibon').html(outstr); $('.bon').bind("change", function() { @@ -344,12 +369,7 @@ printoutput: function() { outstr = "

"; outstr += this.info.cname + " (gespielt von "+this.info.pname +")
"; - outstr += "Greift derzeit durch " + this.att + " mit einer Stärke von " - + this.battle[this.att] + " an.
"; - outstr += "Ist "+this.calc_dist()+"m von der alten Position entfernt (max ??)
"; - outstr += "Verteidigungsstärke: " + this.battle.defense + "
"; - outstr += "Kraftpunkte: " + this.life; - outstr += "

"; + outstr += this.battleoutput(); $('#output').html(outstr); } }); @@ -370,12 +390,7 @@ clearoutput(); outstr = "

"; outstr += "Ein "+ this.info.race + "
"; - outstr += "Greift derzeit durch " + this.att + " mit einer Stärke von " - + this.battle[this.att] + " an.
"; - outstr += "Ist "+this.calc_dist()+"m von der alten Position entfernt (max ??)
"; - outstr += "Verteidigungsstärke: " + this.battle.defense + "
"; - outstr += "Kraftpunkte: " + this.life; - outstr += "

"; + outstr += this.battleoutput(); $('#output').html(outstr); } });