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
4aa6ff63
Commit
4aa6ff63
authored
Mar 15, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
mg
parents
b9f0268d
6ec6c1e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
133 additions
and
135 deletions
+133
-135
cards.cdb
cards.cdb
+0
-0
gframe/client_field.h
gframe/client_field.h
+1
-0
gframe/event_handler.cpp
gframe/event_handler.cpp
+132
-135
No files found.
cards.cdb
View file @
4aa6ff63
No preview for this file type
gframe/client_field.h
View file @
4aa6ff63
...
...
@@ -138,6 +138,7 @@ public:
void
ShowCancelOrFinishButton
(
int
buttonOp
);
void
SetShowMark
(
ClientCard
*
pcard
,
bool
enable
);
void
SetResponseSelectedCards
()
const
;
void
CancelOrFinish
();
};
}
...
...
gframe/event_handler.cpp
View file @
4aa6ff63
...
...
@@ -158,141 +158,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
}
case
BUTTON_CANCEL_OR_FINISH
:
{
switch
(
mainGame
->
dInfo
.
curMsg
)
{
case
MSG_WAITING
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_BATTLECMD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wOptions
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_IDLECMD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wOptions
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_YESNO
:
case
MSG_SELECT_EFFECTYN
:
{
if
(
highlighting_card
)
highlighting_card
->
is_highlighting
=
false
;
highlighting_card
=
0
;
DuelClient
::
SetResponseI
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
case
MSG_SELECT_CARD
:
{
if
(
selected_cards
.
size
()
==
0
)
{
if
(
select_cancelable
)
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
if
(
select_ready
)
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
break
;
}
case
MSG_SELECT_UNSELECT_CARD
:
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
case
MSG_SELECT_TRIBUTE
:
{
if
(
selected_cards
.
size
()
==
0
)
{
if
(
select_cancelable
)
{
DuelClient
::
SetResponseI
(
-
1
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
break
;
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
break
;
}
case
MSG_SELECT_SUM
:
{
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
break
;
}
case
MSG_SELECT_CHAIN
:
{
if
(
chain_forced
)
break
;
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
break
;
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
}
else
{
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wOptions
);
}
break
;
}
case
MSG_SORT_CHAIN
:
case
MSG_SORT_CARD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
}
break
;
}
}
CancelOrFinish
();
break
;
}
case
BUTTON_MSG_OK
:
{
...
...
@@ -1545,6 +1411,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
wCmdMenu
->
setVisible
(
false
);
if
(
mainGame
->
fadingList
.
size
())
break
;
<<<<<<<
HEAD
switch
(
mainGame
->
dInfo
.
curMsg
)
{
case
MSG_WAITING
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
...
...
@@ -1672,6 +1539,9 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
}
}
=======
CancelOrFinish
();
>>>>>>>
6
ec6c1e04f8cebb8f3fc80ee70d4c22fbb118f62
break
;
}
case
irr
:
:
EMIE_MOUSE_MOVED
:
{
...
...
@@ -2408,4 +2278,131 @@ void ClientField::SetResponseSelectedCards() const {
respbuf
[
i
+
1
]
=
selected_cards
[
i
]
->
select_seq
;
DuelClient
::
SetResponseB
(
respbuf
,
selected_cards
.
size
()
+
1
);
}
void
ClientField
::
CancelOrFinish
()
{
switch
(
mainGame
->
dInfo
.
curMsg
)
{
case
MSG_WAITING
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_BATTLECMD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wOptions
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_IDLECMD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wOptions
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_YESNO
:
case
MSG_SELECT_EFFECTYN
:
{
if
(
highlighting_card
)
highlighting_card
->
is_highlighting
=
false
;
highlighting_card
=
0
;
DuelClient
::
SetResponseI
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
case
MSG_SELECT_CARD
:
{
if
(
selected_cards
.
size
()
==
0
)
{
if
(
select_cancelable
)
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
if
(
select_ready
)
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
break
;
}
case
MSG_SELECT_TRIBUTE
:
{
if
(
selected_cards
.
size
()
==
0
)
{
if
(
select_cancelable
)
{
DuelClient
::
SetResponseI
(
-
1
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
break
;
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
break
;
}
case
MSG_SELECT_SUM
:
{
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
break
;
}
case
MSG_SELECT_CHAIN
:
{
if
(
chain_forced
)
break
;
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
break
;
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
}
else
{
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wOptions
);
}
break
;
}
case
MSG_SORT_CHAIN
:
case
MSG_SORT_CARD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
}
break
;
}
}
}
}
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