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
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
Commits
73df63ab
Commit
73df63ab
authored
Jun 20, 2017
by
mercury233
Committed by
GitHub
Jun 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update phase buttons (#1998)
parent
94f7e54b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
38 deletions
+29
-38
gframe/duelclient.cpp
gframe/duelclient.cpp
+12
-18
gframe/event_handler.cpp
gframe/event_handler.cpp
+4
-0
gframe/game.cpp
gframe/game.cpp
+10
-17
gframe/game.h
gframe/game.h
+2
-3
strings.conf
strings.conf
+1
-0
No files found.
gframe/duelclient.cpp
View file @
73df63ab
...
...
@@ -290,6 +290,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
btnChainAlways
->
setVisible
(
false
);
mainGame
->
btnChainWhenAvail
->
setVisible
(
false
);
mainGame
->
btnCancelOrFinish
->
setVisible
(
false
);
mainGame
->
btnShuffle
->
setVisible
(
false
);
mainGame
->
deckBuilder
.
result_string
[
0
]
=
L'0'
;
mainGame
->
deckBuilder
.
result_string
[
1
]
=
0
;
mainGame
->
deckBuilder
.
results
.
clear
();
...
...
@@ -460,9 +461,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
wInfos
->
setVisible
(
true
);
mainGame
->
wPhase
->
setVisible
(
true
);
mainGame
->
btnSideOK
->
setVisible
(
false
);
mainGame
->
btnDP
->
setVisible
(
false
);
mainGame
->
btnSP
->
setVisible
(
false
);
mainGame
->
btnM1
->
setVisible
(
false
);
mainGame
->
btnPhaseStatus
->
setVisible
(
false
);
mainGame
->
btnBP
->
setVisible
(
false
);
mainGame
->
btnM2
->
setVisible
(
false
);
mainGame
->
btnEP
->
setVisible
(
false
);
...
...
@@ -550,6 +549,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
btnChainAlways
->
setVisible
(
false
);
mainGame
->
btnChainWhenAvail
->
setVisible
(
false
);
mainGame
->
btnCancelOrFinish
->
setVisible
(
false
);
mainGame
->
btnShuffle
->
setVisible
(
false
);
time_t
nowtime
=
time
(
NULL
);
struct
tm
*
localedtime
=
localtime
(
&
nowtime
);
char
timebuf
[
40
];
...
...
@@ -1941,9 +1941,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
case
MSG_NEW_PHASE
:
{
unsigned
short
phase
=
BufferIO
::
ReadInt16
(
pbuf
);
mainGame
->
btnDP
->
setVisible
(
false
);
mainGame
->
btnSP
->
setVisible
(
false
);
mainGame
->
btnM1
->
setVisible
(
false
);
mainGame
->
btnPhaseStatus
->
setVisible
(
false
);
mainGame
->
btnBP
->
setVisible
(
false
);
mainGame
->
btnM2
->
setVisible
(
false
);
mainGame
->
btnEP
->
setVisible
(
false
);
...
...
@@ -1952,36 +1950,32 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
showcardp
=
0
;
switch
(
phase
)
{
case
PHASE_DRAW
:
mainGame
->
btn
DP
->
setVisible
(
true
);
mainGame
->
btn
PhaseStatus
->
setText
(
L"
\xff24\xff30
"
);
mainGame
->
showcardcode
=
4
;
break
;
case
PHASE_STANDBY
:
mainGame
->
btn
SP
->
setVisible
(
true
);
mainGame
->
btn
PhaseStatus
->
setText
(
L"
\xff33\xff30
"
);
mainGame
->
showcardcode
=
5
;
break
;
case
PHASE_MAIN1
:
mainGame
->
btn
M1
->
setVisible
(
true
);
mainGame
->
btn
PhaseStatus
->
setText
(
L"
\xff2d\xff11
"
);
mainGame
->
showcardcode
=
6
;
break
;
case
PHASE_BATTLE_START
:
mainGame
->
btnBP
->
setVisible
(
true
);
mainGame
->
btnBP
->
setPressed
(
true
);
mainGame
->
btnBP
->
setEnabled
(
false
);
mainGame
->
btnPhaseStatus
->
setText
(
L"
\xff22\xff30
"
);
mainGame
->
showcardcode
=
7
;
break
;
case
PHASE_MAIN2
:
mainGame
->
btnM2
->
setVisible
(
true
);
mainGame
->
btnM2
->
setPressed
(
true
);
mainGame
->
btnM2
->
setEnabled
(
false
);
mainGame
->
btnPhaseStatus
->
setText
(
L"
\xff2d\xff12
"
);
mainGame
->
showcardcode
=
8
;
break
;
case
PHASE_END
:
mainGame
->
btnEP
->
setVisible
(
true
);
mainGame
->
btnEP
->
setPressed
(
true
);
mainGame
->
btnEP
->
setEnabled
(
false
);
mainGame
->
btnPhaseStatus
->
setText
(
L"
\xff25\xff30
"
);
mainGame
->
showcardcode
=
9
;
break
;
}
mainGame
->
btnPhaseStatus
->
setPressed
(
true
);
mainGame
->
btnPhaseStatus
->
setVisible
(
true
);
if
(
!
mainGame
->
dInfo
.
isReplay
||
!
mainGame
->
dInfo
.
isReplaySkiping
)
{
mainGame
->
showcard
=
101
;
mainGame
->
WaitFrameSignal
(
40
);
...
...
gframe/event_handler.cpp
View file @
73df63ab
...
...
@@ -665,6 +665,10 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
ShowSelectCard
(
true
);
break
;
}
case
BUTTON_PHASE
:
{
mainGame
->
btnPhaseStatus
->
setPressed
(
true
);
break
;
}
case
BUTTON_BP
:
{
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_IDLECMD
)
{
DuelClient
::
SetResponseI
(
6
);
...
...
gframe/game.cpp
View file @
73df63ab
...
...
@@ -202,26 +202,16 @@ bool Game::Initialize() {
//phase
wPhase
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
480
,
310
,
855
,
330
));
wPhase
->
setVisible
(
false
);
btnDP
=
env
->
addButton
(
rect
<
s32
>
(
0
,
0
,
50
,
20
),
wPhase
,
-
1
,
L"
\xff24\xff30
"
);
btnDP
->
setEnabled
(
false
);
btnDP
->
setPressed
(
true
);
btnDP
->
setVisible
(
false
);
btnSP
=
env
->
addButton
(
rect
<
s32
>
(
65
,
0
,
115
,
20
),
wPhase
,
-
1
,
L"
\xff33\xff30
"
);
btnSP
->
setEnabled
(
false
);
btnSP
->
setPressed
(
true
);
btnSP
->
setVisible
(
false
);
btnM1
=
env
->
addButton
(
rect
<
s32
>
(
130
,
0
,
180
,
20
),
wPhase
,
-
1
,
L"
\xff2d\xff11
"
);
btnM1
->
setEnabled
(
false
);
btnM1
->
setPressed
(
true
);
btnM1
->
setVisible
(
false
);
btnBP
=
env
->
addButton
(
rect
<
s32
>
(
195
,
0
,
245
,
20
),
wPhase
,
BUTTON_BP
,
L"
\xff22\xff30
"
);
btnPhaseStatus
=
env
->
addButton
(
rect
<
s32
>
(
0
,
0
,
50
,
20
),
wPhase
,
BUTTON_PHASE
,
L""
);
btnPhaseStatus
->
setIsPushButton
(
true
);
btnPhaseStatus
->
setPressed
(
true
);
btnPhaseStatus
->
setVisible
(
false
);
btnBP
=
env
->
addButton
(
rect
<
s32
>
(
160
,
0
,
210
,
20
),
wPhase
,
BUTTON_BP
,
L"
\xff22\xff30
"
);
btnBP
->
setVisible
(
false
);
btnM2
=
env
->
addButton
(
rect
<
s32
>
(
260
,
0
,
3
10
,
20
),
wPhase
,
BUTTON_M2
,
L"
\xff2d\xff12
"
);
btnM2
=
env
->
addButton
(
rect
<
s32
>
(
160
,
0
,
2
10
,
20
),
wPhase
,
BUTTON_M2
,
L"
\xff2d\xff12
"
);
btnM2
->
setVisible
(
false
);
btnEP
=
env
->
addButton
(
rect
<
s32
>
(
32
5
,
0
,
375
,
20
),
wPhase
,
BUTTON_EP
,
L"
\xff25\xff30
"
);
btnEP
=
env
->
addButton
(
rect
<
s32
>
(
32
0
,
0
,
370
,
20
),
wPhase
,
BUTTON_EP
,
L"
\xff25\xff30
"
);
btnEP
->
setVisible
(
false
);
btnShuffle
=
env
->
addButton
(
rect
<
s32
>
(
0
,
0
,
50
,
20
),
wPhase
,
BUTTON_CMD_SHUFFLE
,
dataManager
.
GetSysString
(
1307
));
btnShuffle
->
setVisible
(
false
);
//tab
wInfos
=
env
->
addTabControl
(
rect
<
s32
>
(
1
,
275
,
301
,
639
),
0
,
true
);
wInfos
->
setVisible
(
false
);
...
...
@@ -582,6 +572,9 @@ bool Game::Initialize() {
//cancel or finish
btnCancelOrFinish
=
env
->
addButton
(
rect
<
s32
>
(
205
,
230
,
295
,
265
),
0
,
BUTTON_CANCEL_OR_FINISH
,
dataManager
.
GetSysString
(
1295
));
btnCancelOrFinish
->
setVisible
(
false
);
//shuffle
btnShuffle
=
env
->
addButton
(
rect
<
s32
>
(
205
,
230
,
295
,
265
),
0
,
BUTTON_CMD_SHUFFLE
,
dataManager
.
GetSysString
(
1297
));
btnShuffle
->
setVisible
(
false
);
//leave/surrender/exit
btnLeaveGame
=
env
->
addButton
(
rect
<
s32
>
(
205
,
5
,
295
,
80
),
0
,
BUTTON_LEAVE_GAME
,
L""
);
btnLeaveGame
->
setVisible
(
false
);
...
...
gframe/game.h
View file @
73df63ab
...
...
@@ -351,9 +351,7 @@ public:
irr
::
gui
::
IGUICheckBox
*
chkIgnore2
;
//phase button
irr
::
gui
::
IGUIStaticText
*
wPhase
;
irr
::
gui
::
IGUIButton
*
btnDP
;
irr
::
gui
::
IGUIButton
*
btnSP
;
irr
::
gui
::
IGUIButton
*
btnM1
;
irr
::
gui
::
IGUIButton
*
btnPhaseStatus
;
irr
::
gui
::
IGUIButton
*
btnBP
;
irr
::
gui
::
IGUIButton
*
btnM2
;
irr
::
gui
::
IGUIButton
*
btnEP
;
...
...
@@ -509,6 +507,7 @@ extern Game* mainGame;
#define BUTTON_CHAIN_ALWAYS 265
#define BUTTON_CHAIN_WHENAVAIL 266
#define BUTTON_CANCEL_OR_FINISH 267
#define BUTTON_PHASE 268
#define BUTTON_CLEAR_LOG 270
#define LISTBOX_LOG 271
#define SCROLL_CARDTEXT 280
...
...
strings.conf
View file @
73df63ab
...
...
@@ -302,6 +302,7 @@
!
system
1294
可用时点
!
system
1295
取消操作
!
system
1296
完成选择
!
system
1297
切洗手卡
!
system
1300
禁限卡表:
!
system
1301
卡组列表:
!
system
1302
保存
...
...
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