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
nanahira
ygopro
Commits
a643c992
Commit
a643c992
authored
May 29, 2016
by
salix5
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1765 from mercury233/patch-1
Fix dragging and increase combobox height
parents
818c283f
30620868
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
gframe/deck_con.cpp
gframe/deck_con.cpp
+10
-0
gframe/deck_con.h
gframe/deck_con.h
+1
-0
gframe/game.cpp
gframe/game.cpp
+8
-0
No files found.
gframe/deck_con.cpp
View file @
a643c992
...
...
@@ -339,6 +339,16 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case
irr
:
:
EET_MOUSE_INPUT_EVENT
:
{
switch
(
event
.
MouseInput
.
Event
)
{
case
irr
:
:
EMIE_LMOUSE_PRESSED_DOWN
:
{
mouse_pos
=
position2d
<
s32
>
(
event
.
MouseInput
.
X
,
event
.
MouseInput
.
Y
);
if
(
mainGame
->
cbDBLFList
->
getElementFromPoint
(
mouse_pos
)
||
mainGame
->
cbDBDecks
->
getElementFromPoint
(
mouse_pos
)
||
mainGame
->
cbCardType
->
getElementFromPoint
(
mouse_pos
)
||
mainGame
->
cbCardType2
->
getElementFromPoint
(
mouse_pos
)
||
mainGame
->
cbLimit
->
getElementFromPoint
(
mouse_pos
)
||
mainGame
->
cbAttribute
->
getElementFromPoint
(
mouse_pos
)
||
mainGame
->
cbRace
->
getElementFromPoint
(
mouse_pos
)
||
mainGame
->
cbSortType
->
getElementFromPoint
(
mouse_pos
))
break
;
if
(
mainGame
->
wCategories
->
isVisible
()
||
mainGame
->
wQuery
->
isVisible
())
break
;
if
(
hovered_pos
==
0
||
hovered_seq
==
-
1
)
...
...
gframe/deck_con.h
View file @
a643c992
...
...
@@ -34,6 +34,7 @@ public:
int
hovered_pos
;
int
hovered_seq
;
int
click_pos
;
position2d
<
s32
>
mouse_pos
;
bool
is_draging
;
int
dragx
;
int
dragy
;
...
...
gframe/game.cpp
View file @
a643c992
...
...
@@ -168,6 +168,7 @@ bool Game::Initialize() {
stHostPrepRule
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
280
,
30
,
460
,
230
),
false
,
true
,
wHostPrepare
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1254
),
rect
<
s32
>
(
10
,
235
,
110
,
255
),
false
,
false
,
wHostPrepare
);
cbDeckSelect
=
env
->
addComboBox
(
rect
<
s32
>
(
120
,
230
,
270
,
255
),
wHostPrepare
);
cbDeckSelect
->
setMaxSelectionRows
(
10
);
btnHostPrepStart
=
env
->
addButton
(
rect
<
s32
>
(
230
,
280
,
340
,
305
),
wHostPrepare
,
BUTTON_HP_START
,
dataManager
.
GetSysString
(
1215
));
btnHostPrepCancel
=
env
->
addButton
(
rect
<
s32
>
(
350
,
280
,
460
,
305
),
wHostPrepare
,
BUTTON_HP_CANCEL
,
dataManager
.
GetSysString
(
1212
));
//img
...
...
@@ -384,8 +385,10 @@ bool Game::Initialize() {
wDeckEdit
->
setVisible
(
false
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1300
),
rect
<
s32
>
(
10
,
9
,
100
,
29
),
false
,
false
,
wDeckEdit
);
cbDBLFList
=
env
->
addComboBox
(
rect
<
s32
>
(
80
,
5
,
220
,
30
),
wDeckEdit
,
COMBOBOX_DBLFLIST
);
cbDBLFList
->
setMaxSelectionRows
(
10
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1301
),
rect
<
s32
>
(
10
,
39
,
100
,
59
),
false
,
false
,
wDeckEdit
);
cbDBDecks
=
env
->
addComboBox
(
rect
<
s32
>
(
80
,
35
,
220
,
60
),
wDeckEdit
,
COMBOBOX_DBDECKS
);
cbDBDecks
->
setMaxSelectionRows
(
15
);
for
(
unsigned
int
i
=
0
;
i
<
deckManager
.
_lfList
.
size
();
++
i
)
cbDBLFList
->
addItem
(
deckManager
.
_lfList
[
i
].
listName
);
btnSaveDeck
=
env
->
addButton
(
rect
<
s32
>
(
225
,
5
,
290
,
30
),
wDeckEdit
,
BUTTON_SAVE_DECK
,
dataManager
.
GetSysString
(
1302
));
...
...
@@ -409,9 +412,11 @@ bool Game::Initialize() {
cbCardType
->
addItem
(
dataManager
.
GetSysString
(
1313
));
cbCardType
->
addItem
(
dataManager
.
GetSysString
(
1314
));
cbCardType2
=
env
->
addComboBox
(
rect
<
s32
>
(
125
,
3
,
200
,
23
),
wFilter
,
-
1
);
cbCardType2
->
setMaxSelectionRows
(
10
);
cbCardType2
->
addItem
(
dataManager
.
GetSysString
(
1310
),
0
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1315
),
rect
<
s32
>
(
205
,
5
,
280
,
25
),
false
,
false
,
wFilter
);
cbLimit
=
env
->
addComboBox
(
rect
<
s32
>
(
260
,
3
,
390
,
23
),
wFilter
,
-
1
);
cbLimit
->
setMaxSelectionRows
(
10
);
cbLimit
->
addItem
(
dataManager
.
GetSysString
(
1310
));
cbLimit
->
addItem
(
dataManager
.
GetSysString
(
1316
));
cbLimit
->
addItem
(
dataManager
.
GetSysString
(
1317
));
...
...
@@ -420,11 +425,13 @@ bool Game::Initialize() {
cbLimit
->
addItem
(
dataManager
.
GetSysString
(
1241
));
env
->
addStaticText
(
dataManager
.
GetSysString
(
1319
),
rect
<
s32
>
(
10
,
28
,
70
,
48
),
false
,
false
,
wFilter
);
cbAttribute
=
env
->
addComboBox
(
rect
<
s32
>
(
60
,
26
,
190
,
46
),
wFilter
,
-
1
);
cbAttribute
->
setMaxSelectionRows
(
10
);
cbAttribute
->
addItem
(
dataManager
.
GetSysString
(
1310
),
0
);
for
(
int
filter
=
0x1
;
filter
!=
0x80
;
filter
<<=
1
)
cbAttribute
->
addItem
(
dataManager
.
FormatAttribute
(
filter
),
filter
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1321
),
rect
<
s32
>
(
10
,
51
,
70
,
71
),
false
,
false
,
wFilter
);
cbRace
=
env
->
addComboBox
(
rect
<
s32
>
(
60
,
49
,
190
,
69
),
wFilter
,
-
1
);
cbRace
->
setMaxSelectionRows
(
10
);
cbRace
->
addItem
(
dataManager
.
GetSysString
(
1310
),
0
);
for
(
int
filter
=
0x1
;
filter
!=
0x1000000
;
filter
<<=
1
)
cbRace
->
addItem
(
dataManager
.
FormatRace
(
filter
),
filter
);
...
...
@@ -464,6 +471,7 @@ bool Game::Initialize() {
//sort type
wSort
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
930
,
132
,
1020
,
156
),
true
,
false
,
0
,
-
1
,
true
);
cbSortType
=
env
->
addComboBox
(
rect
<
s32
>
(
10
,
2
,
85
,
22
),
wSort
,
COMBOBOX_SORTTYPE
);
cbSortType
->
setMaxSelectionRows
(
10
);
for
(
int
i
=
1370
;
i
<=
1373
;
i
++
)
cbSortType
->
addItem
(
dataManager
.
GetSysString
(
i
));
wSort
->
setVisible
(
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