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
eef3e5cd
Commit
eef3e5cd
authored
5 years ago
by
Haakon Gunleiksrud
Browse files
Options
Downloads
Patches
Plain Diff
#32
Fixed nusic toggle. Now without functional interface
parent
3f64ebfe
Branches
ProfileImage
Branches containing commit
No related tags found
1 merge request
!26
Resolve "Options-functionality"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/core/src/com/gameware/game/states/OptionsState.java
+4
-19
4 additions, 19 deletions
frontend/core/src/com/gameware/game/states/OptionsState.java
with
4 additions
and
19 deletions
frontend/core/src/com/gameware/game/states/OptionsState.java
+
4
−
19
View file @
eef3e5cd
...
@@ -44,17 +44,7 @@ public class OptionsState extends State {
...
@@ -44,17 +44,7 @@ public class OptionsState extends State {
//TODO: Make the functional interfaces work.
//TODO: Make the functional interfaces work.
table
.
row
();
table
.
row
();
table
.
add
(
makeLabel
(
musicToggleLabelText
,
skin
)).
spaceBottom
(
spacingOnBottom
);
table
.
add
(
makeLabel
(
musicToggleLabelText
,
skin
)).
spaceBottom
(
spacingOnBottom
);
table
.
add
(
makeMusicCheckBox
(
skin
,
new
checkBoxInterface
()
{
table
.
add
(
makeMusicCheckBox
(
skin
)).
spaceBottom
(
spacingOnBottom
);
@Override
public
boolean
handle
(
Event
event
)
{
new
ClickListener
()
{
@Override
public
void
clicked
(
InputEvent
event
,
float
x
,
float
y
){
GameWare
.
toggleMusic
();
}
};
return
false
;
}
})).
spaceBottom
(
spacingOnBottom
);
table
.
row
();
table
.
row
();
table
.
add
(
makeLabel
(
soundEffectToggleLabelText
,
skin
)).
spaceBottom
(
spacingOnBottom
).
padRight
(
50
);
table
.
add
(
makeLabel
(
soundEffectToggleLabelText
,
skin
)).
spaceBottom
(
spacingOnBottom
).
padRight
(
50
);
...
@@ -114,16 +104,14 @@ public class OptionsState extends State {
...
@@ -114,16 +104,14 @@ public class OptionsState extends State {
return
label
;
return
label
;
}
}
private
CheckBox
makeMusicCheckBox
(
Skin
skin
,
checkBoxInterface
obj
){
private
CheckBox
makeMusicCheckBox
(
Skin
skin
){
CheckBox
musicToggle
=
new
CheckBox
(
""
,
skin
);
CheckBox
musicToggle
=
new
CheckBox
(
""
,
skin
);
/*
musicToggle
.
addListener
(
new
ClickListener
()
{
musicToggle
.
addListener
(
new
ClickListener
()
{
@Override
@Override
public
void
clicked
(
InputEvent
e
,
float
x
,
float
y
){
GameWare
.
toggleMusic
();
}
public
void
clicked
(
InputEvent
e
,
float
x
,
float
y
){
GameWare
.
toggleMusic
();
}
});
});
*/
musicToggle
.
addListener
((
EventListener
)
obj
);
musicToggle
.
getImage
().
setScale
(
2
,
2
);
musicToggle
.
getImage
().
setScale
(
2
,
2
);
musicToggle
.
toggle
();
return
musicToggle
;
return
musicToggle
;
}
}
...
@@ -134,6 +122,7 @@ public class OptionsState extends State {
...
@@ -134,6 +122,7 @@ public class OptionsState extends State {
public
void
clicked
(
InputEvent
e
,
float
x
,
float
y
){
GameWare
.
toggleSoundEffects
();
}
public
void
clicked
(
InputEvent
e
,
float
x
,
float
y
){
GameWare
.
toggleSoundEffects
();
}
});
});
soundEffectToggle
.
getImage
().
setScale
(
2
,
2
);
soundEffectToggle
.
getImage
().
setScale
(
2
,
2
);
soundEffectToggle
.
toggle
();
return
soundEffectToggle
;
return
soundEffectToggle
;
}
}
...
@@ -148,10 +137,6 @@ public class OptionsState extends State {
...
@@ -148,10 +137,6 @@ public class OptionsState extends State {
return
darkModeToggle
;
return
darkModeToggle
;
}
}
public
interface
checkBoxInterface
extends
EventListener
{
}
private
void
backBtnClick
(){
private
void
backBtnClick
(){
gsm
.
set
(
new
MenuState
(
gsm
));
gsm
.
set
(
new
MenuState
(
gsm
));
}
}
...
...
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