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
14d75768
Commit
14d75768
authored
Apr 23, 2024
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refresh分类和列表时控制是否显示卡包展示路径
parent
993f5474
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
19 deletions
+22
-19
Classes/gframe/deck_con.cpp
Classes/gframe/deck_con.cpp
+5
-5
Classes/gframe/deck_con.h
Classes/gframe/deck_con.h
+1
-1
Classes/gframe/deck_manager.cpp
Classes/gframe/deck_manager.cpp
+14
-11
Classes/gframe/deck_manager.h
Classes/gframe/deck_manager.h
+1
-1
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+1
-1
No files found.
Classes/gframe/deck_con.cpp
View file @
14d75768
...
@@ -218,7 +218,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -218,7 +218,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
}
}
int
catesel
=
mainGame
->
cbDBCategory
->
getSelected
();
int
catesel
=
mainGame
->
cbDBCategory
->
getSelected
();
wchar_t
catepath
[
256
];
wchar_t
catepath
[
256
];
deckManager
.
GetCategoryPath
(
catepath
,
catesel
,
mainGame
->
cbDBCategory
->
getText
());
deckManager
.
GetCategoryPath
(
catepath
,
catesel
,
mainGame
->
cbDBCategory
->
getText
()
,
true
);
wchar_t
filepath
[
256
];
wchar_t
filepath
[
256
];
myswprintf
(
filepath
,
L"%ls/%ls.ydk"
,
catepath
,
dname
);
myswprintf
(
filepath
,
L"%ls/%ls.ydk"
,
catepath
,
dname
);
if
(
deckManager
.
SaveDeck
(
deckManager
.
current_deck
,
filepath
))
{
if
(
deckManager
.
SaveDeck
(
deckManager
.
current_deck
,
filepath
))
{
...
@@ -522,7 +522,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -522,7 +522,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case
BUTTON_NEW_DECK
:
{
case
BUTTON_NEW_DECK
:
{
const
wchar_t
*
deckname
=
mainGame
->
ebDMName
->
getText
();
const
wchar_t
*
deckname
=
mainGame
->
ebDMName
->
getText
();
wchar_t
catepath
[
256
];
wchar_t
catepath
[
256
];
deckManager
.
GetCategoryPath
(
catepath
,
mainGame
->
cbDBCategory
->
getSelected
(),
mainGame
->
cbDBCategory
->
getText
());
deckManager
.
GetCategoryPath
(
catepath
,
mainGame
->
cbDBCategory
->
getSelected
(),
mainGame
->
cbDBCategory
->
getText
()
,
true
);
wchar_t
filepath
[
256
];
wchar_t
filepath
[
256
];
myswprintf
(
filepath
,
L"%ls/%ls.ydk"
,
catepath
,
deckname
);
myswprintf
(
filepath
,
L"%ls/%ls.ydk"
,
catepath
,
deckname
);
bool
res
=
false
;
bool
res
=
false
;
...
@@ -1051,7 +1051,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -1051,7 +1051,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
break
;
wchar_t
filepath
[
256
];
wchar_t
filepath
[
256
];
wchar_t
catepath
[
256
];
wchar_t
catepath
[
256
];
deckManager
.
GetCategoryPath
(
catepath
,
mainGame
->
lstCategories
->
getSelected
(),
mainGame
->
lstCategories
->
getListItem
(
mainGame
->
lstCategories
->
getSelected
()));
deckManager
.
GetCategoryPath
(
catepath
,
mainGame
->
lstCategories
->
getSelected
(),
mainGame
->
lstCategories
->
getListItem
(
mainGame
->
lstCategories
->
getSelected
())
,
true
);
myswprintf
(
filepath
,
L"%ls/%ls.ydk"
,
catepath
,
mainGame
->
lstDecks
->
getListItem
(
decksel
));
myswprintf
(
filepath
,
L"%ls/%ls.ydk"
,
catepath
,
mainGame
->
lstDecks
->
getListItem
(
decksel
));
deckManager
.
LoadDeck
(
filepath
,
showing_pack
);
deckManager
.
LoadDeck
(
filepath
,
showing_pack
);
RefreshPackListScroll
();
RefreshPackListScroll
();
...
@@ -1645,11 +1645,11 @@ void DeckBuilder::SortList() {
...
@@ -1645,11 +1645,11 @@ void DeckBuilder::SortList() {
}
}
}
}
void
DeckBuilder
::
RefreshDeckList
()
{
void
DeckBuilder
::
RefreshDeckList
(
bool
showPack
)
{
irr
::
gui
::
IGUIListBox
*
lstCategories
=
mainGame
->
lstCategories
;
irr
::
gui
::
IGUIListBox
*
lstCategories
=
mainGame
->
lstCategories
;
irr
::
gui
::
IGUIListBox
*
lstDecks
=
mainGame
->
lstDecks
;
irr
::
gui
::
IGUIListBox
*
lstDecks
=
mainGame
->
lstDecks
;
wchar_t
catepath
[
256
];
wchar_t
catepath
[
256
];
deckManager
.
GetCategoryPath
(
catepath
,
lstCategories
->
getSelected
(),
lstCategories
->
getListItem
(
lstCategories
->
getSelected
()));
deckManager
.
GetCategoryPath
(
catepath
,
lstCategories
->
getSelected
(),
lstCategories
->
getListItem
(
lstCategories
->
getSelected
())
,
showPack
);
lstDecks
->
clear
();
lstDecks
->
clear
();
mainGame
->
RefreshDeck
(
catepath
,
[
lstDecks
](
const
wchar_t
*
item
)
{
lstDecks
->
addItem
(
item
);
});
mainGame
->
RefreshDeck
(
catepath
,
[
lstDecks
](
const
wchar_t
*
item
)
{
lstDecks
->
addItem
(
item
);
});
}
}
...
...
Classes/gframe/deck_con.h
View file @
14d75768
...
@@ -26,7 +26,7 @@ public:
...
@@ -26,7 +26,7 @@ public:
void
ClearSearch
();
void
ClearSearch
();
void
SortList
();
void
SortList
();
void
RefreshDeckList
();
void
RefreshDeckList
(
bool
showPack
);
void
RefreshReadonly
(
int
catesel
);
void
RefreshReadonly
(
int
catesel
);
void
RefreshPackListScroll
();
void
RefreshPackListScroll
();
void
ChangeCategory
(
int
catesel
);
void
ChangeCategory
(
int
catesel
);
...
...
Classes/gframe/deck_manager.cpp
View file @
14d75768
...
@@ -206,30 +206,33 @@ bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) {
...
@@ -206,30 +206,33 @@ bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) {
deck
=
ndeck
;
deck
=
ndeck
;
return
true
;
return
true
;
}
}
void
DeckManager
::
GetCategoryPath
(
wchar_t
*
ret
,
int
index
,
const
wchar_t
*
text
)
{
void
DeckManager
::
GetCategoryPath
(
wchar_t
*
ret
,
int
index
,
const
wchar_t
*
text
,
bool
showPack
)
{
wchar_t
catepath
[
256
];
wchar_t
catepath
[
256
];
switch
(
index
)
{
switch
(
index
)
{
case
0
:
case
0
:
if
(
mainGame
->
wHostPrepare
->
isVisible
())
{
if
(
showPack
)
{
myswprintf
(
catepath
,
L"./windbot/Decks"
);
}
else
{
myswprintf
(
catepath
,
L"./pack"
);
myswprintf
(
catepath
,
L"./pack"
);
}
else
{
myswprintf
(
catepath
,
L"./windbot/Decks"
);
}
}
break
;
break
;
case
1
:
case
1
:
if
(
mainGame
->
wHostPrepare
->
isVisible
())
{
if
(
showPack
)
{
myswprintf
(
catepath
,
L"./deck"
);
}
else
{
myswprintf
(
catepath
,
L"./windbot/Decks"
);
myswprintf
(
catepath
,
L"./windbot/Decks"
);
}
else
{
myswprintf
(
catepath
,
L"./deck"
);
}
}
break
;
break
;
case
-
1
:
case
-
1
:
case
2
:
case
2
:
case
3
:
case
3
:
if
(
mainGame
->
wHostPrepare
->
isVisible
())
{
if
(
showPack
)
{
myswprintf
(
catepath
,
L"./deck/%ls"
,
text
);
}
else
{
myswprintf
(
catepath
,
L"./deck"
);
myswprintf
(
catepath
,
L"./deck"
);
}
else
{
myswprintf
(
catepath
,
L"./deck/%ls"
,
text
);
}
}
break
;
break
;
default:
default:
...
@@ -242,7 +245,7 @@ void DeckManager::GetDeckFile(wchar_t* ret, irr::gui::IGUIComboBox* cbCategory,
...
@@ -242,7 +245,7 @@ void DeckManager::GetDeckFile(wchar_t* ret, irr::gui::IGUIComboBox* cbCategory,
wchar_t
catepath
[
256
];
wchar_t
catepath
[
256
];
wchar_t
*
deckname
=
(
wchar_t
*
)
cbDeck
->
getItem
(
cbDeck
->
getSelected
());
wchar_t
*
deckname
=
(
wchar_t
*
)
cbDeck
->
getItem
(
cbDeck
->
getSelected
());
if
(
deckname
!=
NULL
)
{
if
(
deckname
!=
NULL
)
{
GetCategoryPath
(
catepath
,
cbCategory
->
getSelected
(),
cbCategory
->
getText
());
GetCategoryPath
(
catepath
,
cbCategory
->
getSelected
(),
cbCategory
->
getText
()
,
cbCategory
==
mainGame
->
cbDBCategory
);
myswprintf
(
filepath
,
L"%ls/%ls.ydk"
,
catepath
,
deckname
);
myswprintf
(
filepath
,
L"%ls/%ls.ydk"
,
catepath
,
deckname
);
BufferIO
::
CopyWStr
(
filepath
,
ret
,
256
);
BufferIO
::
CopyWStr
(
filepath
,
ret
,
256
);
}
}
...
...
Classes/gframe/deck_manager.h
View file @
14d75768
...
@@ -45,7 +45,7 @@ public:
...
@@ -45,7 +45,7 @@ public:
int
CheckDeck
(
Deck
&
deck
,
int
lfhash
,
int
rule
);
int
CheckDeck
(
Deck
&
deck
,
int
lfhash
,
int
rule
);
int
LoadDeck
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
,
bool
is_packlist
=
false
);
int
LoadDeck
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
,
bool
is_packlist
=
false
);
bool
LoadSide
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
);
bool
LoadSide
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
);
void
GetCategoryPath
(
wchar_t
*
ret
,
int
index
,
const
wchar_t
*
text
);
void
GetCategoryPath
(
wchar_t
*
ret
,
int
index
,
const
wchar_t
*
text
,
bool
showPack
);
void
GetDeckFile
(
wchar_t
*
ret
,
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
void
GetDeckFile
(
wchar_t
*
ret
,
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
bool
LoadDeck
(
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
bool
LoadDeck
(
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
FILE
*
OpenDeckFile
(
const
wchar_t
*
file
,
const
char
*
mode
);
FILE
*
OpenDeckFile
(
const
wchar_t
*
file
,
const
char
*
mode
);
...
...
Classes/gframe/game.cpp
View file @
14d75768
...
@@ -1663,7 +1663,7 @@ void Game::RefreshDeck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBo
...
@@ -1663,7 +1663,7 @@ void Game::RefreshDeck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBo
}
}
}
}
wchar_t
catepath
[
256
];
wchar_t
catepath
[
256
];
deckManager
.
GetCategoryPath
(
catepath
,
cbCategory
->
getSelected
(),
cbCategory
->
getText
());
deckManager
.
GetCategoryPath
(
catepath
,
cbCategory
->
getSelected
(),
cbCategory
->
getText
()
,
cbCategory
==
mainGame
->
cbDBCategory
);
cbDeck
->
clear
();
cbDeck
->
clear
();
RefreshDeck
(
catepath
,
[
cbDeck
](
const
wchar_t
*
item
)
{
cbDeck
->
addItem
(
item
);
});
RefreshDeck
(
catepath
,
[
cbDeck
](
const
wchar_t
*
item
)
{
cbDeck
->
addItem
(
item
);
});
}
}
...
...
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