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
4218b64d
Commit
4218b64d
authored
Sep 11, 2021
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化CardSearcher执行线程
parent
e7a630cf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
20 deletions
+35
-20
Classes/gframe/gframe.cpp
Classes/gframe/gframe.cpp
+13
-11
Classes/gframe/menu_handler.cpp
Classes/gframe/menu_handler.cpp
+2
-2
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
.../main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
+20
-6
mobile/src/main/java/ocgcore/data/CardData.java
mobile/src/main/java/ocgcore/data/CardData.java
+0
-1
No files found.
Classes/gframe/gframe.cpp
View file @
4218b64d
...
@@ -108,18 +108,20 @@ int main(int argc, char* argv[]) {
...
@@ -108,18 +108,20 @@ int main(int argc, char* argv[]) {
#else
#else
char
*
name
=
argv
[
i
+
1
];
char
*
name
=
argv
[
i
+
1
];
#endif
#endif
wchar_t
fname
[
1024
];
BufferIO
::
DecodeUTF8
(
name
,
fname
);
wchar_t
fname
[
1024
];
BufferIO
::
DecodeUTF8
(
name
,
fname
);
index
=
GetListBoxIndex
(
ygo
::
mainGame
->
lstReplayList
,
fname
);
index
=
GetListBoxIndex
(
ygo
::
mainGame
->
lstReplayList
,
fname
);
ALOGD
(
"open replay file:index=%d, name=%s"
,
index
,
name
);
ALOGD
(
"open replay file:index=%d, name=%s"
,
index
,
name
);
}
}
ygo
::
mainGame
->
HideElement
(
ygo
::
mainGame
->
wMainMenu
);
ygo
::
mainGame
->
HideElement
(
ygo
::
mainGame
->
wMainMenu
);
ClickButton
(
ygo
::
mainGame
->
btnReplayMode
);
ClickButton
(
ygo
::
mainGame
->
btnReplayMode
);
if
(
index
>=
0
)
{
if
(
index
>=
0
)
{
ygo
::
mainGame
->
lstReplayList
->
setSelected
(
index
);
ygo
::
mainGame
->
lstReplayList
->
setSelected
(
index
);
ClickButton
(
ygo
::
mainGame
->
btnLoadReplay
);
ClickButton
(
ygo
::
mainGame
->
btnLoadReplay
);
}
}
break
;
//只播放一个
break
;
//只播放一个
}
else
if
(
!
strcmp
(
arg
,
"-s"
))
{
// Single
}
else
if
(
!
strcmp
(
arg
,
"-s"
))
{
// Single
exit_on_return
=
!
keep_on_return
;
exit_on_return
=
!
keep_on_return
;
//显示残局窗口
//显示残局窗口
...
@@ -134,13 +136,13 @@ int main(int argc, char* argv[]) {
...
@@ -134,13 +136,13 @@ int main(int argc, char* argv[]) {
#else
#else
char
*
name
=
argv
[
i
+
1
];
char
*
name
=
argv
[
i
+
1
];
#endif
#endif
wchar_t
fname
[
1024
];
wchar_t
fname
[
1024
];
BufferIO
::
DecodeUTF8
(
name
,
fname
);
BufferIO
::
DecodeUTF8
(
name
,
fname
);
index
=
GetListBoxIndex
(
ygo
::
mainGame
->
lstSinglePlayList
,
fname
);
index
=
GetListBoxIndex
(
ygo
::
mainGame
->
lstSinglePlayList
,
fname
);
ALOGD
(
"open single file:index=%d, name=%s"
,
index
,
name
);
ALOGD
(
"open single file:index=%d, name=%s"
,
index
,
name
);
}
}
if
(
index
>=
0
){
if
(
index
>=
0
){
ygo
::
mainGame
->
lstSinglePlayList
->
setSelected
(
index
);
ygo
::
mainGame
->
lstSinglePlayList
->
setSelected
(
index
);
ClickButton
(
ygo
::
mainGame
->
btnLoadSinglePlay
);
ClickButton
(
ygo
::
mainGame
->
btnLoadSinglePlay
);
}
}
break
;
break
;
...
...
Classes/gframe/menu_handler.cpp
View file @
4218b64d
...
@@ -285,9 +285,9 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -285,9 +285,9 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
prev_operation
=
id
;
prev_operation
=
id
;
prev_sel
=
sel
;
prev_sel
=
sel
;
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
ALOGD
(
"1share replay file=%s"
,
name
);
ALOGD
(
"1share replay file=%s"
,
name
);
android
::
OnShareFile
(
mainGame
->
appMain
,
"yrp"
,
name
);
android
::
OnShareFile
(
mainGame
->
appMain
,
"yrp"
,
name
);
ALOGD
(
"2after share replay file:index=%d"
,
sel
);
ALOGD
(
"2after share replay file:index=%d"
,
sel
);
#endif
#endif
break
;
break
;
}
}
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
View file @
4218b64d
...
@@ -24,6 +24,7 @@ import cn.garymb.ygomobile.loader.ICardSearcher;
...
@@ -24,6 +24,7 @@ import cn.garymb.ygomobile.loader.ICardSearcher;
import
cn.garymb.ygomobile.ui.adapters.SimpleSpinnerAdapter
;
import
cn.garymb.ygomobile.ui.adapters.SimpleSpinnerAdapter
;
import
cn.garymb.ygomobile.ui.adapters.SimpleSpinnerItem
;
import
cn.garymb.ygomobile.ui.adapters.SimpleSpinnerItem
;
import
cn.garymb.ygomobile.ui.plus.DialogPlus
;
import
cn.garymb.ygomobile.ui.plus.DialogPlus
;
import
cn.garymb.ygomobile.ui.plus.VUiKit
;
import
ocgcore.DataManager
;
import
ocgcore.DataManager
;
import
ocgcore.LimitManager
;
import
ocgcore.LimitManager
;
import
ocgcore.StringManager
;
import
ocgcore.StringManager
;
...
@@ -135,7 +136,7 @@ public class CardSearcher implements View.OnClickListener {
...
@@ -135,7 +136,7 @@ public class CardSearcher implements View.OnClickListener {
myFavButton
.
setOnClickListener
(
v
->
{
myFavButton
.
setOnClickListener
(
v
->
{
if
(
isShowFavorite
()){
if
(
isShowFavorite
()){
hideFavorites
();
hideFavorites
(
true
);
}
else
{
}
else
{
showFavorites
(
true
);
showFavorites
(
true
);
}
}
...
@@ -278,16 +279,30 @@ public class CardSearcher implements View.OnClickListener {
...
@@ -278,16 +279,30 @@ public class CardSearcher implements View.OnClickListener {
myFavButton
.
setSelected
(
true
);
myFavButton
.
setSelected
(
true
);
if
(
mCallBack
!=
null
)
{
if
(
mCallBack
!=
null
)
{
mCallBack
.
onSearchStart
();
mCallBack
.
onSearchStart
();
mCallBack
.
onSearchResult
(
CardFavorites
.
get
().
getCards
(
mCardLoader
),
!
showList
);
}
if
(
mCallBack
!=
null
)
{
VUiKit
.
post
(()
->
{
mCallBack
.
onSearchResult
(
CardFavorites
.
get
().
getCards
(
mCardLoader
),
!
showList
);
});
}
}
}
}
public
void
hideFavorites
(){
public
void
hideFavorites
(
boolean
reload
){
mShowFavorite
=
false
;
mShowFavorite
=
false
;
myFavButton
.
setSelected
(
false
);
myFavButton
.
setSelected
(
false
);
if
(
mCallBack
!=
null
)
{
if
(
mCallBack
!=
null
)
{
mCallBack
.
onSearchStart
();
mCallBack
.
onSearchStart
();
mCallBack
.
onSearchResult
(
Collections
.
emptyList
(),
true
);
}
if
(
reload
)
{
VUiKit
.
post
(()
->
{
search
();
});
}
else
{
if
(
mCallBack
!=
null
)
{
VUiKit
.
post
(()
->
{
mCallBack
.
onSearchResult
(
Collections
.
emptyList
(),
true
);
});
}
}
}
}
}
...
@@ -529,8 +544,7 @@ public class CardSearcher implements View.OnClickListener {
...
@@ -529,8 +544,7 @@ public class CardSearcher implements View.OnClickListener {
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
if
(
v
.
getId
()
==
R
.
id
.
btn_search
)
{
if
(
v
.
getId
()
==
R
.
id
.
btn_search
)
{
hideFavorites
();
hideFavorites
(
true
);
search
();
}
else
if
(
v
.
getId
()
==
R
.
id
.
btn_reset
)
{
}
else
if
(
v
.
getId
()
==
R
.
id
.
btn_reset
)
{
resetAll
();
resetAll
();
}
}
...
...
mobile/src/main/java/ocgcore/data/CardData.java
View file @
4218b64d
...
@@ -13,7 +13,6 @@ public class CardData implements Parcelable {
...
@@ -13,7 +13,6 @@ public class CardData implements Parcelable {
public
CardData
(
int
code
)
{
public
CardData
(
int
code
)
{
Code
=
code
;
Code
=
code
;
}
}
public
int
Code
;
public
int
Code
;
public
int
Ot
;
public
int
Ot
;
public
int
Alias
;
public
int
Alias
;
...
...
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