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
62674b86
Commit
62674b86
authored
Sep 09, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add button for cancel or finish
parent
e0d8cda7
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
218 additions
and
3 deletions
+218
-3
gframe/client_field.cpp
gframe/client_field.cpp
+7
-0
gframe/client_field.h
gframe/client_field.h
+2
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+10
-0
gframe/event_handler.cpp
gframe/event_handler.cpp
+190
-1
gframe/game.cpp
gframe/game.cpp
+4
-0
gframe/game.h
gframe/game.h
+3
-1
strings.conf
strings.conf
+2
-0
No files found.
gframe/client_field.cpp
View file @
62674b86
...
...
@@ -1131,6 +1131,7 @@ bool ClientField::ShowSelectSum(bool panelmode) {
if
(
CheckSelectSum
())
{
if
(
selectsum_cards
.
size
()
==
0
||
selectable_cards
.
size
()
==
0
)
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
{
...
...
@@ -1151,6 +1152,7 @@ bool ClientField::ShowSelectSum(bool panelmode) {
if
(
CheckSelectSum
())
{
if
(
selectsum_cards
.
size
()
==
0
||
selectable_cards
.
size
()
==
0
)
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
DuelClient
::
SendResponse
();
return
true
;
}
else
{
...
...
@@ -1165,6 +1167,11 @@ bool ClientField::ShowSelectSum(bool panelmode) {
}
else
select_ready
=
false
;
}
if
(
select_ready
)
{
ShowCancelOrFinishButton
(
1
);
}
else
{
ShowCancelOrFinishButton
(
0
);
}
return
false
;
}
bool
ClientField
::
CheckSelectSum
()
{
...
...
gframe/client_field.h
View file @
62674b86
...
...
@@ -126,7 +126,8 @@ public:
virtual
bool
OnEvent
(
const
irr
::
SEvent
&
event
);
void
GetHoverField
(
int
x
,
int
y
);
void
ShowMenu
(
int
flag
,
int
x
,
int
y
);
void
UpdateChainButtons
();
void
UpdateChainButtons
();
void
ShowCancelOrFinishButton
(
int
buttonOp
);
void
SetResponseSelectedCards
()
const
;
};
...
...
gframe/duelclient.cpp
View file @
62674b86
...
...
@@ -288,6 +288,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
btnChainIgnore
->
setVisible
(
false
);
mainGame
->
btnChainAlways
->
setVisible
(
false
);
mainGame
->
btnChainWhenAvail
->
setVisible
(
false
);
mainGame
->
btnCancelOrFinish
->
setVisible
(
false
);
mainGame
->
deckBuilder
.
result_string
[
0
]
=
L'0'
;
mainGame
->
deckBuilder
.
result_string
[
1
]
=
0
;
mainGame
->
deckBuilder
.
results
.
clear
();
...
...
@@ -510,6 +511,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
btnChainIgnore
->
setVisible
(
false
);
mainGame
->
btnChainAlways
->
setVisible
(
false
);
mainGame
->
btnChainWhenAvail
->
setVisible
(
false
);
mainGame
->
btnCancelOrFinish
->
setVisible
(
false
);
mainGame
->
stMessage
->
setText
(
dataManager
.
GetSysString
(
1500
));
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
gMutex
.
Unlock
();
...
...
@@ -539,6 +541,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
btnChainIgnore
->
setVisible
(
false
);
mainGame
->
btnChainAlways
->
setVisible
(
false
);
mainGame
->
btnChainWhenAvail
->
setVisible
(
false
);
mainGame
->
btnCancelOrFinish
->
setVisible
(
false
);
time_t
nowtime
=
time
(
NULL
);
struct
tm
*
localedtime
=
localtime
(
&
nowtime
);
char
timebuf
[
40
];
...
...
@@ -1179,6 +1182,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
stHintMsg
->
setText
(
textBuffer
);
mainGame
->
stHintMsg
->
setVisible
(
true
);
}
if
(
mainGame
->
dField
.
select_cancelable
)
{
mainGame
->
dField
.
ShowCancelOrFinishButton
(
1
);
}
return
false
;
}
case
MSG_SELECT_CHAIN
:
{
...
...
@@ -1412,6 +1418,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
stHintMsg
->
setText
(
textBuffer
);
mainGame
->
stHintMsg
->
setVisible
(
true
);
if
(
mainGame
->
dField
.
select_cancelable
)
{
mainGame
->
dField
.
ShowCancelOrFinishButton
(
1
);
}
mainGame
->
gMutex
.
Unlock
();
return
false
;
}
...
...
@@ -1875,6 +1884,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
btnChainIgnore
->
setVisible
(
false
);
mainGame
->
btnChainAlways
->
setVisible
(
false
);
mainGame
->
btnChainWhenAvail
->
setVisible
(
false
);
mainGame
->
btnCancelOrFinish
->
setVisible
(
false
);
}
}
if
(
mainGame
->
dInfo
.
isTag
&&
mainGame
->
dInfo
.
turn
!=
1
)
{
...
...
gframe/event_handler.cpp
View file @
62674b86
This diff is collapsed.
Click to expand it.
gframe/game.cpp
View file @
62674b86
...
...
@@ -541,6 +541,9 @@ bool Game::Initialize() {
btnChainIgnore
->
setVisible
(
false
);
btnChainAlways
->
setVisible
(
false
);
btnChainWhenAvail
->
setVisible
(
false
);
//cancel or finish
btnCancelOrFinish
=
env
->
addButton
(
rect
<
s32
>
(
205
,
230
,
295
,
265
),
0
,
BUTTON_CANCEL_OR_FINISH
,
dataManager
.
GetSysString
(
1295
));
btnCancelOrFinish
->
setVisible
(
false
);
//leave/surrender/exit
btnLeaveGame
=
env
->
addButton
(
rect
<
s32
>
(
205
,
5
,
295
,
80
),
0
,
BUTTON_LEAVE_GAME
,
L""
);
btnLeaveGame
->
setVisible
(
false
);
...
...
@@ -1122,6 +1125,7 @@ void Game::CloseDuelWindow() {
btnChainIgnore
->
setVisible
(
false
);
btnChainAlways
->
setVisible
(
false
);
btnChainWhenAvail
->
setVisible
(
false
);
btnCancelOrFinish
->
setVisible
(
false
);
wChat
->
setVisible
(
false
);
lstLog
->
clear
();
logParam
.
clear
();
...
...
gframe/game.h
View file @
62674b86
...
...
@@ -395,7 +395,8 @@ public:
irr
::
gui
::
IGUIButton
*
btnChainIgnore
;
irr
::
gui
::
IGUIButton
*
btnChainAlways
;
irr
::
gui
::
IGUIButton
*
btnChainWhenAvail
;
//cancel or finish
irr
::
gui
::
IGUIButton
*
btnCancelOrFinish
;
};
extern
Game
*
mainGame
;
...
...
@@ -486,6 +487,7 @@ extern Game* mainGame;
#define BUTTON_CHAIN_IGNORE 264
#define BUTTON_CHAIN_ALWAYS 265
#define BUTTON_CHAIN_WHENAVAIL 266
#define BUTTON_CANCEL_OR_FINISH 267
#define BUTTON_CLEAR_LOG 270
#define LISTBOX_LOG 271
#define SCROLL_CARDTEXT 280
...
...
strings.conf
View file @
62674b86
...
...
@@ -286,6 +286,8 @@
!
system
1292
忽略时点
!
system
1293
显示时点
!
system
1294
可用时点
!
system
1295
取消操作
!
system
1296
完成选择
!
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