Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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-Cn-Ko-En
Commits
60a6d555
Commit
60a6d555
authored
Apr 20, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix drag tabhelper & tabsystem
parent
79620b2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+6
-13
No files found.
Classes/gframe/event_handler.cpp
View file @
60a6d555
...
@@ -1065,13 +1065,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1065,13 +1065,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
s32
y
=
event
.
MouseInput
.
Y
;
s32
y
=
event
.
MouseInput
.
Y
;
hovered_location
=
0
;
hovered_location
=
0
;
irr
::
core
::
position2di
pos
(
x
,
y
);
irr
::
core
::
position2di
pos
(
x
,
y
);
if
(
x
<
(
200
*
mainGame
->
xScale
)
&&
y
<
(
270
*
mainGame
->
yScale
))
{
mainGame
->
gMutex
.
lock
();
mainGame
->
textFont
->
setTransparency
(
true
);
mainGame
->
ClearChatMsg
();
mainGame
->
gMutex
.
unlock
();
break
;
}
//touch the pic of detail to refresh textfonts
if
(
x
<
300
*
mainGame
->
xScale
)
if
(
x
<
300
*
mainGame
->
xScale
)
break
;
break
;
if
(
mainGame
->
gameConf
.
control_mode
==
1
)
{
if
(
mainGame
->
gameConf
.
control_mode
==
1
)
{
...
@@ -1995,18 +1988,18 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
...
@@ -1995,18 +1988,18 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return
true
;
return
true
;
}
}
if
(
root
->
getElementFromPoint
(
mousepos
)
==
mainGame
->
tabHelper
){
if
(
root
->
getElementFromPoint
(
mousepos
)
==
mainGame
->
tabHelper
){
/*
if(!mainGame->scrTabHelper->isVisible()) {
if
(
!
mainGame
->
scrTabHelper
->
isVisible
())
{
break
;
break
;
}
*/
}
is_dragging_tabHelper
=
true
;
is_dragging_tabHelper
=
true
;
dragging_tabHelper_start_pos
=
mainGame
->
scrTabHelper
->
getPos
();
dragging_tabHelper_start_pos
=
mainGame
->
scrTabHelper
->
getPos
();
dragging_tabHelper_start_y
=
event
.
MouseInput
.
Y
;
dragging_tabHelper_start_y
=
event
.
MouseInput
.
Y
;
return
true
;
return
true
;
}
}
if
(
root
->
getElementFromPoint
(
mousepos
)
==
mainGame
->
tabSystem
){
if
(
root
->
getElementFromPoint
(
mousepos
)
==
mainGame
->
tabSystem
){
/*
if(!mainGame->scrTabSystem->isVisible()) {
if
(
!
mainGame
->
scrTabSystem
->
isVisible
())
{
break
;
break
;
}
*/
}
is_dragging_tabSystem
=
true
;
is_dragging_tabSystem
=
true
;
dragging_tabSystem_start_pos
=
mainGame
->
scrTabSystem
->
getPos
();
dragging_tabSystem_start_pos
=
mainGame
->
scrTabSystem
->
getPos
();
dragging_tabSystem_start_y
=
event
.
MouseInput
.
Y
;
dragging_tabSystem_start_y
=
event
.
MouseInput
.
Y
;
...
@@ -2045,7 +2038,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
...
@@ -2045,7 +2038,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
if
(
pos
<
0
)
pos
=
0
;
if
(
pos
<
0
)
pos
=
0
;
if
(
pos
>
max
)
pos
=
max
;
if
(
pos
>
max
)
pos
=
max
;
mainGame
->
scrTabHelper
->
setPos
(
pos
);
mainGame
->
scrTabHelper
->
setPos
(
pos
);
mainGame
->
tabHelper
->
setRelativePosition
(
recti
(
0
,
mainGame
->
scrTabHelper
->
getPos
()
*
-
1
,
tabHelperpos
.
LowerRightCorner
.
X
,
tabHelperpos
.
LowerRightCorner
.
Y
-
event
.
MouseInput
.
Y
));
mainGame
->
tabHelper
->
setRelativePosition
(
recti
(
0
,
mainGame
->
scrTabHelper
->
getPos
()
*
-
1
,
tabHelperpos
.
LowerRightCorner
.
X
,
tabHelperpos
.
LowerRightCorner
.
Y
));
}
}
if
(
is_dragging_tabSystem
)
{
if
(
is_dragging_tabSystem
)
{
if
(
!
mainGame
->
scrTabSystem
->
isVisible
())
{
if
(
!
mainGame
->
scrTabSystem
->
isVisible
())
{
...
@@ -2058,7 +2051,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
...
@@ -2058,7 +2051,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
if
(
pos
<
0
)
pos
=
0
;
if
(
pos
<
0
)
pos
=
0
;
if
(
pos
>
max
)
pos
=
max
;
if
(
pos
>
max
)
pos
=
max
;
mainGame
->
scrTabSystem
->
setPos
(
pos
);
mainGame
->
scrTabSystem
->
setPos
(
pos
);
mainGame
->
tab
Helper
->
setRelativePosition
(
recti
(
0
,
mainGame
->
scrTabHelper
->
getPos
()
*
-
1
,
tabSystempos
.
LowerRightCorner
.
X
,
tabSystempos
.
LowerRightCorner
.
Y
-
event
.
MouseInput
.
Y
));
mainGame
->
tab
System
->
setRelativePosition
(
recti
(
0
,
mainGame
->
scrTabSystem
->
getPos
()
*
-
1
,
tabSystempos
.
LowerRightCorner
.
X
,
tabSystempos
.
LowerRightCorner
.
Y
));
}
}
break
;
break
;
}
}
...
...
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