Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile-Cn-Ko-En
Commits
7a686150
Commit
7a686150
authored
Jun 28, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix开关bgm
parent
f7d8a8e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
+26
-6
Classes/gframe/deck_con.cpp
Classes/gframe/deck_con.cpp
+14
-0
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+12
-6
No files found.
Classes/gframe/deck_con.cpp
View file @
7a686150
...
@@ -347,6 +347,20 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -347,6 +347,20 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
imgLog
->
setPressed
(
false
);
mainGame
->
imgLog
->
setPressed
(
false
);
break
;
break
;
}
}
case
BUTTON_BGM
:
{
mainGame
->
soundManager
->
PlaySoundEffect
(
SoundManager
::
SFX
::
BUTTON
);
if
(
mainGame
->
gameConf
.
enable_music
)
{
mainGame
->
gameConf
.
enable_music
=
false
;
mainGame
->
imgVol
->
setImage
(
imageManager
.
tMute
);
}
else
{
mainGame
->
gameConf
.
enable_music
=
true
;
mainGame
->
imgVol
->
setImage
(
imageManager
.
tPlay
);
}
mainGame
->
imgVol
->
setImageSize
(
core
::
dimension2di
(
mainGame
->
yScale
,
mainGame
->
yScale
));
mainGame
->
chkEnableMusic
->
setChecked
(
mainGame
->
gameConf
.
enable_music
);
mainGame
->
soundManager
->
EnableMusic
(
mainGame
->
chkEnableMusic
->
isChecked
());
break
;
}
case
BUTTON_EFFECT_FILTER
:
{
case
BUTTON_EFFECT_FILTER
:
{
mainGame
->
PopupElement
(
mainGame
->
wCategories
);
mainGame
->
PopupElement
(
mainGame
->
wCategories
);
break
;
break
;
...
...
Classes/gframe/event_handler.cpp
View file @
7a686150
...
@@ -198,12 +198,16 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -198,12 +198,16 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
}
case
BUTTON_BGM
:
{
case
BUTTON_BGM
:
{
mainGame
->
soundManager
->
PlaySoundEffect
(
SoundManager
::
SFX
::
BUTTON
);
mainGame
->
soundManager
->
PlaySoundEffect
(
SoundManager
::
SFX
::
BUTTON
);
if
(
mainGame
->
gameConf
.
enable_music
)
{
mainGame
->
gameConf
.
enable_music
=
false
;
mainGame
->
imgVol
->
setImage
(
imageManager
.
tMute
);
}
else
{
mainGame
->
gameConf
.
enable_music
=
true
;
mainGame
->
imgVol
->
setImage
(
imageManager
.
tPlay
);
}
mainGame
->
imgVol
->
setImageSize
(
core
::
dimension2di
(
mainGame
->
yScale
,
mainGame
->
yScale
));
mainGame
->
chkEnableMusic
->
setChecked
(
mainGame
->
gameConf
.
enable_music
);
mainGame
->
chkEnableMusic
->
setChecked
(
mainGame
->
gameConf
.
enable_music
);
mainGame
->
soundManager
->
EnableMusic
(
mainGame
->
chkEnableMusic
->
isChecked
());
mainGame
->
soundManager
->
EnableMusic
(
mainGame
->
chkEnableMusic
->
isChecked
());
if
(
mainGame
->
gameConf
.
enable_music
)
mainGame
->
imgVol
->
setImage
(
imageManager
.
tPlay
);
else
mainGame
->
imgVol
->
setImage
(
imageManager
.
tMute
);
break
;
break
;
}
}
case
BUTTON_CHAIN_IGNORE
:
{
case
BUTTON_CHAIN_IGNORE
:
{
...
@@ -1902,10 +1906,12 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
...
@@ -1902,10 +1906,12 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
}
}
case
CHECKBOX_ENABLE_MUSIC
:
{
case
CHECKBOX_ENABLE_MUSIC
:
{
mainGame
->
soundManager
->
EnableMusic
(
mainGame
->
chkEnableMusic
->
isChecked
());
mainGame
->
soundManager
->
EnableMusic
(
mainGame
->
chkEnableMusic
->
isChecked
());
if
(
mainGame
->
gameConf
.
enable_music
)
if
(
mainGame
->
gameConf
.
enable_music
)
{
mainGame
->
imgVol
->
setImage
(
imageManager
.
tPlay
);
mainGame
->
imgVol
->
setImage
(
imageManager
.
tPlay
);
else
}
else
{
mainGame
->
imgVol
->
setImage
(
imageManager
.
tMute
);
mainGame
->
imgVol
->
setImage
(
imageManager
.
tMute
);
}
mainGame
->
imgVol
->
setImageSize
(
core
::
dimension2di
(
mainGame
->
yScale
,
mainGame
->
yScale
));
return
true
;
return
true
;
break
;
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment