Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
baichixing
ygopro
Commits
9c3e3db6
Commit
9c3e3db6
authored
Jul 04, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix & update
parent
a2aac58a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
gframe/deck_con.cpp
gframe/deck_con.cpp
+21
-9
gframe/deck_con.h
gframe/deck_con.h
+2
-0
No files found.
gframe/deck_con.cpp
View file @
9c3e3db6
...
@@ -76,7 +76,9 @@ void DeckBuilder::Initialize() {
...
@@ -76,7 +76,9 @@ void DeckBuilder::Initialize() {
hovered_code
=
0
;
hovered_code
=
0
;
hovered_pos
=
0
;
hovered_pos
=
0
;
hovered_seq
=
-
1
;
hovered_seq
=
-
1
;
is_lastcard
=
0
;
is_draging
=
false
;
is_draging
=
false
;
is_starting_dragging
=
false
;
prev_deck
=
mainGame
->
cbDBDecks
->
getSelected
();
prev_deck
=
mainGame
->
cbDBDecks
->
getSelected
();
prev_operation
=
0
;
prev_operation
=
0
;
is_modified
=
false
;
is_modified
=
false
;
...
@@ -487,25 +489,20 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -487,25 +489,20 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
if
(
!
check_limit
(
draging_pointer
))
if
(
!
check_limit
(
draging_pointer
))
break
;
break
;
}
}
if
(
hovered_pos
==
1
)
is_starting_dragging
=
true
;
pop_main
(
hovered_seq
);
else
if
(
hovered_pos
==
2
)
pop_extra
(
hovered_seq
);
else
if
(
hovered_pos
==
3
)
pop_side
(
hovered_seq
);
is_draging
=
true
;
break
;
break
;
}
}
case
irr
:
:
EMIE_LMOUSE_LEFT_UP
:
{
case
irr
:
:
EMIE_LMOUSE_LEFT_UP
:
{
is_starting_dragging
=
false
;
if
(
!
is_draging
)
if
(
!
is_draging
)
break
;
break
;
bool
pushed
=
false
;
bool
pushed
=
false
;
if
(
hovered_pos
==
1
)
if
(
hovered_pos
==
1
)
pushed
=
push_main
(
draging_pointer
,
hovered_seq
);
pushed
=
push_main
(
draging_pointer
,
hovered_seq
);
else
if
(
hovered_pos
==
2
)
else
if
(
hovered_pos
==
2
)
pushed
=
push_extra
(
draging_pointer
,
hovered_seq
);
pushed
=
push_extra
(
draging_pointer
,
hovered_seq
+
is_lastcard
);
else
if
(
hovered_pos
==
3
)
else
if
(
hovered_pos
==
3
)
pushed
=
push_side
(
draging_pointer
,
hovered_seq
);
pushed
=
push_side
(
draging_pointer
,
hovered_seq
+
is_lastcard
);
else
if
(
hovered_pos
==
4
&&
!
mainGame
->
is_siding
)
else
if
(
hovered_pos
==
4
&&
!
mainGame
->
is_siding
)
pushed
=
true
;
pushed
=
true
;
if
(
!
pushed
)
{
if
(
!
pushed
)
{
...
@@ -603,6 +600,16 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -603,6 +600,16 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
irr
:
:
EMIE_MOUSE_MOVED
:
{
case
irr
:
:
EMIE_MOUSE_MOVED
:
{
if
(
is_starting_dragging
)
{
is_draging
=
true
;
if
(
hovered_pos
==
1
)
pop_main
(
hovered_seq
);
else
if
(
hovered_pos
==
2
)
pop_extra
(
hovered_seq
);
else
if
(
hovered_pos
==
3
)
pop_side
(
hovered_seq
);
is_starting_dragging
=
false
;
}
mouse_pos
.
set
(
event
.
MouseInput
.
X
,
event
.
MouseInput
.
Y
);
mouse_pos
.
set
(
event
.
MouseInput
.
X
,
event
.
MouseInput
.
Y
);
GetHoveredCard
();
GetHoveredCard
();
break
;
break
;
...
@@ -640,6 +647,7 @@ void DeckBuilder::GetHoveredCard() {
...
@@ -640,6 +647,7 @@ void DeckBuilder::GetHoveredCard() {
int
pre_code
=
hovered_code
;
int
pre_code
=
hovered_code
;
hovered_pos
=
0
;
hovered_pos
=
0
;
hovered_code
=
0
;
hovered_code
=
0
;
is_lastcard
=
0
;
if
(
x
>=
314
&&
x
<=
794
)
{
if
(
x
>=
314
&&
x
<=
794
)
{
if
(
y
>=
164
&&
y
<=
435
)
{
if
(
y
>=
164
&&
y
<=
435
)
{
int
lx
=
10
,
px
,
py
=
(
y
-
164
)
/
68
;
int
lx
=
10
,
px
,
py
=
(
y
-
164
)
/
68
;
...
@@ -671,6 +679,8 @@ void DeckBuilder::GetHoveredCard() {
...
@@ -671,6 +679,8 @@ void DeckBuilder::GetHoveredCard() {
hovered_code
=
0
;
hovered_code
=
0
;
}
else
{
}
else
{
hovered_code
=
deckManager
.
current_deck
.
extra
[
hovered_seq
]
->
first
;
hovered_code
=
deckManager
.
current_deck
.
extra
[
hovered_seq
]
->
first
;
if
(
x
>=
772
)
is_lastcard
=
1
;
}
}
}
else
if
(
y
>=
564
&&
y
<=
628
)
{
}
else
if
(
y
>=
564
&&
y
<=
628
)
{
int
lx
=
deckManager
.
current_deck
.
side
.
size
();
int
lx
=
deckManager
.
current_deck
.
side
.
size
();
...
@@ -686,6 +696,8 @@ void DeckBuilder::GetHoveredCard() {
...
@@ -686,6 +696,8 @@ void DeckBuilder::GetHoveredCard() {
hovered_code
=
0
;
hovered_code
=
0
;
}
else
{
}
else
{
hovered_code
=
deckManager
.
current_deck
.
side
[
hovered_seq
]
->
first
;
hovered_code
=
deckManager
.
current_deck
.
side
[
hovered_seq
]
->
first
;
if
(
x
>=
772
)
is_lastcard
=
1
;
}
}
}
}
}
else
if
(
x
>=
810
&&
x
<=
995
&&
y
>=
165
&&
y
<=
626
)
{
}
else
if
(
x
>=
810
&&
x
<=
995
&&
y
>=
165
&&
y
<=
626
)
{
...
...
gframe/deck_con.h
View file @
9c3e3db6
...
@@ -49,8 +49,10 @@ public:
...
@@ -49,8 +49,10 @@ public:
int
hovered_code
;
int
hovered_code
;
int
hovered_pos
;
int
hovered_pos
;
int
hovered_seq
;
int
hovered_seq
;
int
is_lastcard
;
int
click_pos
;
int
click_pos
;
bool
is_draging
;
bool
is_draging
;
bool
is_starting_dragging
;
int
dragx
;
int
dragx
;
int
dragy
;
int
dragy
;
size_t
pre_mainc
;
size_t
pre_mainc
;
...
...
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