Skip to content
Snippets Groups Projects
Commit 9ab1fffa authored by Haakon Gunleiksrud's avatar Haakon Gunleiksrud
Browse files

#32 Added listener and function for dark mode to come later.

parent 5fb17d69
Branches
No related tags found
1 merge request!26Resolve "Options-functionality"
......@@ -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();
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment