Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
MobiusMei
ygopro
Commits
4b00e8d5
Commit
4b00e8d5
authored
Jun 26, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add hint for switching deck
parent
2a0cf61c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
15 deletions
+36
-15
gframe/deck_con.cpp
gframe/deck_con.cpp
+33
-13
gframe/deck_con.h
gframe/deck_con.h
+2
-1
strings.conf
strings.conf
+1
-1
No files found.
gframe/deck_con.cpp
View file @
4b00e8d5
...
@@ -73,7 +73,8 @@ void DeckBuilder::Initialize() {
...
@@ -73,7 +73,8 @@ void DeckBuilder::Initialize() {
mainGame
->
cbDBLFList
->
setSelected
(
0
);
mainGame
->
cbDBLFList
->
setSelected
(
0
);
ClearSearch
();
ClearSearch
();
is_draging
=
false
;
is_draging
=
false
;
prevID
=
0
;
prev_deck
=
mainGame
->
cbDBDecks
->
getSelected
();
prev_operation
=
0
;
is_modified
=
false
;
is_modified
=
false
;
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
deckBuilder
);
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
deckBuilder
);
}
}
...
@@ -115,7 +116,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -115,7 +116,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
310
,
mainGame
->
textFont
,
(
wchar_t
*
)
dataManager
.
GetSysString
(
1339
));
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
310
,
mainGame
->
textFont
,
(
wchar_t
*
)
dataManager
.
GetSysString
(
1339
));
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
prev
ID
=
id
;
prev
_operation
=
id
;
break
;
break
;
}
}
case
BUTTON_SORT_DECK
:
{
case
BUTTON_SORT_DECK
:
{
...
@@ -171,7 +172,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -171,7 +172,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
310
,
mainGame
->
textFont
,
(
wchar_t
*
)
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
310
,
mainGame
->
textFont
,
(
wchar_t
*
)
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
prev
ID
=
id
;
prev
_operation
=
id
;
break
;
break
;
}
}
case
BUTTON_LEAVE_GAME
:
{
case
BUTTON_LEAVE_GAME
:
{
...
@@ -180,7 +181,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -180,7 +181,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
310
,
mainGame
->
textFont
,
(
wchar_t
*
)
dataManager
.
GetSysString
(
1356
));
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
310
,
mainGame
->
textFont
,
(
wchar_t
*
)
dataManager
.
GetSysString
(
1356
));
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
prev
ID
=
id
;
prev
_operation
=
id
;
break
;
break
;
}
}
Terminate
();
Terminate
();
...
@@ -237,33 +238,42 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -237,33 +238,42 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
HideElement
(
mainGame
->
wQuery
);
mainGame
->
HideElement
(
mainGame
->
wQuery
);
if
(
!
mainGame
->
is_building
||
mainGame
->
is_siding
)
if
(
!
mainGame
->
is_building
||
mainGame
->
is_siding
)
break
;
break
;
if
(
prev
ID
==
BUTTON_CLEAR_DECK
)
{
if
(
prev
_operation
==
BUTTON_CLEAR_DECK
)
{
deckManager
.
current_deck
.
main
.
clear
();
deckManager
.
current_deck
.
main
.
clear
();
deckManager
.
current_deck
.
extra
.
clear
();
deckManager
.
current_deck
.
extra
.
clear
();
deckManager
.
current_deck
.
side
.
clear
();
deckManager
.
current_deck
.
side
.
clear
();
}
else
if
(
prev
ID
==
BUTTON_DELETE_DECK
)
{
}
else
if
(
prev
_operation
==
BUTTON_DELETE_DECK
)
{
int
sel
=
mainGame
->
cbDBDecks
->
getSelected
();
int
sel
=
mainGame
->
cbDBDecks
->
getSelected
();
if
(
deckManager
.
DeleteDeck
(
deckManager
.
current_deck
,
mainGame
->
cbDBDecks
->
getItem
(
sel
)))
{
if
(
deckManager
.
DeleteDeck
(
deckManager
.
current_deck
,
mainGame
->
cbDBDecks
->
getItem
(
sel
)))
{
mainGame
->
cbDBDecks
->
removeItem
(
sel
);
mainGame
->
cbDBDecks
->
removeItem
(
sel
);
int
count
=
mainGame
->
cbDBDecks
->
getItemCount
();
int
count
=
mainGame
->
cbDBDecks
->
getItemCount
();
if
(
sel
>=
count
)
if
(
sel
>=
count
)
sel
=
count
-
1
;
sel
=
count
-
1
;
mainGame
->
cbDBDecks
->
setSelected
(
sel
);
mainGame
->
cbDBDecks
->
setSelected
(
sel
);
if
(
sel
!=
-
1
)
if
(
sel
!=
-
1
)
deckManager
.
LoadDeck
(
mainGame
->
cbDBDecks
->
getItem
(
sel
));
deckManager
.
LoadDeck
(
mainGame
->
cbDBDecks
->
getItem
(
sel
));
mainGame
->
stACMessage
->
setText
(
dataManager
.
GetSysString
(
1338
));
mainGame
->
stACMessage
->
setText
(
dataManager
.
GetSysString
(
1338
));
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
prev_deck
=
sel
;
is_modified
=
false
;
is_modified
=
false
;
}
}
}
else
if
(
prev
ID
==
BUTTON_LEAVE_GAME
)
{
}
else
if
(
prev
_operation
==
BUTTON_LEAVE_GAME
)
{
Terminate
();
Terminate
();
}
else
if
(
prev_operation
==
COMBOBOX_DBDECKS
)
{
int
sel
=
mainGame
->
cbDBDecks
->
getSelected
();
deckManager
.
LoadDeck
(
mainGame
->
cbDBDecks
->
getItem
(
sel
));
prev_deck
=
sel
;
is_modified
=
false
;
}
}
prev
ID
=
0
;
prev
_operation
=
0
;
break
;
break
;
}
}
case
BUTTON_NO
:
{
case
BUTTON_NO
:
{
mainGame
->
HideElement
(
mainGame
->
wQuery
);
mainGame
->
HideElement
(
mainGame
->
wQuery
);
prevID
=
0
;
if
(
prev_operation
==
COMBOBOX_DBDECKS
)
{
mainGame
->
cbDBDecks
->
setSelected
(
prev_deck
);
}
prev_operation
=
0
;
break
;
break
;
}
}
case
BUTTON_MARKS_FILTER
:
{
case
BUTTON_MARKS_FILTER
:
{
...
@@ -330,7 +340,17 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -330,7 +340,17 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
COMBOBOX_DBDECKS
:
{
case
COMBOBOX_DBDECKS
:
{
deckManager
.
LoadDeck
(
mainGame
->
cbDBDecks
->
getItem
(
mainGame
->
cbDBDecks
->
getSelected
()));
if
(
is_modified
&&
mainGame
->
gameConf
.
prompt_to_discard_deck_changes
)
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
310
,
mainGame
->
textFont
,
(
wchar_t
*
)
dataManager
.
GetSysString
(
1356
));
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
gMutex
.
Unlock
();
prev_operation
=
id
;
break
;
}
int
sel
=
mainGame
->
cbDBDecks
->
getSelected
();
deckManager
.
LoadDeck
(
mainGame
->
cbDBDecks
->
getItem
(
sel
));
prev_deck
=
sel
;
is_modified
=
false
;
is_modified
=
false
;
break
;
break
;
}
}
...
...
gframe/deck_con.h
View file @
4b00e8d5
...
@@ -57,7 +57,8 @@ public:
...
@@ -57,7 +57,8 @@ public:
size_t
pre_extrac
;
size_t
pre_extrac
;
size_t
pre_sidec
;
size_t
pre_sidec
;
code_pointer
draging_pointer
;
code_pointer
draging_pointer
;
s32
prevID
;
int
prev_deck
;
s32
prev_operation
;
bool
is_modified
;
bool
is_modified
;
std
::
unordered_map
<
int
,
int
>*
filterList
;
std
::
unordered_map
<
int
,
int
>*
filterList
;
...
...
strings.conf
View file @
4b00e8d5
...
@@ -356,7 +356,7 @@
...
@@ -356,7 +356,7 @@
!
system
1353
播放起始于回合:
!
system
1353
播放起始于回合:
!
system
1354
不显示卡片系列
!
system
1354
不显示卡片系列
!
system
1355
不显示提示按钮
!
system
1355
不显示提示按钮
!
system
1356
是否要放弃
改变
?
!
system
1356
是否要放弃
对卡组的修改
?
!
system
1360
上一步
!
system
1360
上一步
!
system
1370
星数↑
!
system
1370
星数↑
!
system
1371
攻击↑
!
system
1371
攻击↑
...
...
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