Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
0947436d
Commit
0947436d
authored
Sep 05, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add export deck
parent
6518a90e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
1 deletion
+41
-1
gframe/game.cpp
gframe/game.cpp
+2
-1
gframe/game.h
gframe/game.h
+2
-0
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+36
-0
strings.conf
strings.conf
+1
-0
No files found.
gframe/game.cpp
View file @
0947436d
...
...
@@ -626,8 +626,9 @@ bool Game::Initialize() {
btnDeleteReplay
=
env
->
addButton
(
rect
<
s32
>
(
360
,
355
,
460
,
380
),
wReplay
,
BUTTON_DELETE_REPLAY
,
dataManager
.
GetSysString
(
1361
));
btnRenameReplay
=
env
->
addButton
(
rect
<
s32
>
(
360
,
385
,
460
,
410
),
wReplay
,
BUTTON_RENAME_REPLAY
,
dataManager
.
GetSysString
(
1362
));
btnReplayCancel
=
env
->
addButton
(
rect
<
s32
>
(
470
,
385
,
570
,
410
),
wReplay
,
BUTTON_CANCEL_REPLAY
,
dataManager
.
GetSysString
(
1347
));
btnExportDeck
=
env
->
addButton
(
rect
<
s32
>
(
470
,
325
,
570
,
350
),
wReplay
,
BUTTON_EXPORT_DECK
,
dataManager
.
GetSysString
(
1369
));
env
->
addStaticText
(
dataManager
.
GetSysString
(
1349
),
rect
<
s32
>
(
360
,
30
,
570
,
50
),
false
,
true
,
wReplay
);
stReplayInfo
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
360
,
60
,
570
,
3
5
0
),
false
,
true
,
wReplay
);
stReplayInfo
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
360
,
60
,
570
,
3
2
0
),
false
,
true
,
wReplay
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1353
),
rect
<
s32
>
(
360
,
275
,
570
,
295
),
false
,
true
,
wReplay
);
ebRepStartTurn
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
360
,
300
,
460
,
320
),
true
,
wReplay
,
-
1
);
ebRepStartTurn
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
...
...
gframe/game.h
View file @
0947436d
...
...
@@ -355,6 +355,7 @@ public:
irr
::
gui
::
IGUIButton
*
btnDeleteReplay
;
irr
::
gui
::
IGUIButton
*
btnRenameReplay
;
irr
::
gui
::
IGUIButton
*
btnReplayCancel
;
irr
::
gui
::
IGUIButton
*
btnExportDeck
;
irr
::
gui
::
IGUIEditBox
*
ebRepStartTurn
;
//single play
irr
::
gui
::
IGUIWindow
*
wSinglePlay
;
...
...
@@ -588,6 +589,7 @@ extern Game* mainGame;
#define BUTTON_CANCEL_REPLAY 132
#define BUTTON_DELETE_REPLAY 133
#define BUTTON_RENAME_REPLAY 134
#define BUTTON_EXPORT_DECK 135
#define EDITBOX_CHAT 140
#define BUTTON_MSG_OK 200
#define BUTTON_YES 201
...
...
gframe/menu_handler.cpp
View file @
0947436d
...
...
@@ -280,6 +280,42 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
ShowElement
(
mainGame
->
wMainMenu
);
break
;
}
case
BUTTON_EXPORT_DECK
:
{
if
(
mainGame
->
lstReplayList
->
getSelected
()
==
-
1
)
break
;
Replay
replay
;
wchar_t
ex_filename
[
256
];
wchar_t
namebuf
[
4
][
20
];
wchar_t
filename
[
256
];
myswprintf
(
ex_filename
,
L"%ls"
,
mainGame
->
lstReplayList
->
getListItem
(
mainGame
->
lstReplayList
->
getSelected
()));
if
(
!
replay
.
OpenReplay
(
ex_filename
))
break
;
const
ReplayHeader
&
rh
=
replay
.
pheader
;
if
(
rh
.
flag
&
REPLAY_SINGLE_MODE
)
break
;
int
max
=
(
rh
.
flag
&
REPLAY_TAG
)
?
4
:
2
;
//player name
for
(
int
i
=
0
;
i
<
max
;
++
i
)
replay
.
ReadName
(
namebuf
[
i
]);
//skip pre infos
for
(
int
i
=
0
;
i
<
4
;
++
i
)
replay
.
ReadInt32
();
//deck
for
(
int
i
=
0
;
i
<
max
;
++
i
)
{
int
main
=
replay
.
ReadInt32
();
Deck
tmp_deck
;
for
(
int
j
=
0
;
j
<
main
;
++
j
)
tmp_deck
.
main
.
push_back
(
dataManager
.
GetCodePointer
(
replay
.
ReadInt32
()));
int
extra
=
replay
.
ReadInt32
();
for
(
int
j
=
0
;
j
<
extra
;
++
j
)
tmp_deck
.
extra
.
push_back
(
dataManager
.
GetCodePointer
(
replay
.
ReadInt32
()));
myswprintf
(
filename
,
L"%ls %ls"
,
ex_filename
,
namebuf
[
i
]);
deckManager
.
SaveDeck
(
tmp_deck
,
filename
);
}
mainGame
->
stACMessage
->
setText
(
dataManager
.
GetSysString
(
1335
));
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
break
;
}
case
BUTTON_BOT_START
:
{
int
sel
=
mainGame
->
lstBotList
->
getSelected
();
if
(
sel
==
-
1
)
...
...
strings.conf
View file @
0947436d
...
...
@@ -394,6 +394,7 @@
!
system
1366
重命名成功
!
system
1367
重命名卡组
!
system
1368
卡组文件:
!
system
1369
提取卡组
!
system
1370
星数↑
!
system
1371
攻击↑
!
system
1372
守备↑
...
...
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