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
b078f4d7
Commit
b078f4d7
authored
Sep 10, 2021
by
qq247321453
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into cc
parents
1533b106
b542e0f0
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
183 additions
and
129 deletions
+183
-129
Classes/gframe/deck_manager.cpp
Classes/gframe/deck_manager.cpp
+9
-0
Classes/gframe/deck_manager.h
Classes/gframe/deck_manager.h
+1
-0
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+52
-47
Classes/gframe/game.h
Classes/gframe/game.h
+2
-4
Classes/gframe/image_manager.cpp
Classes/gframe/image_manager.cpp
+1
-0
Classes/gframe/image_manager.h
Classes/gframe/image_manager.h
+1
-0
Classes/gframe/menu_handler.cpp
Classes/gframe/menu_handler.cpp
+36
-36
Classes/gframe/myfilesystem.h
Classes/gframe/myfilesystem.h
+10
-0
mobile/assets/changelog.html
mobile/assets/changelog.html
+13
-5
mobile/assets/data/textures/extra/tclose.png
mobile/assets/data/textures/extra/tclose.png
+0
-0
mobile/build.gradle
mobile/build.gradle
+2
-2
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerActivity.java
...ava/cn/garymb/ygomobile/ui/cards/DeckManagerActivity.java
+29
-29
mobile/src/main/java/ocgcore/StringManager.java
mobile/src/main/java/ocgcore/StringManager.java
+3
-3
mobile/src/main/java/ocgcore/data/Card.java
mobile/src/main/java/ocgcore/data/Card.java
+3
-0
mobile/src/main/java/ocgcore/data/CardData.java
mobile/src/main/java/ocgcore/data/CardData.java
+3
-3
mobile/src/main/res/drawable-xhdpi/ic_launcher3.png
mobile/src/main/res/drawable-xhdpi/ic_launcher3.png
+0
-0
mobile/src/main/res/values-ko/strings.xml
mobile/src/main/res/values-ko/strings.xml
+6
-0
mobile/src/main/res/values-zh/strings.xml
mobile/src/main/res/values-zh/strings.xml
+6
-0
mobile/src/main/res/values/strings.xml
mobile/src/main/res/values/strings.xml
+6
-0
No files found.
Classes/gframe/deck_manager.cpp
View file @
b078f4d7
...
@@ -48,6 +48,15 @@ void DeckManager::LoadLFListSingle(const char* path) {
...
@@ -48,6 +48,15 @@ void DeckManager::LoadLFListSingle(const char* path) {
fclose
(
fp
);
fclose
(
fp
);
}
}
}
}
void
DeckManager
::
LoadLFList
(
android
::
InitOptions
*
options
)
{
io
::
path
workingDir
=
options
->
getWorkDir
();
LoadLFListSingle
((
workingDir
+
path
(
"/expansions/lflist.conf"
)).
c_str
());
LoadLFListSingle
((
workingDir
+
path
(
"/lflist.conf"
)).
c_str
());
LFList
nolimit
;
nolimit
.
listName
=
L"N/A"
;
nolimit
.
hash
=
0
;
_lfList
.
push_back
(
nolimit
);
}
const
wchar_t
*
DeckManager
::
GetLFListName
(
int
lfhash
)
{
const
wchar_t
*
DeckManager
::
GetLFListName
(
int
lfhash
)
{
auto
lit
=
std
::
find_if
(
_lfList
.
begin
(),
_lfList
.
end
(),
[
lfhash
](
const
ygo
::
LFList
&
list
)
{
auto
lit
=
std
::
find_if
(
_lfList
.
begin
(),
_lfList
.
end
(),
[
lfhash
](
const
ygo
::
LFList
&
list
)
{
return
list
.
hash
==
lfhash
;
return
list
.
hash
==
lfhash
;
...
...
Classes/gframe/deck_manager.h
View file @
b078f4d7
...
@@ -36,6 +36,7 @@ public:
...
@@ -36,6 +36,7 @@ public:
std
::
vector
<
LFList
>
_lfList
;
std
::
vector
<
LFList
>
_lfList
;
void
LoadLFListSingle
(
const
char
*
path
);
void
LoadLFListSingle
(
const
char
*
path
);
void
LoadLFList
(
android
::
InitOptions
*
options
);
const
wchar_t
*
GetLFListName
(
int
lfhash
);
const
wchar_t
*
GetLFListName
(
int
lfhash
);
std
::
unordered_map
<
int
,
int
>*
GetLFListContent
(
int
lfhash
);
std
::
unordered_map
<
int
,
int
>*
GetLFListContent
(
int
lfhash
);
int
CheckDeck
(
Deck
&
deck
,
int
lfhash
,
int
rule
);
int
CheckDeck
(
Deck
&
deck
,
int
lfhash
,
int
rule
);
...
...
Classes/gframe/game.cpp
View file @
b078f4d7
...
@@ -192,8 +192,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
...
@@ -192,8 +192,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
menuHandler
.
prev_sel
=
-
1
;
menuHandler
.
prev_sel
=
-
1
;
memset
(
&
dInfo
,
0
,
sizeof
(
DuelInfo
));
memset
(
&
dInfo
,
0
,
sizeof
(
DuelInfo
));
memset
(
chatTiming
,
0
,
sizeof
(
chatTiming
));
memset
(
chatTiming
,
0
,
sizeof
(
chatTiming
));
deckManager
.
LoadLFListSingle
((
workingDir
+
path
(
"/expansions/lflist.conf"
)).
c_str
());
deckManager
.
LoadLFList
(
options
);
deckManager
.
LoadLFListSingle
((
workingDir
+
path
(
"/lflist.conf"
)).
c_str
());
driver
=
device
->
getVideoDriver
();
driver
=
device
->
getVideoDriver
();
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
int
quality
=
options
->
getCardQualityOp
();
int
quality
=
options
->
getCardQualityOp
();
...
@@ -423,16 +422,20 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
...
@@ -423,16 +422,20 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
for
(
int
i
=
0
;
i
<
2
;
++
i
)
{
for
(
int
i
=
0
;
i
<
2
;
++
i
)
{
stHostPrepDuelist
[
i
]
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
60
*
xScale
,
(
80
+
i
*
45
)
*
yScale
,
260
*
xScale
,
(
120
+
i
*
45
)
*
yScale
),
true
,
false
,
wHostPrepare
);
stHostPrepDuelist
[
i
]
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
60
*
xScale
,
(
80
+
i
*
45
)
*
yScale
,
260
*
xScale
,
(
120
+
i
*
45
)
*
yScale
),
true
,
false
,
wHostPrepare
);
stHostPrepDuelist
[
i
]
->
setTextAlignment
(
EGUIA_CENTER
,
EGUIA_CENTER
);
stHostPrepDuelist
[
i
]
->
setTextAlignment
(
EGUIA_CENTER
,
EGUIA_CENTER
);
btnHostPrepKick
[
i
]
=
env
->
addButton
(
rect
<
s32
>
(
10
*
xScale
,
(
80
+
i
*
45
)
*
yScale
,
50
*
xScale
,
(
120
+
i
*
45
)
*
yScale
),
wHostPrepare
,
BUTTON_HP_KICK
,
L"X"
);
btnHostPrepKick
[
i
]
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
10
*
xScale
,
(
80
+
i
*
45
)
*
yScale
,
50
*
xScale
,
(
120
+
i
*
45
)
*
yScale
),
wHostPrepare
,
BUTTON_HP_KICK
);
ChangeToIGUIImageButton
(
btnHostPrepKick
[
i
],
imageManager
.
tButton_C
,
imageManager
.
tButton_C_pressed
);
btnHostPrepKick
[
i
]
->
setImageSize
(
core
::
dimension2di
(
40
*
yScale
,
40
*
yScale
));
btnHostPrepKick
[
i
]
->
setDrawBorder
(
false
);
btnHostPrepKick
[
i
]
->
setImage
(
imageManager
.
tClose
);
chkHostPrepReady
[
i
]
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
270
*
xScale
,
(
80
+
i
*
45
)
*
yScale
,
310
*
xScale
,
(
120
+
i
*
45
)
*
yScale
),
wHostPrepare
,
CHECKBOX_HP_READY
,
L""
);
chkHostPrepReady
[
i
]
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
270
*
xScale
,
(
80
+
i
*
45
)
*
yScale
,
310
*
xScale
,
(
120
+
i
*
45
)
*
yScale
),
wHostPrepare
,
CHECKBOX_HP_READY
,
L""
);
chkHostPrepReady
[
i
]
->
setEnabled
(
false
);
chkHostPrepReady
[
i
]
->
setEnabled
(
false
);
}
}
for
(
int
i
=
2
;
i
<
4
;
++
i
)
{
for
(
int
i
=
2
;
i
<
4
;
++
i
)
{
stHostPrepDuelist
[
i
]
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
60
*
xScale
,
(
135
+
i
*
45
)
*
yScale
,
260
*
xScale
,
(
175
+
i
*
45
)
*
yScale
),
true
,
false
,
wHostPrepare
);
stHostPrepDuelist
[
i
]
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
60
*
xScale
,
(
135
+
i
*
45
)
*
yScale
,
260
*
xScale
,
(
175
+
i
*
45
)
*
yScale
),
true
,
false
,
wHostPrepare
);
stHostPrepDuelist
[
i
]
->
setTextAlignment
(
EGUIA_CENTER
,
EGUIA_CENTER
);
stHostPrepDuelist
[
i
]
->
setTextAlignment
(
EGUIA_CENTER
,
EGUIA_CENTER
);
btnHostPrepKick
[
i
]
=
env
->
addButton
(
rect
<
s32
>
(
10
*
xScale
,
(
135
+
i
*
45
)
*
yScale
,
50
*
xScale
,
(
175
+
i
*
45
)
*
yScale
),
wHostPrepare
,
BUTTON_HP_KICK
,
L"X"
);
btnHostPrepKick
[
i
]
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
10
*
xScale
,
(
135
+
i
*
45
)
*
yScale
,
50
*
xScale
,
(
175
+
i
*
45
)
*
yScale
),
wHostPrepare
,
BUTTON_HP_KICK
);
ChangeToIGUIImageButton
(
btnHostPrepKick
[
i
],
imageManager
.
tButton_C
,
imageManager
.
tButton_C_pressed
);
btnHostPrepKick
[
i
]
->
setImageSize
(
core
::
dimension2di
(
40
*
yScale
,
40
*
yScale
));
btnHostPrepKick
[
i
]
->
setDrawBorder
(
false
);
btnHostPrepKick
[
i
]
->
setImage
(
imageManager
.
tClose
);
chkHostPrepReady
[
i
]
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
270
*
xScale
,
(
135
+
i
*
45
)
*
yScale
,
310
*
xScale
,
(
175
+
i
*
45
)
*
yScale
),
wHostPrepare
,
CHECKBOX_HP_READY
,
L""
);
chkHostPrepReady
[
i
]
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
270
*
xScale
,
(
135
+
i
*
45
)
*
yScale
,
310
*
xScale
,
(
175
+
i
*
45
)
*
yScale
),
wHostPrepare
,
CHECKBOX_HP_READY
,
L""
);
chkHostPrepReady
[
i
]
->
setEnabled
(
false
);
chkHostPrepReady
[
i
]
->
setEnabled
(
false
);
}
}
...
@@ -564,27 +567,21 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
...
@@ -564,27 +567,21 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
chkQuickAnimation
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_QUICK_ANIMATION
,
dataManager
.
GetSysString
(
1299
));
chkQuickAnimation
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_QUICK_ANIMATION
,
dataManager
.
GetSysString
(
1299
));
chkQuickAnimation
->
setChecked
(
gameConf
.
quick_animation
!=
0
);
chkQuickAnimation
->
setChecked
(
gameConf
.
quick_animation
!=
0
);
posY
+=
40
*
yScale
;
posY
+=
40
*
yScale
;
chk
MusicMode
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
-
1
,
dataManager
.
GetSysString
(
1281
));
chk
DrawFieldSpell
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_DRAW_FIELD_SPELL
,
dataManager
.
GetSysString
(
1283
));
chk
MusicMode
->
setChecked
(
gameConf
.
music_mode
!=
0
);
chk
DrawFieldSpell
->
setChecked
(
gameConf
.
draw_field_spell
!=
0
);
posY
+=
40
*
yScale
;
posY
+=
40
*
yScale
;
chkEnableSound
=
env
->
addCheckBox
(
gameConf
.
enable_sound
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_ENABLE_SOUND
,
dataManager
.
GetSysString
(
1279
));
chkDrawSingleChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_DRAW_SINGLE_CHAIN
,
dataManager
.
GetSysString
(
1287
));
chkEnableSound
->
setChecked
(
gameConf
.
enable_sound
);
chkDrawSingleChain
->
setChecked
(
gameConf
.
draw_single_chain
!=
0
);
scrSoundVolume
=
env
->
addScrollBar
(
true
,
rect
<
s32
>
(
posX
+
110
*
xScale
,
posY
,
posX
+
250
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
SCROLL_VOLUME
);
scrSoundVolume
->
setMax
(
100
);
scrSoundVolume
->
setMin
(
0
);
scrSoundVolume
->
setPos
(
gameConf
.
sound_volume
);
scrSoundVolume
->
setLargeStep
(
1
);
scrSoundVolume
->
setSmallStep
(
1
);
posY
+=
40
*
yScale
;
posY
+=
40
*
yScale
;
chkEnableMusic
=
env
->
addCheckBox
(
gameConf
.
enable_music
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_ENABLE_MUSIC
,
dataManager
.
GetSysString
(
1280
));
chkLFlist
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
100
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_LFLIST
,
dataManager
.
GetSysString
(
1288
));
chkEnableMusic
->
setChecked
(
gameConf
.
enable_music
);
chkLFlist
->
setChecked
(
gameConf
.
use_lflist
);
scrMusicVolume
=
env
->
addScrollBar
(
true
,
rect
<
s32
>
(
posX
+
110
*
xScale
,
posY
,
posX
+
250
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
SCROLL_VOLUME
);
cbLFlist
=
CAndroidGUIComboBox
::
addAndroidComboBox
(
env
,
rect
<
s32
>
(
posX
+
110
*
xScale
,
posY
,
posX
+
230
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
COMBOBOX_LFLIST
);
scrMusicVolume
->
setMax
(
100
);
cbLFlist
->
setMaxSelectionRows
(
6
);
scrMusicVolume
->
setMin
(
0
);
for
(
unsigned
int
i
=
0
;
i
<
deckManager
.
_lfList
.
size
();
++
i
)
scrMusicVolume
->
setPos
(
gameConf
.
music_volume
);
cbLFlist
->
addItem
(
deckManager
.
_lfList
[
i
].
listName
.
c_str
()
);
scrMusicVolume
->
setLargeStep
(
1
);
cbLFlist
->
setEnabled
(
gameConf
.
use_lflist
);
scrMusicVolume
->
setSmallStep
(
1
);
cbLFlist
->
setSelected
(
gameConf
.
use_lflist
?
gameConf
.
default_lflist
:
cbLFlist
->
getItemCount
()
-
1
);
posX
=
2
4
0
*
xScale
;
//another Column
posX
=
2
5
0
*
xScale
;
//another Column
posY
=
40
*
yScale
;
posY
=
40
*
yScale
;
chkIgnore1
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_DISABLE_CHAT
,
dataManager
.
GetSysString
(
1290
));
chkIgnore1
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_DISABLE_CHAT
,
dataManager
.
GetSysString
(
1290
));
chkIgnore1
->
setChecked
(
gameConf
.
chkIgnore1
!=
0
);
chkIgnore1
->
setChecked
(
gameConf
.
chkIgnore1
!=
0
);
...
@@ -598,26 +595,34 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
...
@@ -598,26 +595,34 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
chkAutoSaveReplay
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
-
1
,
dataManager
.
GetSysString
(
1366
));
chkAutoSaveReplay
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
-
1
,
dataManager
.
GetSysString
(
1366
));
chkAutoSaveReplay
->
setChecked
(
gameConf
.
auto_save_replay
!=
0
);
chkAutoSaveReplay
->
setChecked
(
gameConf
.
auto_save_replay
!=
0
);
posY
+=
40
*
yScale
;
posY
+=
40
*
yScale
;
chkDrawFieldSpell
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_DRAW_FIELD_SPELL
,
dataManager
.
GetSysString
(
1283
));
chkDrawFieldSpell
->
setChecked
(
gameConf
.
draw_field_spell
!=
0
);
posY
+=
40
*
yScale
;
chkDrawSingleChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_DRAW_SINGLE_CHAIN
,
dataManager
.
GetSysString
(
1287
));
chkDrawSingleChain
->
setChecked
(
gameConf
.
draw_single_chain
!=
0
);
posY
+=
40
*
yScale
;
chkPreferExpansionScript
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
280
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_PREFER_EXPANSION
,
dataManager
.
GetSysString
(
1379
));
chkPreferExpansionScript
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
280
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_PREFER_EXPANSION
,
dataManager
.
GetSysString
(
1379
));
chkPreferExpansionScript
->
setChecked
(
gameConf
.
prefer_expansion_script
!=
0
);
chkPreferExpansionScript
->
setChecked
(
gameConf
.
prefer_expansion_script
!=
0
);
posY
+=
40
*
yScale
;
posY
+=
40
*
yScale
;
chkLFlist
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
+
40
*
xScale
,
posY
,
posX
+
140
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_LFLIST
,
dataManager
.
GetSysString
(
1288
));
chkMusicMode
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
-
1
,
dataManager
.
GetSysString
(
1281
));
chkLFlist
->
setChecked
(
gameConf
.
use_lflist
);
chkMusicMode
->
setChecked
(
gameConf
.
music_mode
!=
0
);
cbLFlist
=
CAndroidGUIComboBox
::
addAndroidComboBox
(
env
,
rect
<
s32
>
(
posX
+
150
*
xScale
,
posY
,
posX
+
290
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
COMBOBOX_LFLIST
);
posY
+=
40
*
yScale
;
cbLFlist
->
setMaxSelectionRows
(
6
);
chkEnableSound
=
env
->
addCheckBox
(
gameConf
.
enable_sound
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
100
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_ENABLE_SOUND
,
dataManager
.
GetSysString
(
1279
));
for
(
unsigned
int
i
=
0
;
i
<
deckManager
.
_lfList
.
size
();
++
i
)
chkEnableSound
->
setChecked
(
gameConf
.
enable_sound
);
cbLFlist
->
addItem
(
deckManager
.
_lfList
[
i
].
listName
.
c_str
());
scrSoundVolume
=
env
->
addScrollBar
(
true
,
rect
<
s32
>
(
posX
+
110
*
xScale
,
posY
,
posX
+
280
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
SCROLL_VOLUME
);
cbLFlist
->
setEnabled
(
gameConf
.
use_lflist
);
scrSoundVolume
->
setMax
(
100
);
cbLFlist
->
setSelected
(
gameConf
.
use_lflist
?
gameConf
.
default_lflist
:
cbLFlist
->
getItemCount
()
-
1
);
scrSoundVolume
->
setMin
(
0
);
elmTabSystemLast
=
chkLFlist
;
scrSoundVolume
->
setPos
(
gameConf
.
sound_volume
);
btnCloseSettings
=
env
->
addButton
(
rect
<
s32
>
(
450
*
xScale
,
350
*
yScale
,
560
*
xScale
,
400
*
yScale
),
wSettings
,
BUTTON_CLOSE_SETTINGS
,
dataManager
.
GetSysString
(
1211
));
scrSoundVolume
->
setLargeStep
(
1
);
ChangeToIGUIImageButton
(
btnCloseSettings
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
scrSoundVolume
->
setSmallStep
(
1
);
posY
+=
40
*
yScale
;
chkEnableMusic
=
env
->
addCheckBox
(
gameConf
.
enable_music
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
100
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
CHECKBOX_ENABLE_MUSIC
,
dataManager
.
GetSysString
(
1280
));
chkEnableMusic
->
setChecked
(
gameConf
.
enable_music
);
scrMusicVolume
=
env
->
addScrollBar
(
true
,
rect
<
s32
>
(
posX
+
110
*
xScale
,
posY
,
posX
+
280
*
xScale
,
posY
+
30
*
yScale
),
wSettings
,
SCROLL_VOLUME
);
scrMusicVolume
->
setMax
(
100
);
scrMusicVolume
->
setMin
(
0
);
scrMusicVolume
->
setPos
(
gameConf
.
music_volume
);
scrMusicVolume
->
setLargeStep
(
1
);
scrMusicVolume
->
setSmallStep
(
1
);
elmTabSystemLast
=
chkEnableMusic
;
btnCloseSettings
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
500
*
xScale
,
30
*
yScale
,
550
*
xScale
,
80
*
yScale
),
wSettings
,
BUTTON_CLOSE_SETTINGS
);
btnCloseSettings
->
setImageSize
(
core
::
dimension2di
(
50
*
yScale
,
50
*
yScale
));
btnCloseSettings
->
setDrawBorder
(
false
);
btnCloseSettings
->
setImage
(
imageManager
.
tClose
);
//
//
wHand
=
env
->
addWindow
(
rect
<
s32
>
(
500
*
xScale
,
450
*
yScale
,
825
*
xScale
,
605
*
yScale
),
false
,
L""
);
wHand
=
env
->
addWindow
(
rect
<
s32
>
(
500
*
xScale
,
450
*
yScale
,
825
*
xScale
,
605
*
yScale
),
false
,
L""
);
wHand
->
getCloseButton
()
->
setVisible
(
false
);
wHand
->
getCloseButton
()
->
setVisible
(
false
);
...
@@ -1812,7 +1817,7 @@ void Game::SaveConfig() {
...
@@ -1812,7 +1817,7 @@ void Game::SaveConfig() {
gameConf
.
music_volume
=
(
double
)
scrMusicVolume
->
getPos
();
gameConf
.
music_volume
=
(
double
)
scrMusicVolume
->
getPos
();
android
::
saveIntSetting
(
appMain
,
"music_volume"
,
gameConf
.
music_volume
);
android
::
saveIntSetting
(
appMain
,
"music_volume"
,
gameConf
.
music_volume
);
gameConf
.
use_lflist
=
chkLFlist
->
isChecked
()
?
1
:
0
;
gameConf
.
use_lflist
=
chkLFlist
->
isChecked
()
?
1
:
0
;
android
::
saveIntSetting
(
appMain
,
"use_lflist"
,
gameConf
.
music_mode
);
android
::
saveIntSetting
(
appMain
,
"use_lflist"
,
gameConf
.
use_lflist
);
//gameConf.control_mode = control_mode->isChecked()?1:0;
//gameConf.control_mode = control_mode->isChecked()?1:0;
// android::saveIntSetting(appMain, "control_mode", gameConf.control_mode);
// android::saveIntSetting(appMain, "control_mode", gameConf.control_mode);
}
}
...
...
Classes/gframe/game.h
View file @
b078f4d7
...
@@ -134,8 +134,6 @@ public:
...
@@ -134,8 +134,6 @@ public:
void
stopBGM
();
void
stopBGM
();
void
playBGM
();
void
playBGM
();
bool
Initialize
(
ANDROID_APP
app
,
android
::
InitOptions
*
options
);
bool
Initialize
(
ANDROID_APP
app
,
android
::
InitOptions
*
options
);
#else
bool
Initialize
();
#endif
#endif
void
MainLoop
();
void
MainLoop
();
void
RefreshTimeDisplay
();
void
RefreshTimeDisplay
();
...
@@ -291,7 +289,7 @@ public:
...
@@ -291,7 +289,7 @@ public:
irr
::
gui
::
CGUIImageButton
*
imgSettings
;
irr
::
gui
::
CGUIImageButton
*
imgSettings
;
irr
::
gui
::
IGUIWindow
*
wSettings
;
irr
::
gui
::
IGUIWindow
*
wSettings
;
irr
::
gui
::
IGUIImage
*
bgSettings
;
irr
::
gui
::
IGUIImage
*
bgSettings
;
irr
::
gui
::
IGUI
Button
*
btnCloseSettings
;
//
irr
::
gui
::
CGUIImage
Button
*
btnCloseSettings
;
//
//hint text
//hint text
irr
::
gui
::
IGUIStaticText
*
stHintMsg
;
irr
::
gui
::
IGUIStaticText
*
stHintMsg
;
irr
::
gui
::
IGUIStaticText
*
stTip
;
irr
::
gui
::
IGUIStaticText
*
stTip
;
...
@@ -379,7 +377,7 @@ public:
...
@@ -379,7 +377,7 @@ public:
irr
::
gui
::
IGUIButton
*
btnHostPrepOB
;
//
irr
::
gui
::
IGUIButton
*
btnHostPrepOB
;
//
irr
::
gui
::
IGUIStaticText
*
stHostPrepDuelist
[
4
];
irr
::
gui
::
IGUIStaticText
*
stHostPrepDuelist
[
4
];
irr
::
gui
::
IGUICheckBox
*
chkHostPrepReady
[
4
];
irr
::
gui
::
IGUICheckBox
*
chkHostPrepReady
[
4
];
irr
::
gui
::
IGUI
Button
*
btnHostPrepKick
[
4
];
//
irr
::
gui
::
CGUIImage
Button
*
btnHostPrepKick
[
4
];
//
irr
::
gui
::
IGUIComboBox
*
cbCategorySelect
;
irr
::
gui
::
IGUIComboBox
*
cbCategorySelect
;
irr
::
gui
::
IGUIComboBox
*
cbDeckSelect
;
irr
::
gui
::
IGUIComboBox
*
cbDeckSelect
;
irr
::
gui
::
IGUIStaticText
*
stHostPrepRule
;
irr
::
gui
::
IGUIStaticText
*
stHostPrepRule
;
...
...
Classes/gframe/image_manager.cpp
View file @
b078f4d7
...
@@ -50,6 +50,7 @@ bool ImageManager::Initial(const path dir) {
...
@@ -50,6 +50,7 @@ bool ImageManager::Initial(const path dir) {
tPlay
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/tplay.png"
)).
c_str
());
tPlay
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/tplay.png"
)).
c_str
());
tTalk
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/ttalk.png"
)).
c_str
());
tTalk
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/ttalk.png"
)).
c_str
());
tShut
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/tshut.png"
)).
c_str
());
tShut
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/tshut.png"
)).
c_str
());
tClose
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/tclose.png"
)).
c_str
());
tTitleBar
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/stitlebar.png"
)).
c_str
());
tTitleBar
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/stitlebar.png"
)).
c_str
());
tWindow
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/sWindow.png"
)).
c_str
());
tWindow
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/sWindow.png"
)).
c_str
());
tWindow_V
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/sWindow_V.png"
)).
c_str
());
tWindow_V
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/sWindow_V.png"
)).
c_str
());
...
...
Classes/gframe/image_manager.h
View file @
b078f4d7
...
@@ -65,6 +65,7 @@ public:
...
@@ -65,6 +65,7 @@ public:
irr
::
video
::
ITexture
*
tPlay
;
irr
::
video
::
ITexture
*
tPlay
;
irr
::
video
::
ITexture
*
tTalk
;
irr
::
video
::
ITexture
*
tTalk
;
irr
::
video
::
ITexture
*
tShut
;
irr
::
video
::
ITexture
*
tShut
;
irr
::
video
::
ITexture
*
tClose
;
irr
::
video
::
ITexture
*
tTitleBar
;
irr
::
video
::
ITexture
*
tTitleBar
;
irr
::
video
::
ITexture
*
tWindow
;
irr
::
video
::
ITexture
*
tWindow
;
irr
::
video
::
ITexture
*
tWindow_V
;
irr
::
video
::
ITexture
*
tWindow_V
;
...
...
Classes/gframe/menu_handler.cpp
View file @
b078f4d7
...
@@ -338,6 +338,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -338,6 +338,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
int
extra
=
replay
.
ReadInt32
();
int
extra
=
replay
.
ReadInt32
();
for
(
int
j
=
0
;
j
<
extra
;
++
j
)
for
(
int
j
=
0
;
j
<
extra
;
++
j
)
tmp_deck
.
extra
.
push_back
(
dataManager
.
GetCodePointer
(
replay
.
ReadInt32
()));
tmp_deck
.
extra
.
push_back
(
dataManager
.
GetCodePointer
(
replay
.
ReadInt32
()));
FileSystem
::
SafeFileName
(
namebuf
[
i
]);
myswprintf
(
filename
,
L"deck/%ls-%d %ls.ydk"
,
ex_filename
,
i
+
1
,
namebuf
[
i
]);
myswprintf
(
filename
,
L"deck/%ls-%d %ls.ydk"
,
ex_filename
,
i
+
1
,
namebuf
[
i
]);
deckManager
.
SaveDeck
(
tmp_deck
,
filename
);
deckManager
.
SaveDeck
(
tmp_deck
,
filename
);
}
}
...
@@ -345,7 +346,6 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -345,7 +346,6 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
break
;
break
;
}
}
//TEST BOT MODE
case
BUTTON_BOT_START
:
{
case
BUTTON_BOT_START
:
{
int
sel
=
mainGame
->
lstBotList
->
getSelected
();
int
sel
=
mainGame
->
lstBotList
->
getSelected
();
if
(
sel
==
-
1
)
if
(
sel
==
-
1
)
...
...
Classes/gframe/myfilesystem.h
View file @
b078f4d7
...
@@ -19,6 +19,11 @@
...
@@ -19,6 +19,11 @@
class
FileSystem
{
class
FileSystem
{
public:
public:
static
void
SafeFileName
(
wchar_t
*
wfile
)
{
while
((
wfile
=
wcspbrk
(
wfile
,
L"<>:
\"
/
\\
|?*"
))
!=
NULL
)
*
wfile
++
=
'_'
;
}
static
bool
IsFileExists
(
const
wchar_t
*
wfile
)
{
static
bool
IsFileExists
(
const
wchar_t
*
wfile
)
{
DWORD
attr
=
GetFileAttributesW
(
wfile
);
DWORD
attr
=
GetFileAttributesW
(
wfile
);
return
attr
!=
INVALID_FILE_ATTRIBUTES
&&
!
(
attr
&
FILE_ATTRIBUTE_DIRECTORY
);
return
attr
!=
INVALID_FILE_ATTRIBUTES
&&
!
(
attr
&
FILE_ATTRIBUTE_DIRECTORY
);
...
@@ -112,6 +117,11 @@ public:
...
@@ -112,6 +117,11 @@ public:
class
FileSystem
{
class
FileSystem
{
public:
public:
static
void
SafeFileName
(
wchar_t
*
wfile
)
{
while
((
wfile
=
wcspbrk
(
wfile
,
L"/"
))
!=
NULL
)
*
wfile
++
=
'_'
;
}
static
bool
IsFileExists
(
const
char
*
file
)
{
static
bool
IsFileExists
(
const
char
*
file
)
{
struct
stat
fileStat
;
struct
stat
fileStat
;
return
(
stat
(
file
,
&
fileStat
)
==
0
)
&&
!
S_ISDIR
(
fileStat
.
st_mode
);
return
(
stat
(
file
,
&
fileStat
)
==
0
)
&&
!
S_ISDIR
(
fileStat
.
st_mode
);
...
...
mobile/assets/changelog.html
View file @
b078f4d7
...
@@ -16,15 +16,23 @@
...
@@ -16,15 +16,23 @@
特别感谢: 尸体233,废话多,大毛,幻兽L 的支持与努力.
特别感谢: 尸体233,废话多,大毛,幻兽L 的支持与努力.
</pre>
</pre>
<ul>
<ul>
<li
style=
"color:#ffff00"
>
3.8.
7
</li>
<li
style=
"color:#ffff00"
>
3.8.
8
</li>
</ul>
</ul>
<pre>
<pre>
更新:
更新:
1.更新ygo内核;
1.更新ygo内核;
2.新卡1106+KICO+VJ;
2.新卡SR12+T1105+DBGC+VJ;
3.新增残局lua文件用本app打开进入对局;
3.升级ygopro版本号为1035.3;
4.新增录像yrp文件用本app打开进入观看;
4.卡池添加简中归属分类;
5.新增发送yrp文件到QQ微信等应用;
5.先行卡补丁可以在列表中选择删除;
6.查看大卡图时长按支持分享那张卡图;
7.分享卡组时支持分享ydk文件;
变更:
1.修正相同玩家ID的录像只能提取一方的问题;
2.退出ygopro时如果mobile进程被杀则重新唤醒;
3.修正不通过本软件替换数据库而导致的卡组编辑闪退问题;
4.卡组编辑增加一些新手引导;
5.ygopro的禁卡表设置从卡组管理移到设置。
</pre>
</pre>
<h3
style=
"color:#ff0000"
>
注意
</h3>
<h3
style=
"color:#ff0000"
>
注意
</h3>
<pre>
<pre>
...
...
mobile/assets/data/textures/extra/tclose.png
0 → 100644
View file @
b078f4d7
6.51 KB
mobile/build.gradle
View file @
b078f4d7
...
@@ -9,8 +9,8 @@ android {
...
@@ -9,8 +9,8 @@ android {
minSdkVersion
21
minSdkVersion
21
//noinspection ExpiredTargetSdkVersion
//noinspection ExpiredTargetSdkVersion
targetSdkVersion
29
targetSdkVersion
29
versionCode
3
90901604
versionCode
3
80800907
versionName
"3.
9.9
"
versionName
"3.
8.8
"
flavorDimensions
"versionCode"
flavorDimensions
"versionCode"
vectorDrawables
.
useSupportLibrary
=
true
vectorDrawables
.
useSupportLibrary
=
true
ndk
{
ndk
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerActivity.java
View file @
b078f4d7
...
@@ -157,9 +157,9 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -157,9 +157,9 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
$
(
R
.
id
.
btn_nav_list
).
setOnClickListener
((
v
)
->
doMenu
(
R
.
id
.
action_card_list
));
$
(
R
.
id
.
btn_nav_list
).
setOnClickListener
((
v
)
->
doMenu
(
R
.
id
.
action_card_list
));
//
//
final
File
_file
;
final
File
_file
;
//
打开指定卡组
//
打开指定卡组
if
(!
TextUtils
.
isEmpty
(
preLoadFile
)
&&
(
mPreLoadFile
=
new
File
(
preLoadFile
)).
exists
())
{
if
(!
TextUtils
.
isEmpty
(
preLoadFile
)
&&
(
mPreLoadFile
=
new
File
(
preLoadFile
)).
exists
())
{
//
外面卡组
//
外面卡组
_file
=
mPreLoadFile
;
_file
=
mPreLoadFile
;
}
else
{
}
else
{
mPreLoadFile
=
null
;
mPreLoadFile
=
null
;
...
@@ -167,7 +167,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -167,7 +167,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
if
(
TextUtils
.
isEmpty
(
path
)){
if
(
TextUtils
.
isEmpty
(
path
)){
_file
=
null
;
_file
=
null
;
}
else
{
}
else
{
//
最后卡组
//
最后卡组
_file
=
new
File
(
path
);
_file
=
new
File
(
path
);
}
}
}
}
...
@@ -260,13 +260,13 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -260,13 +260,13 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
DialogPlus
dlg
=
DialogPlus
.
show
(
this
,
null
,
getString
(
R
.
string
.
loading
));
DialogPlus
dlg
=
DialogPlus
.
show
(
this
,
null
,
getString
(
R
.
string
.
loading
));
VUiKit
.
defer
().
when
(()
->
{
VUiKit
.
defer
().
when
(()
->
{
DataManager
.
get
().
load
(
true
);
DataManager
.
get
().
load
(
true
);
//
默认第一个卡表
//
默认第一个卡表
if
(
mLimitManager
.
getCount
()
>
0
)
{
if
(
mLimitManager
.
getCount
()
>
0
)
{
mCardLoader
.
setLimitList
(
mLimitManager
.
getTopLimit
());
mCardLoader
.
setLimitList
(
mLimitManager
.
getTopLimit
());
}
}
File
file
=
ydk
;
File
file
=
ydk
;
if
(
file
==
null
||
!
file
.
exists
())
{
if
(
file
==
null
||
!
file
.
exists
())
{
//
当默认卡组不存在的时候
//
当默认卡组不存在的时候
List
<
File
>
files
=
getYdkFiles
();
List
<
File
>
files
=
getYdkFiles
();
if
(
files
!=
null
&&
files
.
size
()
>
0
)
{
if
(
files
!=
null
&&
files
.
size
()
>
0
)
{
file
=
files
.
get
(
0
);
file
=
files
.
get
(
0
);
...
@@ -288,15 +288,15 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -288,15 +288,15 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
mCardSelector
.
initItems
();
mCardSelector
.
initItems
();
initLimitListSpinners
(
mLimitSpinner
,
mCardLoader
.
getLimitList
());
initLimitListSpinners
(
mLimitSpinner
,
mCardLoader
.
getLimitList
());
initDecksListSpinners
(
mDeckSpinner
,
rs
.
source
);
initDecksListSpinners
(
mDeckSpinner
,
rs
.
source
);
//
设置当前卡组
//
设置当前卡组
setCurDeck
(
rs
);
setCurDeck
(
rs
);
//
设置收藏夹
//
设置收藏夹
mCardSelector
.
showFavorites
(
false
);
mCardSelector
.
showFavorites
(
false
);
});
});
}
}
/**
/**
*
设置当前卡组
*
设置当前卡组
*/
*/
private
void
setCurDeck
(
DeckInfo
deckInfo
)
{
private
void
setCurDeck
(
DeckInfo
deckInfo
)
{
if
(
deckInfo
==
null
)
{
if
(
deckInfo
==
null
)
{
...
@@ -307,7 +307,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -307,7 +307,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
String
name
=
IOUtils
.
tirmName
(
file
.
getName
(),
Constants
.
YDK_FILE_EX
);
String
name
=
IOUtils
.
tirmName
(
file
.
getName
(),
Constants
.
YDK_FILE_EX
);
setActionBarSubTitle
(
name
);
setActionBarSubTitle
(
name
);
// if (inDeckDir(file)) {
// if (inDeckDir(file)) {
//
记住最后打开的卡组
//
记住最后打开的卡组
mSettings
.
setLastDeckPath
(
file
.
getAbsolutePath
());
mSettings
.
setLastDeckPath
(
file
.
getAbsolutePath
());
tv_deck
.
setText
(
name
);
tv_deck
.
setText
(
name
);
...
@@ -383,7 +383,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -383,7 +383,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
@Override
@Override
public
void
onItemDoubleClick
(
View
view
,
int
pos
)
{
public
void
onItemDoubleClick
(
View
view
,
int
pos
)
{
//
拖拽中,就不显示
//
拖拽中,就不显示
if
(
isShowDrawer
())
{
if
(
isShowDrawer
())
{
return
;
return
;
}
}
...
@@ -627,7 +627,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -627,7 +627,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
// mDeckAdapater.notifyDataSetChanged();
// mDeckAdapater.notifyDataSetChanged();
// break;
// break;
case
R
.
id
.
action_search
:
case
R
.
id
.
action_search
:
//
弹条件对话框
//
弹条件对话框
showSearch
(
true
);
showSearch
(
true
);
break
;
break
;
case
R
.
id
.
action_card_list
:
case
R
.
id
.
action_card_list
:
...
@@ -642,7 +642,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -642,7 +642,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
break
;
break
;
case
R
.
id
.
action_save
:
case
R
.
id
.
action_save
:
if
(
mPreLoadFile
!=
null
&&
mPreLoadFile
==
mDeckAdapater
.
getYdkFile
())
{
if
(
mPreLoadFile
!=
null
&&
mPreLoadFile
==
mDeckAdapater
.
getYdkFile
())
{
//
需要保存到deck文件夹
//
需要保存到deck文件夹
inputDeckName
(
mPreLoadFile
,
null
,
true
);
inputDeckName
(
mPreLoadFile
,
null
,
true
);
}
else
{
}
else
{
if
(
mDeckAdapater
.
getYdkFile
()
==
null
)
{
if
(
mDeckAdapater
.
getYdkFile
()
==
null
)
{
...
@@ -709,7 +709,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -709,7 +709,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
}
}
break
;
break
;
case
R
.
id
.
action_unsort
:
case
R
.
id
.
action_unsort
:
//
打乱
//
打乱
mDeckAdapater
.
unSort
();
mDeckAdapater
.
unSort
();
break
;
break
;
case
R
.
id
.
action_sort
:
case
R
.
id
.
action_sort
:
...
@@ -729,7 +729,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -729,7 +729,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
builder
.
setMessageGravity
(
Gravity
.
CENTER_HORIZONTAL
);
builder
.
setMessageGravity
(
Gravity
.
CENTER_HORIZONTAL
);
builder
.
setLeftButtonListener
((
dlg
,
rs
)
->
{
builder
.
setLeftButtonListener
((
dlg
,
rs
)
->
{
dlg
.
dismiss
();
dlg
.
dismiss
();
//
复制当前卡组
//
复制当前卡组
inputDeckName
(
old
,
savePath
,
true
);
inputDeckName
(
old
,
savePath
,
true
);
});
});
builder
.
setRightButtonListener
((
dlg
,
rs
)
->
{
builder
.
setRightButtonListener
((
dlg
,
rs
)
->
{
...
@@ -757,11 +757,11 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -757,11 +757,11 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
builderShareLoading
.
setMessage
(
R
.
string
.
Pre_share
);
builderShareLoading
.
setMessage
(
R
.
string
.
Pre_share
);
builderShareLoading
.
show
();
builderShareLoading
.
show
();
//
先排序
//
先排序
// mDeckAdapater.sort();
// mDeckAdapater.sort();
//
保存
//
保存
// if (mPreLoadFile != null && mPreLoadFile == mDeckAdapater.getYdkFile()) {
// if (mPreLoadFile != null && mPreLoadFile == mDeckAdapater.getYdkFile()) {
// //
需要保存到deck文件夹
// //
需要保存到deck文件夹
// inputDeckName(mPreLoadFile, null, true);
// inputDeckName(mPreLoadFile, null, true);
// } else {
// } else {
// if (mDeckAdapater.getYdkFile() == null) {
// if (mDeckAdapater.getYdkFile() == null) {
...
@@ -770,27 +770,27 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -770,27 +770,27 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
// save(mDeckAdapater.getYdkFile());
// save(mDeckAdapater.getYdkFile());
// }
// }
// }
// }
// //
保存成功后重新加载卡组
// //
保存成功后重新加载卡组
// File file = getSelectDeck(mDeckSpinner);
// File file = getSelectDeck(mDeckSpinner);
// if (file != null) {
// if (file != null) {
// loadDeckFromFile(file);
// loadDeckFromFile(file);
// }
// }
//
延时半秒,使整体看起来更流畅
//
延时半秒,使整体看起来更流畅
new
Handler
().
postDelayed
(
this
::
shareDeck1
,
500
);
new
Handler
().
postDelayed
(
this
::
shareDeck1
,
500
);
}
}
private
void
shareDeck1
()
{
private
void
shareDeck1
()
{
//
开启绘图缓存
//
开启绘图缓存
mRecyclerView
.
setDrawingCacheEnabled
(
true
);
mRecyclerView
.
setDrawingCacheEnabled
(
true
);
//
这个方法可调可不调,因为在getDrawingCache()里会自动判断有没有缓存有没有准备好,
//
这个方法可调可不调,因为在getDrawingCache()里会自动判断有没有缓存有没有准备好,
//
如果没有,会自动调用build
DrawingCache()
//
如果没有,会自动调用
buildDrawingCache()
mRecyclerView
.
buildDrawingCache
();
mRecyclerView
.
buildDrawingCache
();
//
获取绘图缓存 这里直接创建了一个新的bitmap
//
获取绘图缓存 这里直接创建了一个新的b
itmap
//
因为我们在最后需要释放缓存资源,会释放掉缓存中创建的bitmap对象
//
因为我们在最后需要释放缓存资源,会释放掉缓存中创建的bitmap对象
Bitmap
bitmap
=
BitmapUtil
.
drawBg4Bitmap
(
Color
.
parseColor
(
"#e6f3fd"
),
Bitmap
.
createBitmap
(
mRecyclerView
.
getDrawingCache
(),
0
,
0
,
mRecyclerView
.
getMeasuredWidth
(),
Bitmap
bitmap
=
BitmapUtil
.
drawBg4Bitmap
(
Color
.
parseColor
(
"#e6f3fd"
),
Bitmap
.
createBitmap
(
mRecyclerView
.
getDrawingCache
(),
0
,
0
,
mRecyclerView
.
getMeasuredWidth
(),
mRecyclerView
.
getMeasuredHeight
()));
mRecyclerView
.
getMeasuredHeight
()));
//
清理绘图缓存,释放资源
//
清理绘图缓存,释放资源
mRecyclerView
.
destroyDrawingCache
();
mRecyclerView
.
destroyDrawingCache
();
// shotRecyclerView(mRecyclerView)
// shotRecyclerView(mRecyclerView)
...
@@ -817,7 +817,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -817,7 +817,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
stopService
(
new
Intent
(
this
,
DuelAssistantService
.
class
));
stopService
(
new
Intent
(
this
,
DuelAssistantService
.
class
));
YGOUtil
.
copyMessage
(
this
,
et_code
.
getText
().
toString
().
trim
());
YGOUtil
.
copyMessage
(
this
,
et_code
.
getText
().
toString
().
trim
());
showToast
(
getString
(
R
.
string
.
deck_text_copyed
));
showToast
(
getString
(
R
.
string
.
deck_text_copyed
));
//
复制完毕开启决斗助手
//
复制完毕开启决斗助手
YGOUtil
.
startDuelService
(
this
);
YGOUtil
.
startDuelService
(
this
);
});
});
...
@@ -844,7 +844,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -844,7 +844,7 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
});
});
//
复制前关闭决斗助手
//
复制前关闭决斗助手
// String label = TextUtils.isEmpty(deck.getName()) ? getString(R.string.share_deck) : deck.getName();
// String label = TextUtils.isEmpty(deck.getName()) ? getString(R.string.share_deck) : deck.getName();
...
@@ -1075,9 +1075,9 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
...
@@ -1075,9 +1075,9 @@ public class DeckManagerActivity extends BaseCardsActivity implements RecyclerVi
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_sort
,
R
.
string
.
sort
,
R
.
drawable
.
sort
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_sort
,
R
.
string
.
sort
,
R
.
drawable
.
sort
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_deck_backup_n_restore
,
R
.
string
.
deck_backup_n_restore
,
R
.
drawable
.
downloadimages
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_deck_backup_n_restore
,
R
.
string
.
deck_backup_n_restore
,
R
.
drawable
.
downloadimages
);
//
设置展开或隐藏的延时。 默认值为 800ms。
//
设置展开或隐藏的延时。 默认值为 800ms。
menu
.
setDuration
(
150
);
menu
.
setDuration
(
150
);
//
设置每两个子按钮之间动画的延时(ms为单位)。 比如,如果延时设为0,那么所有子按钮都会同时展开或隐藏,默认值为100ms。
//
设置每两个子按钮之间动画的延时(ms为单位)。 比如,如果延时设为0,那么所有子按钮都会同时展开或隐藏,默认值为100ms。
menu
.
setDelay
(
10
);
menu
.
setDelay
(
10
);
menu
.
setOnBoomListener
(
new
DefaultOnBoomListener
()
{
menu
.
setOnBoomListener
(
new
DefaultOnBoomListener
()
{
...
...
mobile/src/main/java/ocgcore/StringManager.java
View file @
b078f4d7
...
@@ -82,9 +82,9 @@ public class StringManager implements Closeable {
...
@@ -82,9 +82,9 @@ public class StringManager implements Closeable {
InputStreamReader
in
=
null
;
InputStreamReader
in
=
null
;
try
{
try
{
in
=
new
InputStreamReader
(
inputStream
,
"utf-8"
);
in
=
new
InputStreamReader
(
inputStream
,
StandardCharsets
.
UTF_8
);
BufferedReader
reader
=
new
BufferedReader
(
in
);
BufferedReader
reader
=
new
BufferedReader
(
in
);
String
line
=
null
;
String
line
;
while
((
line
=
reader
.
readLine
())
!=
null
)
{
while
((
line
=
reader
.
readLine
())
!=
null
)
{
if
(
line
.
startsWith
(
"#"
)
||
(!
line
.
startsWith
(
PRE_SYSTEM
)
&&
!
line
.
startsWith
(
PRE_SETNAME
)))
{
if
(
line
.
startsWith
(
"#"
)
||
(!
line
.
startsWith
(
PRE_SYSTEM
)
&&
!
line
.
startsWith
(
PRE_SETNAME
)))
{
continue
;
continue
;
...
@@ -133,7 +133,7 @@ public class StringManager implements Closeable {
...
@@ -133,7 +133,7 @@ public class StringManager implements Closeable {
inputStream
=
new
FileInputStream
(
file
);
inputStream
=
new
FileInputStream
(
file
);
in
=
new
InputStreamReader
(
inputStream
,
StandardCharsets
.
UTF_8
);
in
=
new
InputStreamReader
(
inputStream
,
StandardCharsets
.
UTF_8
);
BufferedReader
reader
=
new
BufferedReader
(
in
);
BufferedReader
reader
=
new
BufferedReader
(
in
);
String
line
=
null
;
String
line
;
while
((
line
=
reader
.
readLine
())
!=
null
)
{
while
((
line
=
reader
.
readLine
())
!=
null
)
{
if
(
line
.
startsWith
(
"#"
)
||
(!
line
.
startsWith
(
PRE_SYSTEM
)
&&
!
line
.
startsWith
(
PRE_SETNAME
)))
{
if
(
line
.
startsWith
(
"#"
)
||
(!
line
.
startsWith
(
PRE_SYSTEM
)
&&
!
line
.
startsWith
(
PRE_SETNAME
)))
{
continue
;
continue
;
...
...
mobile/src/main/java/ocgcore/data/Card.java
View file @
b078f4d7
...
@@ -4,6 +4,8 @@ package ocgcore.data;
...
@@ -4,6 +4,8 @@ package ocgcore.data;
import
android.os.Parcel
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
android.os.Parcelable
;
import
androidx.annotation.NonNull
;
import
ocgcore.enums.CardType
;
import
ocgcore.enums.CardType
;
public
class
Card
extends
CardData
implements
Parcelable
{
public
class
Card
extends
CardData
implements
Parcelable
{
...
@@ -137,6 +139,7 @@ public class Card extends CardData implements Parcelable {
...
@@ -137,6 +139,7 @@ public class Card extends CardData implements Parcelable {
return
c
.
Code
==
this
.
Code
||
c
.
Alias
==
this
.
Code
||
c
.
Code
==
this
.
Alias
;
return
c
.
Code
==
this
.
Code
||
c
.
Alias
==
this
.
Code
||
c
.
Code
==
this
.
Alias
;
}
}
@NonNull
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"Card{"
+
return
"Card{"
+
...
...
mobile/src/main/java/ocgcore/data/CardData.java
View file @
b078f4d7
...
@@ -3,10 +3,9 @@ package ocgcore.data;
...
@@ -3,10 +3,9 @@ package ocgcore.data;
import
android.os.Parcel
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
android.os.Parcelable
;
import
ocgcore.enums.CardAttribute
;
import
androidx.annotation.NonNull
;
import
ocgcore.enums.CardOt
;
public
class
CardData
implements
Parcelable
{
public
class
CardData
implements
Parcelable
{
public
CardData
()
{
public
CardData
()
{
}
}
...
@@ -28,6 +27,7 @@ public class CardData implements Parcelable{
...
@@ -28,6 +27,7 @@ public class CardData implements Parcelable{
public
int
RightScale
;
public
int
RightScale
;
public
long
Category
;
public
long
Category
;
@NonNull
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"CardData{"
+
return
"CardData{"
+
...
...
mobile/src/main/res/drawable-xhdpi/ic_launcher3.png
View replaced file @
1533b106
View file @
b078f4d7
159 KB
|
W:
|
H:
131 KB
|
W:
|
H:
2-up
Swipe
Onion skin
mobile/src/main/res/values-ko/strings.xml
View file @
b078f4d7
...
@@ -312,4 +312,10 @@
...
@@ -312,4 +312,10 @@
<string
name=
"title_delete_ex"
>
확장 삭제
</string>
<string
name=
"title_delete_ex"
>
확장 삭제
</string>
<string
name=
"file_installed"
>
문건 나왔습니다.
</string>
<string
name=
"file_installed"
>
문건 나왔습니다.
</string>
<string
name=
"ask_delete_ex"
>
지우려면 확인을 클릭하십시오.
</string>
<string
name=
"ask_delete_ex"
>
지우려면 확인을 클릭하십시오.
</string>
<string
name=
"label_ot_OCG"
>
OCG
</string>
<string
name=
"label_ot_TCG"
>
TCG
</string>
<string
name=
"label_ot_SC_OCG"
>
SC_OCG
</string>
<string
name=
"label_ot_All"
>
모든 카드
</string>
<string
name=
"label_ot_No_Exclusive"
>
ID 없는 카드
</string>
<string
name=
"label_ot_CUSTOM"
>
커스텀 카드
</string>
</resources>
</resources>
mobile/src/main/res/values-zh/strings.xml
View file @
b078f4d7
...
@@ -99,6 +99,12 @@
...
@@ -99,6 +99,12 @@
<string
name=
"hit_def"
>
DEF
</string>
<string
name=
"hit_def"
>
DEF
</string>
<string
name=
"label_race"
>
种族
</string>
<string
name=
"label_race"
>
种族
</string>
<string
name=
"label_ot"
>
专属
</string>
<string
name=
"label_ot"
>
专属
</string>
<string
name=
"label_ot_OCG"
>
OCG
</string>
<string
name=
"label_ot_TCG"
>
TCG
</string>
<string
name=
"label_ot_SC_OCG"
>
简体中文
</string>
<string
name=
"label_ot_CUSTOM"
>
自定义卡片
</string>
<string
name=
"label_ot_No_Exclusive"
>
无独有卡
</string>
<string
name=
"label_ot_All"
>
全部卡片
</string>
<string
name=
"label_limit"
>
不限制
</string>
<string
name=
"label_limit"
>
不限制
</string>
<string
name=
"label_limitlist"
>
禁卡表
</string>
<string
name=
"label_limitlist"
>
禁卡表
</string>
<string
name=
"label_type"
>
卡片类型
</string>
<string
name=
"label_type"
>
卡片类型
</string>
...
...
mobile/src/main/res/values/strings.xml
View file @
b078f4d7
...
@@ -315,4 +315,10 @@
...
@@ -315,4 +315,10 @@
<string
name=
"about_delete_ex"
>
if you need to delte all expansion cards
</string>
<string
name=
"about_delete_ex"
>
if you need to delte all expansion cards
</string>
<string
name=
"file_installed"
>
file loaded
</string>
<string
name=
"file_installed"
>
file loaded
</string>
<string
name=
"ask_delete_ex"
>
Click OK to confirm the deletion
</string>
<string
name=
"ask_delete_ex"
>
Click OK to confirm the deletion
</string>
<string
name=
"label_ot_TCG"
>
TCG
</string>
<string
name=
"label_ot_OCG"
>
OCG
</string>
<string
name=
"label_ot_All"
>
All
</string>
<string
name=
"label_ot_CUSTOM"
>
Custom
</string>
<string
name=
"label_ot_No_Exclusive"
>
No exclusive
</string>
<string
name=
"label_ot_SC_OCG"
>
SChinese OCG
</string>
</resources>
</resources>
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