Commit 4267db3f authored by Jyrki's avatar Jyrki 🐾

the slidrrerrs now get a maximum value

parent cad8e6ea
......@@ -58,6 +58,10 @@ updateCounters = ->
# market sliders
$("span[name=market-#{x}-val]").html $("input[name=market-slider][data-type=#{x}]").val() for x in ['wheat', 'livestock', 'fields', 'cattle']
$("input[name=market-slider][data-type=wheat]").attr "max", window.gameVars.wheat.count
$("input[name=market-slider][data-type=livestock]").attr "max", window.gameVars.liveStock.count
$("input[name=market-slider][data-type=fields]").attr "max", window.gameVars.fields.count
$("input[name=market-slider][data-type=cattle]").attr "max", window.gameVars.cattleGrid.count
# statistics
$('td#stats-wheat-produced').html window.gameVars.wheat.produced
......
......@@ -59,6 +59,10 @@
x = _ref[_i];
$("span[name=market-" + x + "-val]").html($("input[name=market-slider][data-type=" + x + "]").val());
}
$("input[name=market-slider][data-type=wheat]").attr("max", window.gameVars.wheat.count);
$("input[name=market-slider][data-type=livestock]").attr("max", window.gameVars.liveStock.count);
$("input[name=market-slider][data-type=fields]").attr("max", window.gameVars.fields.count);
$("input[name=market-slider][data-type=cattle]").attr("max", window.gameVars.cattleGrid.count);
$('td#stats-wheat-produced').html(window.gameVars.wheat.produced);
$('td#stats-wheat-consumed').html(window.gameVars.wheat.consumed);
$('td#stats-wheat-bought').html(window.gameVars.wheat.bought);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment