Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
Commits
f3973192
Commit
f3973192
authored
Nov 19, 2019
by
Unicorn369
Committed by
fallenstardust
Dec 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
音效设置 & 复制音效文件
parent
98b141b6
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
0 deletions
+21
-0
Classes/gframe/menu_handler.cpp
Classes/gframe/menu_handler.cpp
+1
-0
mobile/src/main/AndroidManifest.xml
mobile/src/main/AndroidManifest.xml
+1
-0
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
+4
-0
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
+1
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
...c/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
+9
-0
mobile/src/main/res/values-ko/strings.xml
mobile/src/main/res/values-ko/strings.xml
+1
-0
mobile/src/main/res/values-zh/strings.xml
mobile/src/main/res/values-zh/strings.xml
+1
-0
mobile/src/main/res/values/strings.xml
mobile/src/main/res/values/strings.xml
+1
-0
mobile/src/main/res/xml/preference_game.xml
mobile/src/main/res/xml/preference_game.xml
+2
-0
No files found.
Classes/gframe/menu_handler.cpp
View file @
f3973192
...
@@ -62,6 +62,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -62,6 +62,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
switch
(
id
)
{
switch
(
id
)
{
case
BUTTON_MODE_EXIT
:
{
case
BUTTON_MODE_EXIT
:
{
//mainGame->soundEffectPlayer->doPressButton();
//mainGame->soundEffectPlayer->doPressButton();
mainGame
->
soundManager
->
StopBGM
();
mainGame
->
SaveConfig
();
mainGame
->
SaveConfig
();
mainGame
->
device
->
closeDevice
();
mainGame
->
device
->
closeDevice
();
break
;
break
;
...
...
mobile/src/main/AndroidManifest.xml
View file @
f3973192
...
@@ -201,6 +201,7 @@
...
@@ -201,6 +201,7 @@
android:name=
"cn.garymb.ygomobile.ui.plus.ServiceDuelAssistant"
android:name=
"cn.garymb.ygomobile.ui.plus.ServiceDuelAssistant"
android:priority=
"1000"
/>
android:priority=
"1000"
/>
<!-- 如果已经安装过原版YGOMobile,请注释掉或修改成其他,否则会导致无法安装 -->
<provider
<provider
android:name=
"cn.garymb.ygomobile.ui.preference.YGOPreferencesProvider"
android:name=
"cn.garymb.ygomobile.ui.preference.YGOPreferencesProvider"
android:authorities=
"cn.garymb.ygomobile.ui.preference.YGOPreferencesProvider"
android:authorities=
"cn.garymb.ygomobile.ui.preference.YGOPreferencesProvider"
...
...
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
View file @
f3973192
...
@@ -415,6 +415,10 @@ public class AppsSettings {
...
@@ -415,6 +415,10 @@ public class AppsSettings {
mSharedPreferences
.
putBoolean
(
Constants
.
PREF_USE_EXTRA_CARD_CARDS
,
useExtraCards
);
mSharedPreferences
.
putBoolean
(
Constants
.
PREF_USE_EXTRA_CARD_CARDS
,
useExtraCards
);
}
}
public
String
getSoundPath
()
{
return
new
File
(
getResourcePath
(),
Constants
.
CORE_SOUND_PATH
).
getAbsolutePath
();
}
public
String
getCoreSkinPath
()
{
public
String
getCoreSkinPath
()
{
return
new
File
(
getResourcePath
(),
Constants
.
CORE_SKIN_PATH
).
getAbsolutePath
();
return
new
File
(
getResourcePath
(),
Constants
.
CORE_SKIN_PATH
).
getAbsolutePath
();
}
}
...
...
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
View file @
f3973192
...
@@ -66,6 +66,7 @@ public interface Constants {
...
@@ -66,6 +66,7 @@ public interface Constants {
String
CORE_CUSTOM_LIMIT_PATH
=
"expansions/lflist.conf"
;
String
CORE_CUSTOM_LIMIT_PATH
=
"expansions/lflist.conf"
;
String
CORE_SYSTEM_PATH
=
"system.conf"
;
String
CORE_SYSTEM_PATH
=
"system.conf"
;
String
CORE_BOT_CONF_PATH
=
"bot.conf"
;
String
CORE_BOT_CONF_PATH
=
"bot.conf"
;
String
CORE_SOUND_PATH
=
"sound"
;
String
CORE_SKIN_PATH
=
"textures"
;
String
CORE_SKIN_PATH
=
"textures"
;
String
CORE_SKIN_PENDULUM_PATH
=
CORE_SKIN_PATH
+
"/extra"
;
String
CORE_SKIN_PENDULUM_PATH
=
CORE_SKIN_PATH
+
"/extra"
;
String
CORE_DECK_PATH
=
"deck"
;
String
CORE_DECK_PATH
=
"deck"
;
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
View file @
f3973192
...
@@ -146,10 +146,19 @@ public class ResCheckTask extends AsyncTask<Void, Integer, Integer> {
...
@@ -146,10 +146,19 @@ public class ResCheckTask extends AsyncTask<Void, Integer, Integer> {
IOUtils
.
copyFilesFromAssets
(
mContext
,
getDatapath
(
Constants
.
CORE_SINGLE_PATH
),
IOUtils
.
copyFilesFromAssets
(
mContext
,
getDatapath
(
Constants
.
CORE_SINGLE_PATH
),
mSettings
.
getSingleDir
(),
needsUpdate
);
mSettings
.
getSingleDir
(),
needsUpdate
);
}
}
String
[]
sound1
=
mContext
.
getAssets
().
list
(
getDatapath
(
Constants
.
CORE_SOUND_PATH
));
String
[]
sound2
=
new
File
(
mSettings
.
getSoundPath
()).
list
();
String
[]
textures1
=
mContext
.
getAssets
().
list
(
getDatapath
(
Constants
.
CORE_SKIN_PATH
));
String
[]
textures1
=
mContext
.
getAssets
().
list
(
getDatapath
(
Constants
.
CORE_SKIN_PATH
));
String
[]
textures2
=
new
File
(
mSettings
.
getCoreSkinPath
()).
list
();
String
[]
textures2
=
new
File
(
mSettings
.
getCoreSkinPath
()).
list
();
//复制资源文件夹
//复制资源文件夹
//如果sound文件夹不存在/sound资源数量不够/是更新则复制,但是不强制复制
if
(
sound2
==
null
||
(
sound1
!=
null
&&
sound1
.
length
>
sound2
.
length
)
||
needsUpdate
)
{
setMessage
(
mContext
.
getString
(
R
.
string
.
check_things
,
mContext
.
getString
(
R
.
string
.
game_sound
)));
IOUtils
.
copyFilesFromAssets
(
mContext
,
getDatapath
(
Constants
.
CORE_SOUND_PATH
),
mSettings
.
getSoundPath
(),
false
);
}
//如果textures文件夹不存在/textures资源数量不够/是更新则复制,但是不强制复制
//如果textures文件夹不存在/textures资源数量不够/是更新则复制,但是不强制复制
if
(
textures2
==
null
||
(
textures1
!=
null
&&
textures1
.
length
>
textures2
.
length
)
||
needsUpdate
)
{
if
(
textures2
==
null
||
(
textures1
!=
null
&&
textures1
.
length
>
textures2
.
length
)
||
needsUpdate
)
{
setMessage
(
mContext
.
getString
(
R
.
string
.
check_things
,
mContext
.
getString
(
R
.
string
.
game_skins
)));
setMessage
(
mContext
.
getString
(
R
.
string
.
check_things
,
mContext
.
getString
(
R
.
string
.
game_skins
)));
...
...
mobile/src/main/res/values-ko/strings.xml
View file @
f3973192
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<string
name=
"images"
>
이미지
</string>
<string
name=
"images"
>
이미지
</string>
<string
name=
"single_lua"
>
single files
</string>
<string
name=
"single_lua"
>
single files
</string>
<string
name=
"font_files"
>
폰트 파일
</string>
<string
name=
"font_files"
>
폰트 파일
</string>
<string
name=
"game_sound"
>
음효 파일
</string>
<string
name=
"game_skins"
>
스킨 파일
</string>
<string
name=
"game_skins"
>
스킨 파일
</string>
<string
name=
"coping_pendulum_image"
>
Coping pendulum image
</string>
<string
name=
"coping_pendulum_image"
>
Coping pendulum image
</string>
<string
name=
"dialog_select_font"
>
font파일을 선택하세요.
</string>
<string
name=
"dialog_select_font"
>
font파일을 선택하세요.
</string>
...
...
mobile/src/main/res/values-zh/strings.xml
View file @
f3973192
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<string
name=
"images"
>
图片
</string>
<string
name=
"images"
>
图片
</string>
<string
name=
"single_lua"
>
残局文件
</string>
<string
name=
"single_lua"
>
残局文件
</string>
<string
name=
"font_files"
>
字体文件
</string>
<string
name=
"font_files"
>
字体文件
</string>
<string
name=
"game_sound"
>
音效文件
</string>
<string
name=
"game_skins"
>
皮肤文件
</string>
<string
name=
"game_skins"
>
皮肤文件
</string>
<string
name=
"coping_pendulum_image"
>
复制灵摆数字图片
</string>
<string
name=
"coping_pendulum_image"
>
复制灵摆数字图片
</string>
<string
name=
"dialog_select_font"
>
请选择一个字体文件
</string>
<string
name=
"dialog_select_font"
>
请选择一个字体文件
</string>
...
...
mobile/src/main/res/values/strings.xml
View file @
f3973192
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
<string
name=
"images"
>
images
</string>
<string
name=
"images"
>
images
</string>
<string
name=
"single_lua"
>
single files
</string>
<string
name=
"single_lua"
>
single files
</string>
<string
name=
"font_files"
>
font files
</string>
<string
name=
"font_files"
>
font files
</string>
<string
name=
"game_sound"
>
sound files
</string>
<string
name=
"game_skins"
>
skin files
</string>
<string
name=
"game_skins"
>
skin files
</string>
<string
name=
"coping_pendulum_image"
>
Coping pendulum image
</string>
<string
name=
"coping_pendulum_image"
>
Coping pendulum image
</string>
<string
name=
"dialog_select_font"
>
Select a font file
</string>
<string
name=
"dialog_select_font"
>
Select a font file
</string>
...
...
mobile/src/main/res/xml/preference_game.xml
View file @
f3973192
...
@@ -45,10 +45,12 @@
...
@@ -45,10 +45,12 @@
android:key=
"pref_settings_read_ex"
android:key=
"pref_settings_read_ex"
android:persistent=
"true"
android:persistent=
"true"
android:title=
"@string/title_use_ex"
/>
android:title=
"@string/title_use_ex"
/>
<!-- 启用游戏音效
<CheckBoxPreference
<CheckBoxPreference
android:key="pref_key_game_sound_effect"
android:key="pref_key_game_sound_effect"
android:persistent="true"
android:persistent="true"
android:title="@string/settings_game_enable_sound_effect" />
android:title="@string/settings_game_enable_sound_effect" />
-->
<CheckBoxPreference
<CheckBoxPreference
android:key=
"pref_key_game_screen_orientation"
android:key=
"pref_key_game_screen_orientation"
android:persistent=
"true"
android:persistent=
"true"
...
...
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