mirror of
https://github.com/Oreolek/shooter.git
synced 2024-05-11 05:18:17 +03:00
Volume slider fixes
This commit is contained in:
parent
24200eb2e2
commit
a15c523ebb
|
@ -51,4 +51,4 @@ is_visited = (situation) ->
|
||||||
|
|
||||||
# Volume from 0 to 1
|
# Volume from 0 to 1
|
||||||
get_volume = () ->
|
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
|
roll = system.rnd.dice(1,20) # d20 roll
|
||||||
hit_threshold = 15
|
hit_threshold = 15
|
||||||
miss_threshold = 18
|
miss_threshold = 18
|
||||||
|
if character.qualities.enemies == 1
|
||||||
|
miss_threshold = 15 # you can't nick The Boss
|
||||||
switch
|
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")
|
when roll > miss_threshold then system.doLink("miss")
|
||||||
else system.doLink("nicked")
|
else system.doLink("nicked")
|
||||||
|
|
||||||
|
|
18
sass/_mixins.scss
Normal file
18
sass/_mixins.scss
Normal file
|
@ -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 {
|
.volume {
|
||||||
width: 150px;
|
//width: 150px;
|
||||||
height: auto;
|
height: auto;
|
||||||
margin: 100px auto 0;
|
margin-top: 1em;
|
||||||
position: relative;
|
text-align: center;
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
#slider{
|
#slider{
|
||||||
|
max-width: 8em;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-color: #333 #333 #777 #333;
|
border-color: #333 #333 #777 #333;
|
||||||
|
@ -24,13 +24,10 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 25px;
|
width: 25px;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
right: -5px;
|
|
||||||
background: url('../img/volume.png') no-repeat 0 -50px;
|
background: url('../img/volume.png') no-repeat 0 -50px;
|
||||||
position: absolute;
|
|
||||||
margin-top: -5px;
|
margin-top: -5px;
|
||||||
}
|
}
|
||||||
.ui-slider-handle {
|
.ui-slider-handle {
|
||||||
position: absolute;
|
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
width: 25px;
|
width: 25px;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
|
@ -43,14 +40,7 @@
|
||||||
margin-left: -12px;
|
margin-left: -12px;
|
||||||
}
|
}
|
||||||
.ui-slider-range {
|
.ui-slider-range {
|
||||||
background: #ffffff; /* Old browsers */
|
@include gradient-vertical(#fff, #eaeaea);
|
||||||
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 */
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border: 0;
|
border: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
@import "bootstrap/scss/utilities-spacing";
|
@import "bootstrap/scss/utilities-spacing";
|
||||||
@import "bootstrap/scss/utilities-responsive";
|
@import "bootstrap/scss/utilities-responsive";
|
||||||
|
|
||||||
|
@import "mixins";
|
||||||
|
@import "slider";
|
||||||
|
|
||||||
body {
|
body {
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
@ -40,9 +43,11 @@ body {
|
||||||
*/
|
*/
|
||||||
// The title block
|
// The title block
|
||||||
.title {
|
.title {
|
||||||
@include make-col();
|
@include col(10,12);
|
||||||
@include make-col-span(10);
|
@media (min-width: breakpoint-min(sm)) {
|
||||||
@include make-col-offset(1);
|
@include make-col-offset(1);
|
||||||
|
}
|
||||||
|
cursor: pointer; // Until we click to start.
|
||||||
.label {
|
.label {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
@ -86,16 +91,15 @@ body {
|
||||||
color: #943;
|
color: #943;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#title {
|
|
||||||
cursor: pointer; // Until we click to start.
|
|
||||||
padding: 1.7em;
|
|
||||||
}
|
|
||||||
#content_wrapper {
|
#content_wrapper {
|
||||||
background: $text_background;
|
background: $text_background;
|
||||||
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
#content {
|
#content {
|
||||||
@include make-col();
|
@include col(10, 12);
|
||||||
@include make-col-span(12);
|
@media (min-width: breakpoint-min(sm)) {
|
||||||
|
@include make-col-offset(1);
|
||||||
|
}
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
ul {
|
ul {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -137,9 +141,10 @@ body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#legal {
|
#legal {
|
||||||
@include make-col();
|
@include col(10,12);
|
||||||
@include make-col-span(10);
|
@media (min-width: breakpoint-min(sm)) {
|
||||||
@include make-col-push(1);
|
@include make-col-offset(1);
|
||||||
|
}
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
color: #654;
|
color: #654;
|
||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
|
@ -171,15 +176,6 @@ body {
|
||||||
display: none;
|
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 {
|
.controls {
|
||||||
display: none;
|
display: none;
|
||||||
@include make-col();
|
@include make-col();
|
||||||
|
@ -196,11 +192,6 @@ body {
|
||||||
}
|
}
|
||||||
.volume {
|
.volume {
|
||||||
@include halfcolumn();
|
@include halfcolumn();
|
||||||
text-align: center;
|
|
||||||
#slider {
|
|
||||||
margin: 0 auto;
|
|
||||||
max-width: 8em;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.way {
|
.way {
|
||||||
|
|
Loading…
Reference in a new issue