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
e34f02b1
Commit
e34f02b1
authored
Apr 15, 2017
by
edo9300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added SpectatorSwap
parent
6344b48c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
3 deletions
+14
-3
gframe/duelclient.cpp
gframe/duelclient.cpp
+4
-0
gframe/event_handler.cpp
gframe/event_handler.cpp
+4
-3
gframe/game.cpp
gframe/game.cpp
+4
-0
gframe/game.h
gframe/game.h
+2
-0
No files found.
gframe/duelclient.cpp
View file @
e34f02b1
...
@@ -285,6 +285,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -285,6 +285,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
btnSideOK
->
setVisible
(
true
);
mainGame
->
btnSideOK
->
setVisible
(
true
);
if
(
mainGame
->
dInfo
.
player_type
<
7
)
if
(
mainGame
->
dInfo
.
player_type
<
7
)
mainGame
->
btnLeaveGame
->
setVisible
(
false
);
mainGame
->
btnLeaveGame
->
setVisible
(
false
);
mainGame
->
btnSpectatorSwap
->
setVisible
(
false
);
mainGame
->
btnChainIgnore
->
setVisible
(
false
);
mainGame
->
btnChainIgnore
->
setVisible
(
false
);
mainGame
->
btnChainAlways
->
setVisible
(
false
);
mainGame
->
btnChainAlways
->
setVisible
(
false
);
mainGame
->
btnChainWhenAvail
->
setVisible
(
false
);
mainGame
->
btnChainWhenAvail
->
setVisible
(
false
);
...
@@ -472,6 +473,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -472,6 +473,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
dInfo
.
player_type
=
7
;
mainGame
->
dInfo
.
player_type
=
7
;
mainGame
->
btnLeaveGame
->
setText
(
dataManager
.
GetSysString
(
1350
));
mainGame
->
btnLeaveGame
->
setText
(
dataManager
.
GetSysString
(
1350
));
mainGame
->
btnLeaveGame
->
setVisible
(
true
);
mainGame
->
btnLeaveGame
->
setVisible
(
true
);
mainGame
->
btnSpectatorSwap
->
setVisible
(
true
);
}
}
if
(
selftype
!=
1
)
{
if
(
selftype
!=
1
)
{
BufferIO
::
CopyWStr
(
mainGame
->
stHostPrepDuelist
[
0
]
->
getText
(),
mainGame
->
dInfo
.
hostname
,
20
);
BufferIO
::
CopyWStr
(
mainGame
->
stHostPrepDuelist
[
0
]
->
getText
(),
mainGame
->
dInfo
.
hostname
,
20
);
...
@@ -485,6 +487,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -485,6 +487,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
dInfo
.
player_type
=
7
;
mainGame
->
dInfo
.
player_type
=
7
;
mainGame
->
btnLeaveGame
->
setText
(
dataManager
.
GetSysString
(
1350
));
mainGame
->
btnLeaveGame
->
setText
(
dataManager
.
GetSysString
(
1350
));
mainGame
->
btnLeaveGame
->
setVisible
(
true
);
mainGame
->
btnLeaveGame
->
setVisible
(
true
);
mainGame
->
btnSpectatorSwap
->
setVisible
(
true
);
}
}
if
(
selftype
>
1
&&
selftype
<
4
)
{
if
(
selftype
>
1
&&
selftype
<
4
)
{
BufferIO
::
CopyWStr
(
mainGame
->
stHostPrepDuelist
[
2
]
->
getText
(),
mainGame
->
dInfo
.
hostname
,
20
);
BufferIO
::
CopyWStr
(
mainGame
->
stHostPrepDuelist
[
2
]
->
getText
(),
mainGame
->
dInfo
.
hostname
,
20
);
...
@@ -508,6 +511,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -508,6 +511,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
if
(
mainGame
->
dInfo
.
player_type
<
7
)
if
(
mainGame
->
dInfo
.
player_type
<
7
)
mainGame
->
btnLeaveGame
->
setVisible
(
false
);
mainGame
->
btnLeaveGame
->
setVisible
(
false
);
mainGame
->
btnSpectatorSwap
->
setVisible
(
false
);
mainGame
->
btnChainIgnore
->
setVisible
(
false
);
mainGame
->
btnChainIgnore
->
setVisible
(
false
);
mainGame
->
btnChainAlways
->
setVisible
(
false
);
mainGame
->
btnChainAlways
->
setVisible
(
false
);
mainGame
->
btnChainWhenAvail
->
setVisible
(
false
);
mainGame
->
btnChainWhenAvail
->
setVisible
(
false
);
...
...
gframe/event_handler.cpp
View file @
e34f02b1
...
@@ -77,9 +77,10 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -77,9 +77,10 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_REPLAY_SWAP
:
{
case
BUTTON_REPLAY_SWAP
:
{
if
(
!
mainGame
->
dInfo
.
isReplay
)
if
(
mainGame
->
dInfo
.
isReplay
)
break
;
ReplayMode
::
SwapField
();
ReplayMode
::
SwapField
();
else
if
(
mainGame
->
dInfo
.
player_type
==
7
)
mainGame
->
dField
.
ReplaySwap
();
break
;
break
;
}
}
case
BUTTON_REPLAY_UNDO
:
{
case
BUTTON_REPLAY_UNDO
:
{
...
...
gframe/game.cpp
View file @
e34f02b1
...
@@ -543,6 +543,9 @@ bool Game::Initialize() {
...
@@ -543,6 +543,9 @@ bool Game::Initialize() {
wChat
->
setDrawTitlebar
(
false
);
wChat
->
setDrawTitlebar
(
false
);
wChat
->
setVisible
(
false
);
wChat
->
setVisible
(
false
);
ebChatInput
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
3
,
2
,
710
,
22
),
true
,
wChat
,
EDITBOX_CHAT
);
ebChatInput
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
3
,
2
,
710
,
22
),
true
,
wChat
,
EDITBOX_CHAT
);
//swap
btnSpectatorSwap
=
env
->
addButton
(
rect
<
s32
>
(
205
,
100
,
295
,
135
),
0
,
BUTTON_REPLAY_SWAP
,
dataManager
.
GetSysString
(
1346
));
btnSpectatorSwap
->
setVisible
(
false
);
//chain buttons
//chain buttons
btnChainIgnore
=
env
->
addButton
(
rect
<
s32
>
(
205
,
100
,
295
,
135
),
0
,
BUTTON_CHAIN_IGNORE
,
dataManager
.
GetSysString
(
1292
));
btnChainIgnore
=
env
->
addButton
(
rect
<
s32
>
(
205
,
100
,
295
,
135
),
0
,
BUTTON_CHAIN_IGNORE
,
dataManager
.
GetSysString
(
1292
));
btnChainAlways
=
env
->
addButton
(
rect
<
s32
>
(
205
,
140
,
295
,
175
),
0
,
BUTTON_CHAIN_ALWAYS
,
dataManager
.
GetSysString
(
1293
));
btnChainAlways
=
env
->
addButton
(
rect
<
s32
>
(
205
,
140
,
295
,
175
),
0
,
BUTTON_CHAIN_ALWAYS
,
dataManager
.
GetSysString
(
1293
));
...
@@ -1169,6 +1172,7 @@ void Game::CloseDuelWindow() {
...
@@ -1169,6 +1172,7 @@ void Game::CloseDuelWindow() {
stHintMsg
->
setVisible
(
false
);
stHintMsg
->
setVisible
(
false
);
btnSideOK
->
setVisible
(
false
);
btnSideOK
->
setVisible
(
false
);
btnLeaveGame
->
setVisible
(
false
);
btnLeaveGame
->
setVisible
(
false
);
btnSpectatorSwap
->
setVisible
(
false
);
btnChainIgnore
->
setVisible
(
false
);
btnChainIgnore
->
setVisible
(
false
);
btnChainAlways
->
setVisible
(
false
);
btnChainAlways
->
setVisible
(
false
);
btnChainWhenAvail
->
setVisible
(
false
);
btnChainWhenAvail
->
setVisible
(
false
);
...
...
gframe/game.h
View file @
e34f02b1
...
@@ -401,6 +401,8 @@ public:
...
@@ -401,6 +401,8 @@ public:
irr
::
gui
::
IGUIButton
*
btnReplaySwap
;
irr
::
gui
::
IGUIButton
*
btnReplaySwap
;
//surrender/leave
//surrender/leave
irr
::
gui
::
IGUIButton
*
btnLeaveGame
;
irr
::
gui
::
IGUIButton
*
btnLeaveGame
;
//swap
irr
::
gui
::
IGUIButton
*
btnSpectatorSwap
;
//chain control
//chain control
irr
::
gui
::
IGUIButton
*
btnChainIgnore
;
irr
::
gui
::
IGUIButton
*
btnChainIgnore
;
irr
::
gui
::
IGUIButton
*
btnChainAlways
;
irr
::
gui
::
IGUIButton
*
btnChainAlways
;
...
...
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