Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fc-pregmod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pregmodfan
fc-pregmod
Commits
7b803cba
Commit
7b803cba
authored
4 years ago
by
Arkerthan
Browse files
Options
Downloads
Patches
Plain Diff
make reload() global
parent
5a31a957
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!6815
merge SC2 eye color selection in single JS function
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/gui/options.js
+3
-9
3 additions, 9 deletions
src/gui/options.js
src/js/utilsSC.js
+9
-0
9 additions, 0 deletions
src/js/utilsSC.js
with
12 additions
and
9 deletions
src/gui/options.js
+
3
−
9
View file @
7b803cba
...
@@ -225,7 +225,7 @@ App.UI.OptionsGroup = (function() {
...
@@ -225,7 +225,7 @@ App.UI.OptionsGroup = (function() {
if
(
value
.
value
)
{
if
(
value
.
value
)
{
Engine
.
play
(
value
.
value
);
Engine
.
play
(
value
.
value
);
}
else
{
}
else
{
reload
();
App
.
UI
.
reload
();
}
}
};
};
}
else
{
}
else
{
...
@@ -253,7 +253,7 @@ App.UI.OptionsGroup = (function() {
...
@@ -253,7 +253,7 @@ App.UI.OptionsGroup = (function() {
if
(
value
.
callback
)
{
if
(
value
.
callback
)
{
value
.
callback
();
value
.
callback
();
}
}
reload
();
App
.
UI
.
reload
();
};
};
}
}
buttonGroup
.
append
(
button
);
buttonGroup
.
append
(
button
);
...
@@ -262,7 +262,7 @@ App.UI.OptionsGroup = (function() {
...
@@ -262,7 +262,7 @@ App.UI.OptionsGroup = (function() {
const
isNumber
=
typeof
currentValue
===
"
number
"
;
const
isNumber
=
typeof
currentValue
===
"
number
"
;
const
textbox
=
App
.
UI
.
DOM
.
makeTextBox
(
currentValue
,
input
=>
{
const
textbox
=
App
.
UI
.
DOM
.
makeTextBox
(
currentValue
,
input
=>
{
option
.
object
[
option
.
property
]
=
input
;
option
.
object
[
option
.
property
]
=
input
;
reload
();
App
.
UI
.
reload
();
},
isNumber
);
},
isNumber
);
if
(
isNumber
)
{
if
(
isNumber
)
{
textbox
.
classList
.
add
(
"
number
"
);
textbox
.
classList
.
add
(
"
number
"
);
...
@@ -283,12 +283,6 @@ App.UI.OptionsGroup = (function() {
...
@@ -283,12 +283,6 @@ App.UI.OptionsGroup = (function() {
return
container
;
return
container
;
function
reload
()
{
const
position
=
window
.
pageYOffset
;
Engine
.
play
(
passage
());
window
.
scrollTo
(
0
,
position
);
}
function
inRange
(
mode
,
compareValue
,
value
)
{
function
inRange
(
mode
,
compareValue
,
value
)
{
if
(
mode
===
"
<
"
)
{
if
(
mode
===
"
<
"
)
{
return
value
<
compareValue
;
return
value
<
compareValue
;
...
...
This diff is collapsed.
Click to expand it.
src/js/utilsSC.js
+
9
−
0
View file @
7b803cba
...
@@ -304,3 +304,12 @@ App.UI.slaveDescriptionDialog = function(slave) {
...
@@ -304,3 +304,12 @@ App.UI.slaveDescriptionDialog = function(slave) {
App
.
UI
.
DOM
.
slaveDescriptionDialog
=
function
(
slave
)
{
App
.
UI
.
DOM
.
slaveDescriptionDialog
=
function
(
slave
)
{
return
App
.
UI
.
DOM
.
link
(
SlaveFullName
(
slave
),
App
.
UI
.
_showDescriptionDialog
,
[
slave
]);
return
App
.
UI
.
DOM
.
link
(
SlaveFullName
(
slave
),
App
.
UI
.
_showDescriptionDialog
,
[
slave
]);
};
};
/**
* Reloads the passage and stays at the same height.
*/
App
.
UI
.
reload
=
function
()
{
const
position
=
window
.
pageYOffset
;
Engine
.
play
(
passage
());
window
.
scrollTo
(
0
,
position
);
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment