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
e0f6e8b0
Commit
e0f6e8b0
authored
Apr 21, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test drag lstlog
parent
b3f64b31
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
0 deletions
+26
-0
Classes/gframe/client_field.cpp
Classes/gframe/client_field.cpp
+1
-0
Classes/gframe/client_field.h
Classes/gframe/client_field.h
+1
-0
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+24
-0
No files found.
Classes/gframe/client_field.cpp
View file @
e0f6e8b0
...
...
@@ -14,6 +14,7 @@ ClientField::ClientField() {
panel
=
0
;
//drag tab
is_dragging_cardtext
=
false
;
is_dragging_lstLog
=
false
;
is_dragging_tabHelper
=
false
;
is_dragging_tabSystem
=
false
;
dragging_tab_start_pos
=
0
;
...
...
Classes/gframe/client_field.h
View file @
e0f6e8b0
...
...
@@ -119,6 +119,7 @@ public:
irr
::
gui
::
IGUIElement
*
panel
;
bool
is_dragging_cardtext
;
bool
is_dragging_lstLog
;
bool
is_dragging_tabHelper
;
bool
is_dragging_tabSystem
;
int
dragging_tab_start_pos
;
...
...
Classes/gframe/event_handler.cpp
View file @
e0f6e8b0
...
...
@@ -1987,6 +1987,15 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
dragging_tab_start_y
=
event
.
MouseInput
.
Y
;
return
true
;
}
if
(
root
->
getElementFromPoint
(
mousepos
)
==
mainGame
->
lstLog
)
{
if
(
!
mainGame
->
lstLog
->
getVerticalScrollBar
()
->
isVisible
())
{
break
;
}
is_dragging_lstLog
=
true
;
dragging_tab_start_pos
=
mainGame
->
lstLog
->
getVerticalScrollBar
()
->
getPos
();
dragging_tab_start_y
=
event
.
MouseInput
.
Y
;
return
true
;
}
if
(
root
->
getElementFromPoint
(
mousepos
)
==
mainGame
->
tabHelper
){
if
(
!
mainGame
->
scrTabHelper
->
isVisible
())
{
break
;
...
...
@@ -2016,6 +2025,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
break
;
}
//touch the pic of detail to refresh textfonts
is_dragging_cardtext
=
false
;
is_dragging_lstLog
=
false
;
is_dragging_tabHelper
=
false
;
is_dragging_tabSystem
=
false
;
break
;
...
...
@@ -2034,6 +2044,20 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
mainGame
->
scrCardText
->
setPos
(
pos
);
mainGame
->
SetStaticText
(
mainGame
->
stText
,
mainGame
->
stText
->
getRelativePosition
().
getWidth
()
-
25
,
mainGame
->
guiFont
,
mainGame
->
showingtext
,
pos
);
}
if
(
is_dragging_lstLog
)
{
if
(
!
mainGame
->
lstLog
->
getVerticalScrollBar
()
->
isVisible
())
{
is_dragging_lstLog
=
false
;
break
;
}
rect
<
s32
>
lstLogpos
=
mainGame
->
lstLog
->
getRelativePosition
();
int
pos
=
dragging_tab_start_pos
+
((
dragging_tab_start_y
-
event
.
MouseInput
.
Y
)
/
mainGame
->
lstLog
->
getItemCount
())
*
10
*
mainGame
->
yScale
;
int
max
=
mainGame
->
lstLog
->
getVerticalScrollBar
()
->
getMax
();
if
(
pos
<
0
)
pos
=
0
;
if
(
pos
>
max
)
pos
=
max
;
mainGame
->
lstLog
->
getVerticalScrollBar
()
->
setPos
(
pos
);
mainGame
->
lstLog
->
setRelativePosition
(
recti
(
10
*
mainGame
->
xScale
,
10
*
mainGame
->
yScale
+
mainGame
->
lstLog
->
getVerticalScrollBar
()
->
getPos
()
*
-
1
,
lstLogpos
.
LowerRightCorner
.
X
,
lstLogpos
.
LowerRightCorner
.
Y
));
}
if
(
is_dragging_tabHelper
)
{
if
(
!
mainGame
->
scrTabHelper
->
isVisible
())
{
is_dragging_tabHelper
=
false
;
...
...
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