Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
cc5543bf
Commit
cc5543bf
authored
Sep 13, 2022
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable BP M2 EP buttons on showing menu
parent
8ee21326
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
13 deletions
+24
-13
Classes/gframe/client_field.h
Classes/gframe/client_field.h
+1
-0
Classes/gframe/duelclient.cpp
Classes/gframe/duelclient.cpp
+1
-1
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+22
-12
No files found.
Classes/gframe/client_field.h
View file @
cc5543bf
...
@@ -156,6 +156,7 @@ public:
...
@@ -156,6 +156,7 @@ public:
virtual
bool
OnCommonEvent
(
const
irr
::
SEvent
&
event
);
virtual
bool
OnCommonEvent
(
const
irr
::
SEvent
&
event
);
void
GetHoverField
(
int
x
,
int
y
);
void
GetHoverField
(
int
x
,
int
y
);
void
ShowMenu
(
int
flag
,
int
x
,
int
y
);
void
ShowMenu
(
int
flag
,
int
x
,
int
y
);
void
HideMenu
();
void
UpdateChainButtons
();
void
UpdateChainButtons
();
void
ShowCancelOrFinishButton
(
int
buttonOp
);
void
ShowCancelOrFinishButton
(
int
buttonOp
);
void
SetShowMark
(
ClientCard
*
pcard
,
bool
enable
);
void
SetShowMark
(
ClientCard
*
pcard
,
bool
enable
);
...
...
Classes/gframe/duelclient.cpp
View file @
cc5543bf
...
@@ -884,7 +884,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -884,7 +884,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
memcpy
(
last_successful_msg
,
msg
,
len
);
memcpy
(
last_successful_msg
,
msg
,
len
);
last_successful_msg_length
=
len
;
last_successful_msg_length
=
len
;
}
}
mainGame
->
wCmdMenu
->
setVisible
(
false
);
mainGame
->
dField
.
HideMenu
(
);
if
(
!
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
curMsg
!=
MSG_WAITING
&&
mainGame
->
dInfo
.
curMsg
!=
MSG_CARD_SELECTED
)
{
if
(
!
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
curMsg
!=
MSG_WAITING
&&
mainGame
->
dInfo
.
curMsg
!=
MSG_CARD_SELECTED
)
{
mainGame
->
waitFrame
=
-
1
;
mainGame
->
waitFrame
=
-
1
;
mainGame
->
stHintMsg
->
setVisible
(
false
);
mainGame
->
stHintMsg
->
setVisible
(
false
);
...
...
Classes/gframe/event_handler.cpp
View file @
cc5543bf
...
@@ -431,7 +431,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -431,7 +431,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
}
case
BUTTON_CMD_ACTIVATE
:
case
BUTTON_CMD_ACTIVATE
:
case
BUTTON_CMD_RESET
:
{
case
BUTTON_CMD_RESET
:
{
mainGame
->
wCmdMenu
->
setVisible
(
false
);
HideMenu
(
);
ShowCancelOrFinishButton
(
0
);
ShowCancelOrFinishButton
(
0
);
if
(
!
list_command
)
{
if
(
!
list_command
)
{
if
(
!
menu_card
)
if
(
!
menu_card
)
...
@@ -517,7 +517,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -517,7 +517,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_CMD_SUMMON
:
{
case
BUTTON_CMD_SUMMON
:
{
mainGame
->
wCmdMenu
->
setVisible
(
false
);
HideMenu
(
);
if
(
!
menu_card
)
if
(
!
menu_card
)
break
;
break
;
for
(
size_t
i
=
0
;
i
<
summonable_cards
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
summonable_cards
.
size
();
++
i
)
{
...
@@ -531,7 +531,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -531,7 +531,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_CMD_SPSUMMON
:
{
case
BUTTON_CMD_SPSUMMON
:
{
mainGame
->
wCmdMenu
->
setVisible
(
false
);
HideMenu
(
);
if
(
!
list_command
)
{
if
(
!
list_command
)
{
if
(
!
menu_card
)
if
(
!
menu_card
)
break
;
break
;
...
@@ -574,7 +574,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -574,7 +574,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_CMD_MSET
:
{
case
BUTTON_CMD_MSET
:
{
mainGame
->
wCmdMenu
->
setVisible
(
false
);
HideMenu
(
);
if
(
!
menu_card
)
if
(
!
menu_card
)
break
;
break
;
for
(
size_t
i
=
0
;
i
<
msetable_cards
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
msetable_cards
.
size
();
++
i
)
{
...
@@ -587,7 +587,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -587,7 +587,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_CMD_SSET
:
{
case
BUTTON_CMD_SSET
:
{
mainGame
->
wCmdMenu
->
setVisible
(
false
);
HideMenu
(
);
if
(
!
menu_card
)
if
(
!
menu_card
)
break
;
break
;
for
(
size_t
i
=
0
;
i
<
ssetable_cards
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
ssetable_cards
.
size
();
++
i
)
{
...
@@ -600,7 +600,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -600,7 +600,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_CMD_REPOS
:
{
case
BUTTON_CMD_REPOS
:
{
mainGame
->
wCmdMenu
->
setVisible
(
false
);
HideMenu
(
);
if
(
!
menu_card
)
if
(
!
menu_card
)
break
;
break
;
for
(
size_t
i
=
0
;
i
<
reposable_cards
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
reposable_cards
.
size
();
++
i
)
{
...
@@ -613,7 +613,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -613,7 +613,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_CMD_ATTACK
:
{
case
BUTTON_CMD_ATTACK
:
{
mainGame
->
wCmdMenu
->
setVisible
(
false
);
HideMenu
(
);
if
(
!
menu_card
)
if
(
!
menu_card
)
break
;
break
;
for
(
size_t
i
=
0
;
i
<
attackable_cards
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
attackable_cards
.
size
();
++
i
)
{
...
@@ -626,7 +626,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -626,7 +626,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_CMD_SHOWLIST
:
{
case
BUTTON_CMD_SHOWLIST
:
{
mainGame
->
wCmdMenu
->
setVisible
(
false
);
HideMenu
(
);
selectable_cards
.
clear
();
selectable_cards
.
clear
();
wchar_t
formatBuffer
[
2048
];
wchar_t
formatBuffer
[
2048
];
switch
(
command_location
)
{
switch
(
command_location
)
{
...
@@ -1143,7 +1143,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1143,7 +1143,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
UpdateChainButtons
();
UpdateChainButtons
();
}
}
if
(
mainGame
->
wCmdMenu
->
isVisible
()
&&
!
mainGame
->
wCmdMenu
->
getRelativePosition
().
isPointInside
(
pos
))
if
(
mainGame
->
wCmdMenu
->
isVisible
()
&&
!
mainGame
->
wCmdMenu
->
getRelativePosition
().
isPointInside
(
pos
))
mainGame
->
wCmdMenu
->
setVisible
(
false
);
HideMenu
();
if
(
mainGame
->
btnBP
->
isVisible
()
&&
mainGame
->
btnBP
->
getAbsolutePosition
().
isPointInside
(
pos
))
break
;
if
(
mainGame
->
btnM2
->
isVisible
()
&&
mainGame
->
btnM2
->
getAbsolutePosition
().
isPointInside
(
pos
))
break
;
if
(
panel
&&
panel
->
isVisible
())
if
(
panel
&&
panel
->
isVisible
())
break
;
break
;
GetHoverField
(
x
,
y
);
GetHoverField
(
x
,
y
);
...
@@ -1549,7 +1553,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1549,7 +1553,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
UpdateChainButtons
();
UpdateChainButtons
();
}
}
mainGame
->
HideElement
(
mainGame
->
wSurrender
);
mainGame
->
HideElement
(
mainGame
->
wSurrender
);
mainGame
->
wCmdMenu
->
setVisible
(
false
);
HideMenu
(
);
if
(
mainGame
->
fadingList
.
size
())
if
(
mainGame
->
fadingList
.
size
())
break
;
break
;
CancelOrFinish
();
CancelOrFinish
();
...
@@ -1631,7 +1635,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1631,7 +1635,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
}
if
(
mcard
)
{
if
(
mcard
)
{
if
(
mcard
!=
menu_card
)
if
(
mcard
!=
menu_card
)
mainGame
->
wCmdMenu
->
setVisible
(
false
);
HideMenu
(
);
if
(
hovered_location
==
LOCATION_HAND
)
{
if
(
hovered_location
==
LOCATION_HAND
)
{
mcard
->
is_hovered
=
true
;
mcard
->
is_hovered
=
true
;
MoveCard
(
mcard
,
5
);
MoveCard
(
mcard
,
5
);
...
@@ -2557,7 +2561,7 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -2557,7 +2561,7 @@ void ClientField::GetHoverField(int x, int y) {
}
}
void
ClientField
::
ShowMenu
(
int
flag
,
int
x
,
int
y
)
{
void
ClientField
::
ShowMenu
(
int
flag
,
int
x
,
int
y
)
{
if
(
!
flag
)
{
if
(
!
flag
)
{
mainGame
->
wCmdMenu
->
setVisible
(
false
);
HideMenu
(
);
return
;
return
;
}
}
menu_card
=
clicked_card
;
menu_card
=
clicked_card
;
...
@@ -2646,6 +2650,12 @@ void ClientField::ShowMenu(int flag, int x, int y) {
...
@@ -2646,6 +2650,12 @@ void ClientField::ShowMenu(int flag, int x, int y) {
mainGame
->
wCmdMenu
->
setVisible
(
true
);
mainGame
->
wCmdMenu
->
setVisible
(
true
);
mainGame
->
wCmdMenu
->
setRelativePosition
(
irr
::
core
::
recti
(
x
-
10
*
mainGame
->
xScale
,
y
-
30
*
mainGame
->
yScale
-
height
,
x
+
100
*
mainGame
->
xScale
,
y
-
20
*
mainGame
->
yScale
));
mainGame
->
wCmdMenu
->
setRelativePosition
(
irr
::
core
::
recti
(
x
-
10
*
mainGame
->
xScale
,
y
-
30
*
mainGame
->
yScale
-
height
,
x
+
100
*
mainGame
->
xScale
,
y
-
20
*
mainGame
->
yScale
));
}
}
void
ClientField
::
HideMenu
()
{
mainGame
->
wCmdMenu
->
setVisible
(
false
);
mainGame
->
btnBP
->
setEnabled
(
true
);
mainGame
->
btnM2
->
setEnabled
(
true
);
mainGame
->
btnEP
->
setEnabled
(
true
);
}
void
ClientField
::
UpdateChainButtons
()
{
void
ClientField
::
UpdateChainButtons
()
{
if
(
mainGame
->
btnChainAlways
->
isVisible
())
{
if
(
mainGame
->
btnChainAlways
->
isVisible
())
{
mainGame
->
btnChainIgnore
->
setPressed
(
mainGame
->
ignore_chain
);
mainGame
->
btnChainIgnore
->
setPressed
(
mainGame
->
ignore_chain
);
...
...
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