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
a3c68478
Commit
a3c68478
authored
Apr 20, 2018
by
mercury233
Committed by
GitHub
Apr 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix select unselect (#2104)
parent
390d2074
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
gframe/client_field.cpp
gframe/client_field.cpp
+1
-1
gframe/client_field.h
gframe/client_field.h
+1
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+10
-8
gframe/event_handler.cpp
gframe/event_handler.cpp
+1
-0
No files found.
gframe/client_field.cpp
View file @
a3c68478
...
@@ -1062,7 +1062,7 @@ bool ClientField::ShowSelectSum(bool panelmode) {
...
@@ -1062,7 +1062,7 @@ bool ClientField::ShowSelectSum(bool panelmode) {
select_ready
=
false
;
select_ready
=
false
;
}
}
if
(
select_ready
)
{
if
(
select_ready
)
{
ShowCancelOrFinishButton
(
1
);
ShowCancelOrFinishButton
(
2
);
}
else
{
}
else
{
ShowCancelOrFinishButton
(
0
);
ShowCancelOrFinishButton
(
0
);
}
}
...
...
gframe/client_field.h
View file @
a3c68478
...
@@ -54,8 +54,8 @@ public:
...
@@ -54,8 +54,8 @@ public:
int
select_max
;
int
select_max
;
int
must_select_count
;
int
must_select_count
;
int
select_sumval
;
int
select_sumval
;
int
select_cancelable
;
int
select_mode
;
int
select_mode
;
bool
select_cancelable
;
bool
select_panalmode
;
bool
select_panalmode
;
bool
select_ready
;
bool
select_ready
;
int
announce_count
;
int
announce_count
;
...
...
gframe/duelclient.cpp
View file @
a3c68478
...
@@ -1340,7 +1340,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1340,7 +1340,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
case
MSG_SELECT_CARD
:
{
case
MSG_SELECT_CARD
:
{
/*int selecting_player = */
BufferIO
::
ReadInt8
(
pbuf
);
/*int selecting_player = */
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_cancelable
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_cancelable
=
BufferIO
::
ReadInt8
(
pbuf
)
!=
0
;
mainGame
->
dField
.
select_min
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_min
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_max
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_max
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
...
@@ -1397,8 +1397,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1397,8 +1397,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
case
MSG_SELECT_UNSELECT_CARD
:
{
case
MSG_SELECT_UNSELECT_CARD
:
{
/*int selecting_player = */
BufferIO
::
ReadInt8
(
pbuf
);
/*int selecting_player = */
BufferIO
::
ReadInt8
(
pbuf
);
bool
buttonok
=
!!
BufferIO
::
ReadInt8
(
pbuf
);
bool
finishable
=
BufferIO
::
ReadInt8
(
pbuf
)
!=
0
;
mainGame
->
dField
.
select_cancelable
=
BufferIO
::
ReadInt8
(
pbuf
);
bool
cancelable
=
BufferIO
::
ReadInt8
(
pbuf
)
!=
0
;
mainGame
->
dField
.
select_cancelable
=
finishable
||
cancelable
;
mainGame
->
dField
.
select_min
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_min
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_max
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_max
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count1
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count1
=
BufferIO
::
ReadInt8
(
pbuf
);
...
@@ -1457,19 +1458,20 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1457,19 +1458,20 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
if
(
panelmode
)
{
if
(
panelmode
)
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
wCardSelect
->
setText
(
textBuffer
);
mainGame
->
wCardSelect
->
setText
(
textBuffer
);
mainGame
->
dField
.
ShowSelectCard
(
buttonok
);
mainGame
->
dField
.
ShowSelectCard
(
mainGame
->
dField
.
select_cancelable
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
}
else
{
}
else
{
mainGame
->
stHintMsg
->
setText
(
textBuffer
);
mainGame
->
stHintMsg
->
setText
(
textBuffer
);
mainGame
->
stHintMsg
->
setVisible
(
true
);
mainGame
->
stHintMsg
->
setVisible
(
true
);
}
}
if
(
mainGame
->
dField
.
select_cancelable
)
{
if
(
mainGame
->
dField
.
select_cancelable
)
{
if
(
count2
==
0
)
if
(
finishable
)
{
mainGame
->
dField
.
ShowCancelOrFinishButton
(
1
);
else
{
mainGame
->
dField
.
select_ready
=
true
;
mainGame
->
dField
.
select_ready
=
true
;
mainGame
->
dField
.
ShowCancelOrFinishButton
(
2
);
mainGame
->
dField
.
ShowCancelOrFinishButton
(
2
);
}
}
else
{
mainGame
->
dField
.
ShowCancelOrFinishButton
(
1
);
}
}
}
else
else
mainGame
->
dField
.
ShowCancelOrFinishButton
(
0
);
mainGame
->
dField
.
ShowCancelOrFinishButton
(
0
);
...
@@ -1688,7 +1690,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1688,7 +1690,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
case
MSG_SELECT_TRIBUTE
:
{
case
MSG_SELECT_TRIBUTE
:
{
/*int selecting_player = */
BufferIO
::
ReadInt8
(
pbuf
);
/*int selecting_player = */
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_cancelable
=
BufferIO
::
ReadInt8
(
pbuf
)
?
true
:
false
;
mainGame
->
dField
.
select_cancelable
=
BufferIO
::
ReadInt8
(
pbuf
)
!=
0
;
mainGame
->
dField
.
select_min
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_min
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_max
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_max
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
...
...
gframe/event_handler.cpp
View file @
a3c68478
...
@@ -464,6 +464,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -464,6 +464,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
list_command
=
COMMAND_SPSUMMON
;
list_command
=
COMMAND_SPSUMMON
;
mainGame
->
wCardSelect
->
setText
(
dataManager
.
GetSysString
(
509
));
mainGame
->
wCardSelect
->
setText
(
dataManager
.
GetSysString
(
509
));
ShowSelectCard
();
ShowSelectCard
();
select_ready
=
false
;
ShowCancelOrFinishButton
(
1
);
ShowCancelOrFinishButton
(
1
);
}
}
break
;
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