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
93c5688b
Commit
93c5688b
authored
Apr 24, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bool is_selectable
parent
88414a0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+6
-12
No files found.
Classes/gframe/event_handler.cpp
View file @
93c5688b
...
...
@@ -1978,13 +1978,10 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
case
irr
:
:
EET_MOUSE_INPUT_EVENT
:
{
IGUIElement
*
root
=
mainGame
->
env
->
getRootGUIElement
();
position2di
mousepos
=
position2di
(
event
.
MouseInput
.
X
,
event
.
MouseInput
.
Y
);
int
presstime
,
leftuptime
;
u32
static
presstime
,
leftuptime
;
switch
(
event
.
MouseInput
.
Event
)
{
case
irr
:
:
EMIE_LMOUSE_PRESSED_DOWN
:
{
presstime
=
mainGame
->
device
->
getTimer
()
->
getTime
();
char
logPresstime
[
256
];
sprintf
(
logPresstime
,
"按下time=%d"
,
presstime
);
os
::
Printer
::
log
(
logPresstime
);
presstime
=
mainGame
->
device
->
getTimer
()
->
getRealTime
();
//vertical scrollbar
if
(
root
->
getElementFromPoint
(
mousepos
)
==
mainGame
->
stText
)
{
if
(
!
mainGame
->
scrCardText
->
isVisible
())
{
...
...
@@ -2093,10 +2090,6 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
break
;
}
case
irr
:
:
EMIE_LMOUSE_LEFT_UP
:
{
leftuptime
=
mainGame
->
device
->
getTimer
()
->
getTime
();
char
logleftuptime
[
256
];
sprintf
(
logleftuptime
,
"放开time=%d"
,
leftuptime
);
os
::
Printer
::
log
(
logleftuptime
);
if
(
root
->
getElementFromPoint
(
mousepos
)
==
mainGame
->
stText
||
root
->
getElementFromPoint
(
mousepos
)
==
mainGame
->
wHostPrepare
)
{
mainGame
->
gMutex
.
lock
();
...
...
@@ -2105,10 +2098,11 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
mainGame
->
gMutex
.
unlock
();
break
;
}
//touch the target place to refresh textfonts
if
(
leftuptime
-
presstime
>
100
||
presstime
-
leftuptime
>
100
)
{
is_selectable
=
false
;
}
else
{
leftuptime
=
mainGame
->
device
->
getTimer
()
->
getRealTime
();
if
(
leftuptime
-
presstime
>
0
&&
leftuptime
-
presstime
<
200
)
{
is_selectable
=
true
;
}
else
{
is_selectable
=
false
;
}
is_dragging_cardtext
=
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