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
nanahira
ygopro
Commits
c8eb0b1b
Commit
c8eb0b1b
authored
Sep 11, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide chain buttons when using mouse control
because the status of these buttons can be changed by mouse click
parent
fef019ac
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
16 deletions
+17
-16
gframe/deck_con.cpp
gframe/deck_con.cpp
+2
-2
gframe/duelclient.cpp
gframe/duelclient.cpp
+1
-1
gframe/event_handler.cpp
gframe/event_handler.cpp
+1
-1
gframe/game.cpp
gframe/game.cpp
+7
-7
gframe/game.h
gframe/game.h
+2
-2
strings.conf
strings.conf
+1
-1
system.conf
system.conf
+3
-2
No files found.
gframe/deck_con.cpp
View file @
c8eb0b1b
...
@@ -377,7 +377,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -377,7 +377,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case
irr
:
:
EET_MOUSE_INPUT_EVENT
:
{
case
irr
:
:
EET_MOUSE_INPUT_EVENT
:
{
switch
(
event
.
MouseInput
.
Event
)
{
switch
(
event
.
MouseInput
.
Event
)
{
case
irr
:
:
EMIE_LMOUSE_PRESSED_DOWN
:
{
case
irr
:
:
EMIE_LMOUSE_PRESSED_DOWN
:
{
position2d
<
s32
>
mouse_pos
=
position2d
<
s32
>
(
event
.
MouseInput
.
X
,
event
.
MouseInput
.
Y
);
irr
::
core
::
position2di
mouse_pos
(
event
.
MouseInput
.
X
,
event
.
MouseInput
.
Y
);
irr
::
gui
::
IGUIElement
*
root
=
mainGame
->
env
->
getRootGUIElement
();
irr
::
gui
::
IGUIElement
*
root
=
mainGame
->
env
->
getRootGUIElement
();
if
(
root
->
getElementFromPoint
(
mouse_pos
)
!=
root
)
if
(
root
->
getElementFromPoint
(
mouse_pos
)
!=
root
)
break
;
break
;
...
@@ -648,7 +648,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -648,7 +648,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case
irr
:
:
EMIE_MOUSE_MOVED
:
{
case
irr
:
:
EMIE_MOUSE_MOVED
:
{
int
x
=
event
.
MouseInput
.
X
;
int
x
=
event
.
MouseInput
.
X
;
int
y
=
event
.
MouseInput
.
Y
;
int
y
=
event
.
MouseInput
.
Y
;
position2d
<
s32
>
mouse_pos
=
position2d
<
s32
>
(
x
,
y
);
irr
::
core
::
position2di
mouse_pos
(
x
,
y
);
irr
::
gui
::
IGUIElement
*
root
=
mainGame
->
env
->
getRootGUIElement
();
irr
::
gui
::
IGUIElement
*
root
=
mainGame
->
env
->
getRootGUIElement
();
if
(
root
->
getElementFromPoint
(
mouse_pos
)
!=
root
)
if
(
root
->
getElementFromPoint
(
mouse_pos
)
!=
root
)
break
;
break
;
...
...
gframe/duelclient.cpp
View file @
c8eb0b1b
...
@@ -1875,7 +1875,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1875,7 +1875,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
btnLeaveGame
->
setVisible
(
true
);
mainGame
->
btnLeaveGame
->
setVisible
(
true
);
}
}
if
(
!
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
player_type
<
7
)
{
if
(
!
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
player_type
<
7
)
{
if
(
!
mainGame
->
chkHideChainButton
->
isChecked
()
)
{
if
(
mainGame
->
gameConf
.
control_mode
==
0
)
{
mainGame
->
btnChainIgnore
->
setVisible
(
true
);
mainGame
->
btnChainIgnore
->
setVisible
(
true
);
mainGame
->
btnChainAlways
->
setVisible
(
true
);
mainGame
->
btnChainAlways
->
setVisible
(
true
);
mainGame
->
btnChainWhenAvail
->
setVisible
(
true
);
mainGame
->
btnChainWhenAvail
->
setVisible
(
true
);
...
...
gframe/event_handler.cpp
View file @
c8eb0b1b
...
@@ -2176,7 +2176,7 @@ void ClientField::UpdateChainButtons() {
...
@@ -2176,7 +2176,7 @@ void ClientField::UpdateChainButtons() {
}
}
}
}
void
ClientField
::
ShowCancelOrFinishButton
(
int
buttonOp
)
{
void
ClientField
::
ShowCancelOrFinishButton
(
int
buttonOp
)
{
if
(
!
mainGame
->
chkHide
Chain
Button
->
isChecked
()
&&
!
mainGame
->
dInfo
.
isReplay
)
{
if
(
!
mainGame
->
chkHide
Hint
Button
->
isChecked
()
&&
!
mainGame
->
dInfo
.
isReplay
)
{
switch
(
buttonOp
)
{
switch
(
buttonOp
)
{
case
1
:
case
1
:
mainGame
->
btnCancelOrFinish
->
setText
(
dataManager
.
GetSysString
(
1295
));
mainGame
->
btnCancelOrFinish
->
setText
(
dataManager
.
GetSysString
(
1295
));
...
...
gframe/game.cpp
View file @
c8eb0b1b
...
@@ -241,8 +241,8 @@ bool Game::Initialize() {
...
@@ -241,8 +241,8 @@ bool Game::Initialize() {
chkIgnore2
->
setChecked
(
gameConf
.
chkIgnore2
!=
0
);
chkIgnore2
->
setChecked
(
gameConf
.
chkIgnore2
!=
0
);
chkHideSetname
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
260
,
280
,
285
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1354
));
chkHideSetname
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
260
,
280
,
285
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1354
));
chkHideSetname
->
setChecked
(
gameConf
.
chkHideSetname
!=
0
);
chkHideSetname
->
setChecked
(
gameConf
.
chkHideSetname
!=
0
);
chkHide
Chain
Button
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
290
,
280
,
315
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1355
));
chkHide
Hint
Button
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
290
,
280
,
315
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1355
));
chkHide
ChainButton
->
setChecked
(
gameConf
.
chkHideChain
Button
!=
0
);
chkHide
HintButton
->
setChecked
(
gameConf
.
chkHideHint
Button
!=
0
);
//
//
wHand
=
env
->
addWindow
(
rect
<
s32
>
(
500
,
450
,
825
,
605
),
false
,
L""
);
wHand
=
env
->
addWindow
(
rect
<
s32
>
(
500
,
450
,
825
,
605
),
false
,
L""
);
wHand
->
getCloseButton
()
->
setVisible
(
false
);
wHand
->
getCloseButton
()
->
setVisible
(
false
);
...
@@ -864,7 +864,7 @@ void Game::LoadConfig() {
...
@@ -864,7 +864,7 @@ void Game::LoadConfig() {
gameConf
.
chkIgnore1
=
0
;
gameConf
.
chkIgnore1
=
0
;
gameConf
.
chkIgnore2
=
0
;
gameConf
.
chkIgnore2
=
0
;
gameConf
.
chkHideSetname
=
0
;
gameConf
.
chkHideSetname
=
0
;
gameConf
.
chkHide
Chain
Button
=
0
;
gameConf
.
chkHide
Hint
Button
=
0
;
gameConf
.
control_mode
=
0
;
gameConf
.
control_mode
=
0
;
gameConf
.
draw_field_spell
=
1
;
gameConf
.
draw_field_spell
=
1
;
gameConf
.
separate_clear_button
=
1
;
gameConf
.
separate_clear_button
=
1
;
...
@@ -914,8 +914,8 @@ void Game::LoadConfig() {
...
@@ -914,8 +914,8 @@ void Game::LoadConfig() {
gameConf
.
chkIgnore2
=
atoi
(
valbuf
);
gameConf
.
chkIgnore2
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"hide_setname"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"hide_setname"
))
{
gameConf
.
chkHideSetname
=
atoi
(
valbuf
);
gameConf
.
chkHideSetname
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"hide_
chain
_button"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"hide_
hint
_button"
))
{
gameConf
.
chkHide
Chain
Button
=
atoi
(
valbuf
);
gameConf
.
chkHide
Hint
Button
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"control_mode"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"control_mode"
))
{
gameConf
.
control_mode
=
atoi
(
valbuf
);
gameConf
.
control_mode
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"draw_field_spell"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"draw_field_spell"
))
{
...
@@ -970,8 +970,8 @@ void Game::SaveConfig() {
...
@@ -970,8 +970,8 @@ void Game::SaveConfig() {
fprintf
(
fp
,
"mute_opponent = %d
\n
"
,
((
mainGame
->
chkIgnore1
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"mute_opponent = %d
\n
"
,
((
mainGame
->
chkIgnore1
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"mute_spectators = %d
\n
"
,
((
mainGame
->
chkIgnore2
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"mute_spectators = %d
\n
"
,
((
mainGame
->
chkIgnore2
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"hide_setname = %d
\n
"
,
((
mainGame
->
chkHideSetname
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"hide_setname = %d
\n
"
,
((
mainGame
->
chkHideSetname
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"hide_
chain_button = %d
\n
"
,
((
mainGame
->
chkHideChain
Button
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"hide_
hint_button = %d
\n
"
,
((
mainGame
->
chkHideHint
Button
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"#control_mode = 0: Key A/S/D/R
. control_mode = 1: MouseLeft/MouseRight/NULL/F9
\n
"
);
fprintf
(
fp
,
"#control_mode = 0: Key A/S/D/R
Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons
\n
"
);
fprintf
(
fp
,
"control_mode = %d
\n
"
,
gameConf
.
control_mode
);
fprintf
(
fp
,
"control_mode = %d
\n
"
,
gameConf
.
control_mode
);
fprintf
(
fp
,
"draw_field_spell = %d
\n
"
,
gameConf
.
draw_field_spell
);
fprintf
(
fp
,
"draw_field_spell = %d
\n
"
,
gameConf
.
draw_field_spell
);
fprintf
(
fp
,
"separate_clear_button = %d
\n
"
,
gameConf
.
separate_clear_button
);
fprintf
(
fp
,
"separate_clear_button = %d
\n
"
,
gameConf
.
separate_clear_button
);
...
...
gframe/game.h
View file @
c8eb0b1b
...
@@ -32,7 +32,7 @@ struct Config {
...
@@ -32,7 +32,7 @@ struct Config {
int
chkIgnore1
;
int
chkIgnore1
;
int
chkIgnore2
;
int
chkIgnore2
;
int
chkHideSetname
;
int
chkHideSetname
;
int
chkHide
Chain
Button
;
int
chkHide
Hint
Button
;
int
control_mode
;
int
control_mode
;
int
draw_field_spell
;
int
draw_field_spell
;
int
separate_clear_button
;
int
separate_clear_button
;
...
@@ -193,7 +193,7 @@ public:
...
@@ -193,7 +193,7 @@ public:
irr
::
gui
::
IGUICheckBox
*
chkAutoChain
;
irr
::
gui
::
IGUICheckBox
*
chkAutoChain
;
irr
::
gui
::
IGUICheckBox
*
chkWaitChain
;
irr
::
gui
::
IGUICheckBox
*
chkWaitChain
;
irr
::
gui
::
IGUICheckBox
*
chkHideSetname
;
irr
::
gui
::
IGUICheckBox
*
chkHideSetname
;
irr
::
gui
::
IGUICheckBox
*
chkHide
Chain
Button
;
irr
::
gui
::
IGUICheckBox
*
chkHide
Hint
Button
;
irr
::
gui
::
IGUIListBox
*
lstLog
;
irr
::
gui
::
IGUIListBox
*
lstLog
;
irr
::
gui
::
IGUIButton
*
btnClearLog
;
irr
::
gui
::
IGUIButton
*
btnClearLog
;
irr
::
gui
::
IGUIButton
*
btnSaveLog
;
irr
::
gui
::
IGUIButton
*
btnSaveLog
;
...
...
strings.conf
View file @
c8eb0b1b
...
@@ -340,7 +340,7 @@
...
@@ -340,7 +340,7 @@
!
system
1352
主要信息:
!
system
1352
主要信息:
!
system
1353
播放起始于回合:
!
system
1353
播放起始于回合:
!
system
1354
不显示卡片系列
!
system
1354
不显示卡片系列
!
system
1355
不显示
询问连锁
按钮
!
system
1355
不显示
提示
按钮
!
system
1360
上一步
!
system
1360
上一步
!
system
1370
星数↑
!
system
1370
星数↑
!
system
1371
攻击↑
!
system
1371
攻击↑
...
...
system.conf
View file @
c8eb0b1b
...
@@ -18,7 +18,8 @@ waitchain = 0
...
@@ -18,7 +18,8 @@ waitchain = 0
mute_opponent
=
0
mute_opponent
=
0
mute_spectators
=
0
mute_spectators
=
0
hide_setname
=
0
hide_setname
=
0
hide_
chain_button
=
0
hide_
hint_button
=
1
#control_mode = 0: Key A/S/D/R
. control_mode = 1: MouseLeft/MouseRight/NULL/F9
#control_mode = 0: Key A/S/D/R
Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons
control_mode
=
0
control_mode
=
0
draw_field_spell
=
1
draw_field_spell
=
1
separate_clear_button
=
1
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