mirror of https://github.com/Oreolek/shooter.git
Volume slider fixes
This commit is contained in:
parent
24200eb2e2
commit
a15c523ebb
|
@ -51,4 +51,4 @@ is_visited = (situation) ->
|
|||
|
||||
# Volume from 0 to 1
|
||||
get_volume = () ->
|
||||
return $('#slider').slider('value') / 100
|
||||
return ($('#slider').slider('value') - 1) / 100
|
||||
|
|
|
@ -153,8 +153,10 @@ situation "shoot",
|
|||
roll = system.rnd.dice(1,20) # d20 roll
|
||||
hit_threshold = 15
|
||||
miss_threshold = 18
|
||||
if character.qualities.enemies == 1
|
||||
miss_threshold = 15 # you can't nick The Boss
|
||||
switch
|
||||
when roll < hit_threshold then system.doLink("hit")
|
||||
when roll <= hit_threshold then system.doLink("hit")
|
||||
when roll > miss_threshold then system.doLink("miss")
|
||||
else system.doLink("nicked")
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
@mixin halfcolumn() {
|
||||
@include make-col();
|
||||
@media (min-width: breakpoint-min(sm)) {
|
||||
@include make-col-span(6);
|
||||
}
|
||||
@media (max-width: breakpoint-max(xs)) {
|
||||
@include make-col-span(12);
|
||||
}
|
||||
}
|
||||
@mixin col($sm-width, $xs-width) {
|
||||
@include make-col;
|
||||
@media (min-width: breakpoint-min(sm)) {
|
||||
@include make-col-span($sm-width);
|
||||
}
|
||||
@media (max-width: breakpoint-max(xs)) {
|
||||
@include make-col-span($xs-width);
|
||||
}
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
.volume {
|
||||
width: 150px;
|
||||
//width: 150px;
|
||||
height: auto;
|
||||
margin: 100px auto 0;
|
||||
position: relative;
|
||||
display: none;
|
||||
margin-top: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
#slider{
|
||||
max-width: 8em;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #333 #333 #777 #333;
|
||||
|
@ -24,13 +24,10 @@
|
|||
display: inline-block;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
right: -5px;
|
||||
background: url('../img/volume.png') no-repeat 0 -50px;
|
||||
position: absolute;
|
||||
margin-top: -5px;
|
||||
}
|
||||
.ui-slider-handle {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
|
@ -43,14 +40,7 @@
|
|||
margin-left: -12px;
|
||||
}
|
||||
.ui-slider-range {
|
||||
background: #ffffff; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #ffffff 0%, #eaeaea 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#eaeaea)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #ffffff 0%,#eaeaea 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #ffffff 0%,#eaeaea 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #ffffff 0%,#eaeaea 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #ffffff 0%,#eaeaea 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eaeaea',GradientType=0 ); /* IE6-9 */
|
||||
@include gradient-vertical(#fff, #eaeaea);
|
||||
position: absolute;
|
||||
border: 0;
|
||||
top: 0;
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
@import "bootstrap/scss/utilities-spacing";
|
||||
@import "bootstrap/scss/utilities-responsive";
|
||||
|
||||
@import "mixins";
|
||||
@import "slider";
|
||||
|
||||
body {
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
|
@ -40,9 +43,11 @@ body {
|
|||
*/
|
||||
// The title block
|
||||
.title {
|
||||
@include make-col();
|
||||
@include make-col-span(10);
|
||||
@include make-col-offset(1);
|
||||
@include col(10,12);
|
||||
@media (min-width: breakpoint-min(sm)) {
|
||||
@include make-col-offset(1);
|
||||
}
|
||||
cursor: pointer; // Until we click to start.
|
||||
.label {
|
||||
overflow: hidden;
|
||||
margin: auto;
|
||||
|
@ -86,16 +91,15 @@ body {
|
|||
color: #943;
|
||||
}
|
||||
}
|
||||
#title {
|
||||
cursor: pointer; // Until we click to start.
|
||||
padding: 1.7em;
|
||||
}
|
||||
#content_wrapper {
|
||||
background: $text_background;
|
||||
border-radius: 5px;
|
||||
}
|
||||
#content {
|
||||
@include make-col();
|
||||
@include make-col-span(12);
|
||||
@include col(10, 12);
|
||||
@media (min-width: breakpoint-min(sm)) {
|
||||
@include make-col-offset(1);
|
||||
}
|
||||
padding: 1em;
|
||||
ul {
|
||||
margin: 0;
|
||||
|
@ -137,9 +141,10 @@ body {
|
|||
}
|
||||
}
|
||||
#legal {
|
||||
@include make-col();
|
||||
@include make-col-span(10);
|
||||
@include make-col-push(1);
|
||||
@include col(10,12);
|
||||
@media (min-width: breakpoint-min(sm)) {
|
||||
@include make-col-offset(1);
|
||||
}
|
||||
margin-top: 1em;
|
||||
color: #654;
|
||||
font-size: smaller;
|
||||
|
@ -171,15 +176,6 @@ body {
|
|||
display: none;
|
||||
}
|
||||
|
||||
@mixin halfcolumn() {
|
||||
@include make-col();
|
||||
@media (min-width: breakpoint-min(sm)) {
|
||||
@include make-col-span(6);
|
||||
}
|
||||
@media (max-width: breakpoint-max(xs)) {
|
||||
@include make-col-span(12);
|
||||
}
|
||||
}
|
||||
.controls {
|
||||
display: none;
|
||||
@include make-col();
|
||||
|
@ -196,11 +192,6 @@ body {
|
|||
}
|
||||
.volume {
|
||||
@include halfcolumn();
|
||||
text-align: center;
|
||||
#slider {
|
||||
margin: 0 auto;
|
||||
max-width: 8em;
|
||||
}
|
||||
}
|
||||
}
|
||||
.way {
|
||||
|
|
Loading…
Reference in New Issue