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
741b3027
Commit
741b3027
authored
Apr 21, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drag录像,残局,人机,卡组列表
parent
629f8b54
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
1 deletion
+102
-1
Classes/gframe/client_field.cpp
Classes/gframe/client_field.cpp
+5
-1
Classes/gframe/client_field.h
Classes/gframe/client_field.h
+4
-0
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+93
-0
No files found.
Classes/gframe/client_field.cpp
View file @
741b3027
...
...
@@ -12,11 +12,15 @@ namespace ygo {
ClientField
::
ClientField
()
{
panel
=
0
;
//drag
tab
//drag
cardtext and lists
is_dragging_cardtext
=
false
;
is_dragging_lstLog
=
false
;
is_dragging_tabHelper
=
false
;
is_dragging_tabSystem
=
false
;
is_dragging_lstReplayList
=
false
;
is_dragging_lstSinglePlayList
=
false
;
is_dragging_lstBotList
=
false
;
is_dragging_lstDecks
=
false
;
dragging_tab_start_pos
=
0
;
dragging_tab_start_y
=
0
;
...
...
Classes/gframe/client_field.h
View file @
741b3027
...
...
@@ -122,6 +122,10 @@ public:
bool
is_dragging_lstLog
;
bool
is_dragging_tabHelper
;
bool
is_dragging_tabSystem
;
bool
is_dragging_lstReplayList
;
bool
is_dragging_lstSinglePlayList
;
bool
is_dragging_lstBotList
;
bool
is_dragging_lstDecks
;
int
dragging_tab_start_pos
;
int
dragging_tab_start_y
;
std
::
vector
<
int
>
ancard
;
...
...
Classes/gframe/event_handler.cpp
View file @
741b3027
...
...
@@ -1996,6 +1996,43 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
dragging_tab_start_y
=
event
.
MouseInput
.
Y
;
return
true
;
}
if
(
root
->
getElementFromPoint
(
mousepos
)
==
mainGame
->
lstReplayList
)
{
if
(
!
mainGame
->
lstReplayList
->
getVerticalScrollBar
()
->
isVisible
())
{
break
;
}
is_dragging_lstReplayList
=
true
;
dragging_tab_start_pos
=
mainGame
->
lstReplayList
->
getVerticalScrollBar
()
->
getPos
();
dragging_tab_start_y
=
event
.
MouseInput
.
Y
;
return
true
;
}
if
(
root
->
getElementFromPoint
(
mousepos
)
==
mainGame
->
lstSinglePlayList
)
{
if
(
!
mainGame
->
lstSinglePlayList
->
getVerticalScrollBar
()
->
isVisible
())
{
break
;
}
is_dragging_lstSinglePlayList
=
true
;
dragging_tab_start_pos
=
mainGame
->
lstSinglePlayList
->
getVerticalScrollBar
()
->
getPos
();
dragging_tab_start_y
=
event
.
MouseInput
.
Y
;
return
true
;
}
if
(
root
->
getElementFromPoint
(
mousepos
)
==
mainGame
->
lstBotList
)
{
if
(
!
mainGame
->
lstBotList
->
getVerticalScrollBar
()
->
isVisible
())
{
break
;
}
is_dragging_lstBotList
=
true
;
dragging_tab_start_pos
=
mainGame
->
lstBotList
->
getVerticalScrollBar
()
->
getPos
();
dragging_tab_start_y
=
event
.
MouseInput
.
Y
;
return
true
;
}
if
(
root
->
getElementFromPoint
(
mousepos
)
==
mainGame
->
lstDecks
)
{
if
(
!
mainGame
->
lstDecks
->
getVerticalScrollBar
()
->
isVisible
())
{
break
;
}
is_dragging_lstDecks
=
true
;
dragging_tab_start_pos
=
mainGame
->
lstDecks
->
getVerticalScrollBar
()
->
getPos
();
dragging_tab_start_y
=
event
.
MouseInput
.
Y
;
return
true
;
}
if
(
root
->
getElementFromPoint
(
mousepos
)
==
mainGame
->
tabHelper
){
if
(
!
mainGame
->
scrTabHelper
->
isVisible
())
{
break
;
...
...
@@ -2026,6 +2063,10 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
}
//touch the pic of detail to refresh textfonts
is_dragging_cardtext
=
false
;
is_dragging_lstLog
=
false
;
is_dragging_lstReplayList
=
false
;
is_dragging_lstSinglePlayList
=
false
;
is_dragging_lstBotList
=
false
;
is_dragging_lstDecks
=
false
;
is_dragging_tabHelper
=
false
;
is_dragging_tabSystem
=
false
;
break
;
...
...
@@ -2056,6 +2097,58 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
if
(
pos
>
max
)
pos
=
max
;
mainGame
->
lstLog
->
getVerticalScrollBar
()
->
setPos
(
pos
);
mainGame
->
lstLog
->
getItemAt
(
lstLogpos
.
UpperLeftCorner
.
X
,
mainGame
->
lstLog
->
getVerticalScrollBar
()
->
getPos
());
}
if
(
is_dragging_lstReplayList
)
{
if
(
!
mainGame
->
lstReplayList
->
getVerticalScrollBar
()
->
isVisible
())
{
is_dragging_lstReplayList
=
false
;
break
;
}
rect
<
s32
>
lstReplayListpos
=
mainGame
->
lstReplayList
->
getRelativePosition
();
int
pos
=
dragging_tab_start_pos
+
((
dragging_tab_start_y
-
event
.
MouseInput
.
Y
));
int
max
=
mainGame
->
lstReplayList
->
getVerticalScrollBar
()
->
getMax
();
if
(
pos
<
0
)
pos
=
0
;
if
(
pos
>
max
)
pos
=
max
;
mainGame
->
lstReplayList
->
getVerticalScrollBar
()
->
setPos
(
pos
);
mainGame
->
lstReplayList
->
getItemAt
(
lstReplayListpos
.
UpperLeftCorner
.
X
,
mainGame
->
lstReplayList
->
getVerticalScrollBar
()
->
getPos
());
}
if
(
is_dragging_lstSinglePlayList
)
{
if
(
!
mainGame
->
lstSinglePlayList
->
getVerticalScrollBar
()
->
isVisible
())
{
is_dragging_lstSinglePlayList
=
false
;
break
;
}
rect
<
s32
>
lstSinglePlayListpos
=
mainGame
->
lstSinglePlayList
->
getRelativePosition
();
int
pos
=
dragging_tab_start_pos
+
((
dragging_tab_start_y
-
event
.
MouseInput
.
Y
));
int
max
=
mainGame
->
lstSinglePlayList
->
getVerticalScrollBar
()
->
getMax
();
if
(
pos
<
0
)
pos
=
0
;
if
(
pos
>
max
)
pos
=
max
;
mainGame
->
lstSinglePlayList
->
getVerticalScrollBar
()
->
setPos
(
pos
);
mainGame
->
lstSinglePlayList
->
getItemAt
(
lstSinglePlayListpos
.
UpperLeftCorner
.
X
,
mainGame
->
lstSinglePlayList
->
getVerticalScrollBar
()
->
getPos
());
}
if
(
is_dragging_lstBotList
)
{
if
(
!
mainGame
->
lstBotList
->
getVerticalScrollBar
()
->
isVisible
())
{
is_dragging_lstBotList
=
false
;
break
;
}
rect
<
s32
>
lstBotListpos
=
mainGame
->
lstBotList
->
getRelativePosition
();
int
pos
=
dragging_tab_start_pos
+
((
dragging_tab_start_y
-
event
.
MouseInput
.
Y
));
int
max
=
mainGame
->
lstBotList
->
getVerticalScrollBar
()
->
getMax
();
if
(
pos
<
0
)
pos
=
0
;
if
(
pos
>
max
)
pos
=
max
;
mainGame
->
lstBotList
->
getVerticalScrollBar
()
->
setPos
(
pos
);
mainGame
->
lstBotList
->
getItemAt
(
lstBotListpos
.
UpperLeftCorner
.
X
,
mainGame
->
lstBotList
->
getVerticalScrollBar
()
->
getPos
());
}
if
(
is_dragging_lstDecks
)
{
if
(
!
mainGame
->
lstDecks
->
getVerticalScrollBar
()
->
isVisible
())
{
is_dragging_lstDecks
=
false
;
break
;
}
rect
<
s32
>
lstDeckspos
=
mainGame
->
lstDecks
->
getRelativePosition
();
int
pos
=
dragging_tab_start_pos
+
((
dragging_tab_start_y
-
event
.
MouseInput
.
Y
));
int
max
=
mainGame
->
lstDecks
->
getVerticalScrollBar
()
->
getMax
();
if
(
pos
<
0
)
pos
=
0
;
if
(
pos
>
max
)
pos
=
max
;
mainGame
->
lstDecks
->
getVerticalScrollBar
()
->
setPos
(
pos
);
mainGame
->
lstDecks
->
getItemAt
(
lstDeckspos
.
UpperLeftCorner
.
X
,
mainGame
->
lstDecks
->
getVerticalScrollBar
()
->
getPos
());
}
if
(
is_dragging_tabHelper
)
{
if
(
!
mainGame
->
scrTabHelper
->
isVisible
())
{
...
...
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