Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Progark gruppe 3
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Ingebrigt Ørstad
Progark gruppe 3
Commits
9ab1fffa
Commit
9ab1fffa
authored
5 years ago
by
Haakon Gunleiksrud
Browse files
Options
Downloads
Patches
Plain Diff
#32
Added listener and function for dark mode to come later.
parent
5fb17d69
Branches
Branches containing commit
No related tags found
1 merge request
!26
Resolve "Options-functionality"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/core/src/com/gameware/game/GameWare.java
+5
-0
5 additions, 0 deletions
frontend/core/src/com/gameware/game/GameWare.java
frontend/core/src/com/gameware/game/states/OptionsState.java
+4
-0
4 additions, 0 deletions
frontend/core/src/com/gameware/game/states/OptionsState.java
with
9 additions
and
0 deletions
frontend/core/src/com/gameware/game/GameWare.java
+
5
−
0
View file @
9ab1fffa
...
...
@@ -62,6 +62,11 @@ public class GameWare extends ApplicationAdapter {
return
soundEffects
;
}
public
static
void
toggleDarkMode
(){
//Should change the skin. Either what skin is chosen when initiating a state, or done within the glassy ui json file.
//Probably have to move the skin initalization to the state abstract class.
}
@Override
public
void
dispose
()
{
batch
.
dispose
();
...
...
This diff is collapsed.
Click to expand it.
frontend/core/src/com/gameware/game/states/OptionsState.java
+
4
−
0
View file @
9ab1fffa
...
...
@@ -60,6 +60,10 @@ public class OptionsState extends State {
table
.
row
();
CheckBox
darkModeToggle
=
new
CheckBox
(
""
,
skin
);
darkModeToggle
.
addListener
(
new
ClickListener
()
{
@Override
public
void
clicked
(
InputEvent
e
,
float
x
,
float
y
){
GameWare
.
toggleDarkMode
();
}
});
Label
darkModeToggleLabel
=
new
Label
(
darkModeToggleLabelText
,
skin
);
table
.
add
(
darkModeToggleLabel
);
table
.
add
(
darkModeToggle
);
...
...
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