Skip to content

Commit 645574a

Browse files
authored
Merge pull request #76 from grcrt/Radar_v2
Radar v2
2 parents f44a1d8 + 9a54866 commit 645574a

File tree

2 files changed

+55
-21
lines changed

2 files changed

+55
-21
lines changed

modules/GRCRT_Radar.js

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ function _GRCRT_Radar() {
112112
// return dd_town_lists;
113113
// }
114114

115+
this.getSpCs = function(){
116+
return sp_cs_lifetime;
117+
}
118+
115119
this.getThtmlPage = function(){
116120
return _ThtmlPage;
117121
}
@@ -1029,7 +1033,7 @@ if (RepConv.Debug) console.log("generateTime ___unitSpeed="+___unitSpeed+" vs _u
10291033
.on("sp:change:value", function(a, b, c) {
10301034
hero_bonus = GameData.heroes[hero_picker.getValue()].description_args[1].value + GameData.heroes[hero_picker.getValue()].description_args[1].level_mod * b,
10311035
setUnitSpeed()
1032-
})
1036+
}).css({'width':'75px','text-align': 'left'})
10331037
: null;
10341038

10351039

@@ -1082,7 +1086,7 @@ if (RepConv.Debug) console.log("generateTime ___unitSpeed="+___unitSpeed+" vs _u
10821086
.html(RepConvTool.GetLabel('RADAR.MAXUNITTIME'))
10831087
)
10841088
.append(
1085-
$('<div/>', {'id': 'grcrt_cs_time','class':'spinner','style':'width: 70px; float: right; margin: 2px;'})
1089+
$('<div/>', {'id': 'grcrt_cs_time','class':'spinner','style':'width: 100px; float: right; margin: 2px;'})
10861090
)
10871091
)
10881092
.append(
@@ -1094,8 +1098,8 @@ if (RepConv.Debug) console.log("generateTime ___unitSpeed="+___unitSpeed+" vs _u
10941098
.append(
10951099
$('<div/>', {
10961100
'id': 'grcrt_town_points',
1097-
'class':'spinner',
1098-
'style':'width: 65px; float: right; margin: 2px;'
1101+
'class':'spinner_horizontal',
1102+
'style':'width: 100px; float: right; margin: 2px;'
10991103
})
11001104
)
11011105
)
@@ -1108,8 +1112,8 @@ if (RepConv.Debug) console.log("generateTime ___unitSpeed="+___unitSpeed+" vs _u
11081112
.append(
11091113
$('<div/>', {
11101114
'id': 'grcrt_player_idle',
1111-
'class':'spinner',
1112-
'style':'width: 40px; float: right; margin: 2px;'
1115+
'class':'spinner_horizontal',
1116+
'style':'width: 80px; float: right; margin: 2px;'
11131117
})
11141118
)
11151119
)
@@ -1123,14 +1127,14 @@ if (RepConv.Debug) console.log("generateTime ___unitSpeed="+___unitSpeed+" vs _u
11231127
$('<div/>', {
11241128
'id': 'grcrt_town_lists',
11251129
'class':'dropdown default',
1126-
'style':'width: 150px; float: right; margin: 2px 2px 0px 2px;'
1130+
'style':'width: 155px; float: right; margin: 2px 2px 0px 2px;'
11271131
})
11281132
)
11291133
)
11301134
.append(
11311135
$('<div/>', {'class':"runtime_info grcrt_modifiers", 'style':"float: left;"})
11321136
.append(
1133-
$('<div/>', {'class':"modifiers_container", 'style':"max-width: 340px;margin-top: 0px;margin-left: 0px;"})
1137+
$('<div/>', {'class':"modifiers_container", 'style':"max-width: 315px;margin-top: 0px;margin-left: 0px;"})
11341138
.append(
11351139
$('<div/>', {'class':"other_modifiers"})
11361140
.append(
@@ -1261,6 +1265,9 @@ if (RepConv.Debug) console.log("generateTime ___unitSpeed="+___unitSpeed+" vs _u
12611265
.append(
12621266
'.grcrt_pagination {padding: 5px;height: 20px;}'
12631267
)
1268+
.append(
1269+
'#grcrt_cs_time>.body>input {text-align:center !important; left: 5px;}'
1270+
)
12641271
)
12651272
$('#tpl_grcrt_units_list').remove()
12661273
$('<script/>',{'type':"text/template",'id':"tpl_grcrt_units_list"}).text(''+
@@ -1358,20 +1365,20 @@ if (RepConv.Debug) console.log("generateTime ___unitSpeed="+___unitSpeed+" vs _u
13581365
$('.grcrt_modifiers .modifier_icon.'+o).tooltip(getTooltip(o))
13591366
})
13601367

1361-
sp_cs_lifetime = $("#grcrt_cs_time").spinner({
1362-
value: default_timeCS,
1363-
step: "00:30:00",
1364-
max: "48:00:00",
1365-
min: "00:00:00",
1366-
type: "time"
1367-
}),
1368-
sp_town_points = $("#grcrt_town_points").spinner({
1368+
sp_cs_lifetime = $("#grcrt_cs_time").spinnerHorizontal({
1369+
value: default_timeCS,
1370+
step: "00:30:00",
1371+
max: "48:00:00",
1372+
min: "00:30:00",
1373+
type: "time"
1374+
}),
1375+
sp_town_points = $("#grcrt_town_points").spinnerHorizontal({
13691376
value: default_points,
13701377
step: 500,
13711378
max: 18000,
13721379
min: 0
13731380
}),
1374-
sp_player_idle = $("#grcrt_player_idle").spinner({
1381+
sp_player_idle = $("#grcrt_player_idle").spinnerHorizontal({
13751382
value: 0,
13761383
step: 1,
13771384
max: 999,
@@ -1511,7 +1518,15 @@ if (RepConv.Debug) console.log("generateTime ___unitSpeed="+___unitSpeed+" vs _u
15111518
activepagenr: 0,
15121519
minimizable: !0,
15131520
resizable: !1,
1514-
title: RepConv.grcrt_window_icon + RepConvTool.GetLabel('RADAR.TOWNFINDER')
1521+
title: RepConv.grcrt_window_icon + RepConvTool.GetLabel('RADAR.TOWNFINDER'),
1522+
special_buttons: {
1523+
help: {
1524+
action: {
1525+
type: "external_link",
1526+
url: RepConv.Scripts_url+'module/grchowto#radar'
1527+
}
1528+
}
1529+
}
15151530
}, b)
15161531
}
15171532
}()

modules/RepConvGRC.js

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3616,6 +3616,25 @@ function _RepConvGRC() {
36163616
})(jQuery);
36173617
}
36183618
} catch (e) {console.err(e)}
3619+
3620+
try{
3621+
if (typeof $.fn.spinnerHorizontal != 'undefined') {
3622+
(function($){
3623+
if(!RepConv.spinnerHorizontal){
3624+
RepConv.spinnerHorizontal = $.fn.spinnerHorizontal;
3625+
$.fn.spinnerHorizontal = function(){
3626+
var ret = RepConv.spinnerHorizontal.apply(this, arguments);
3627+
ret.on('keyup','input',function(event){
3628+
if (event.keyCode == 38) { ret.stepUp()
3629+
} else if (event.keyCode == 40) { ret.stepDown()
3630+
}
3631+
})
3632+
return ret;
3633+
};
3634+
}
3635+
})(jQuery);
3636+
}
3637+
} catch (e) {console.err(e)}
36193638
new _grcrtWindowGrcRT();
36203639
new _grcrtWindowStats();
36213640
new _grcrtWindowAnalysis();
@@ -3666,7 +3685,7 @@ function _RepConvGRC() {
36663685
.append(
36673686
$('<iframe/>', {
36683687
'src': website,
3669-
'style': 'width: 995px; height: 625px; border: 0px',
3688+
'style': 'width: 995px; height: 625px; border: 0px'
36703689
}
36713690
).bind('load', function() {
36723691
$.each(WM.getWindowByType(_IdS), function(ii,ee){
@@ -3737,7 +3756,7 @@ function _RepConvGRC() {
37373756
.append(
37383757
$('<iframe/>', {
37393758
'src': website,
3740-
'style': 'width: 995px; height: 625px; border: 0px',
3759+
'style': 'width: 995px; height: 625px; border: 0px'
37413760
}
37423761
).bind('load', function() {
37433762
$.each(WM.getWindowByType(_IdS), function(ii,ee){
@@ -3802,7 +3821,7 @@ function _RepConvGRC() {
38023821
.append(
38033822
$('<iframe/>', {
38043823
'src': this.whatLoading(),
3805-
'style': 'width: 815px; height: 430px; border: 0px; float: left;',
3824+
'style': 'width: 815px; height: 430px; border: 0px; float: left;'
38063825
}
38073826
).bind('load', function() {
38083827
(WM.getWindowByType(_IdS)[0]).hideLoading();

0 commit comments

Comments
 (0)