Skip to content

Commit b6a12ba

Browse files
author
jg
committed
Merge branch 'development'
2 parents d28e690 + 86139d8 commit b6a12ba

36 files changed

+18484
-1172
lines changed

gui/css/jquery-ui.structure.min.css

+565
Large diffs are not rendered by default.

gui/css/main.css

+15,921-2
Large diffs are not rendered by default.

gui/images/dialog/face.png

9.28 KB
Loading

gui/index.html

+284-145
Large diffs are not rendered by default.

gui/js/form-validation.js

+32-11
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ function buttonMenuValidate(){
1919
required: true
2020
},
2121
cooldownButtons:{
22-
required: true,
2322
commaNumbers: true
2423
},
2524
cooldownLength:{
@@ -42,18 +41,15 @@ jQuery.validator.addMethod("commaNumbers", function(value, element) {
4241

4342
// Clear Form
4443
function clearValidate(form){
45-
setTimeout(function(){
46-
if (form == "new-button-form"){
47-
console.log(form);
48-
var validator = $('#new-button-form').validate();
49-
validator.resetForm();
50-
}
51-
}, 500);
44+
var validator = $('#new-button-form').validate();
45+
validator.resetForm();
5246
}
5347

5448
// Load up autocomplete for game buttons
55-
$( function() {
56-
// This is a list of all valid buttons for bot robotjs and kbm robot.
49+
function gameButtonValidation(){
50+
// First destory any pre-existing auto completes.
51+
52+
// This is a list of all valid buttons for bot robotjs and kbm robot.
5753
var availableButtons = [
5854
"a",
5955
"b",
@@ -139,12 +135,37 @@ function clearValidate(form){
139135
source: availableButtons,
140136
appendTo: ".game-button-counter"
141137
});
142-
});
138+
$( ".multi-button-key input" ).autocomplete({
139+
source: availableButtons,
140+
appendTo: ".multi-button-key"
141+
});
142+
}
143+
144+
// Load up autocomplete for game buttons
145+
function gameButtonModifierValidation(){
146+
// First destory any pre-existing auto completes.
147+
148+
// This is a list of all valid buttons for bot robotjs and kbm robot.
149+
var availableButtons = [
150+
"alt",
151+
"control",
152+
"command",
153+
"shift",
154+
];
155+
$( ".multi-button-array input" ).autocomplete({
156+
source: availableButtons,
157+
appendTo: ".multi-button-array"
158+
});
159+
}
143160

144161
// Exports
162+
exports.gameValidate = gameButtonValidation;
163+
exports.gameModifierValidate = gameButtonModifierValidation;
145164
exports.clearValidate = clearValidate;
146165

147166
// On App Load
148167
$(document).ready(function () {
149168
buttonMenuValidate();
169+
gameButtonValidation();
170+
gameButtonModifierValidation();
150171
});

gui/js/global.js

+8-18
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const shell = require('electron').shell;
33
// Random BG Image
44
function randomBG(){
55
var random = Math.floor(Math.random() * 5) + 1 ;
6-
$('body').css('background-image', 'url("./images/bg/'+random+'.jpg")');
6+
$('html').css('background-image', 'url("./images/bg/'+random+'.jpg")');
77
}
88
randomBG();
99

@@ -27,31 +27,21 @@ function pageNavigation(){
2727
$.sidr('close','main-menu');
2828

2929
// If the selected page is
30-
if (nextup !== "start" && nextup !== "login" && nextup !== "updates"){
31-
$('.interactive-status').fadeIn('fast');
30+
if (nextup !== "login" && nextup !== "updates"){
31+
$('.interactive-status, .chat-status').fadeIn('fast');
3232
} else {
33-
$('.interactive-status').fadeOut('fast');
33+
$('.interactive-status, .chat-status').fadeOut('fast');
3434
}
3535

3636
return false;
3737
} );
3838
}
3939
pageNavigation();
4040

41-
// Launches tooltip
42-
// This initializes all tooltips
43-
$(document).ready(function() {
44-
$('.tooltip').tooltipster({
45-
delay: 100,
46-
maxWidth: 500,
47-
speed: 300,
48-
interactive: true,
49-
animation: 'grow',
50-
maxWidth: 200,
51-
theme : 'tooltipster-punk',
52-
side: "left"
53-
});
54-
});
41+
// Initialize Tooltips
42+
$(function () {
43+
$('[data-toggle="tooltip"]').tooltip()
44+
})
5545

5646
// Open Link In Browser
5747
// This opens link in system default browser.

0 commit comments

Comments
 (0)