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
苍蓝
ygopro
Commits
c1856c89
Commit
c1856c89
authored
Sep 05, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update auto search
parent
90e14db2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
5 deletions
+20
-5
gframe/deck_con.cpp
gframe/deck_con.cpp
+13
-2
gframe/deck_con.h
gframe/deck_con.h
+1
-0
gframe/game.cpp
gframe/game.cpp
+3
-3
gframe/game.h
gframe/game.h
+3
-0
No files found.
gframe/deck_con.cpp
View file @
c1856c89
...
...
@@ -216,6 +216,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
if
(
mainGame
->
chkCategory
[
i
]
->
isChecked
())
filter_effect
|=
filter
;
mainGame
->
HideElement
(
mainGame
->
wCategories
);
InstantSearch
();
break
;
}
case
BUTTON_SIDE_OK
:
{
...
...
@@ -308,6 +309,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
if
(
mainGame
->
btnMark
[
7
]
->
isPressed
())
filter_marks
|=
0004
;
mainGame
->
HideElement
(
mainGame
->
wLinkMarks
);
InstantSearch
();
break
;
}
}
...
...
@@ -328,8 +330,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case
irr
:
:
gui
::
EGET_EDITBOX_CHANGED
:
{
switch
(
id
)
{
case
EDITBOX_KEYWORD
:
{
if
(
mainGame
->
gameConf
.
auto_search_limit
>=
0
&&
(
wcslen
(
mainGame
->
ebCardName
->
getText
())
>=
mainGame
->
gameConf
.
auto_search_limit
))
StartFilter
();
InstantSearch
();
break
;
}
}
...
...
@@ -446,6 +447,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
}
}
InstantSearch
();
break
;
}
case
COMBOBOX_SORTTYPE
:
{
...
...
@@ -462,8 +464,13 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
ebDefense
->
setEnabled
(
true
);
}
}
InstantSearch
();
break
;
}
case
COMBOBOX_ATTRIBUTE
:
case
COMBOBOX_RACE
:
case
COMBOBOX_LIMIT
:
InstantSearch
();
}
}
default:
break
;
...
...
@@ -854,6 +861,10 @@ void DeckBuilder::FilterCards() {
}
SortList
();
}
void
DeckBuilder
::
InstantSearch
()
{
if
(
mainGame
->
gameConf
.
auto_search_limit
>=
0
&&
(
wcslen
(
mainGame
->
ebCardName
->
getText
())
>=
mainGame
->
gameConf
.
auto_search_limit
))
StartFilter
();
}
void
DeckBuilder
::
ClearSearch
()
{
mainGame
->
cbCardType
->
setSelected
(
0
);
mainGame
->
cbCardType2
->
setSelected
(
0
);
...
...
gframe/deck_con.h
View file @
c1856c89
...
...
@@ -17,6 +17,7 @@ public:
void
FilterCards
();
void
StartFilter
();
void
ClearFilter
();
void
InstantSearch
();
void
ClearSearch
();
void
SortList
();
...
...
gframe/game.cpp
View file @
c1856c89
...
...
@@ -463,7 +463,7 @@ bool Game::Initialize() {
cbCardType2
->
setMaxSelectionRows
(
10
);
cbCardType2
->
addItem
(
dataManager
.
GetSysString
(
1310
),
0
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1315
),
rect
<
s32
>
(
205
,
2
+
25
/
6
,
280
,
22
+
25
/
6
),
false
,
false
,
wFilter
);
cbLimit
=
env
->
addComboBox
(
rect
<
s32
>
(
260
,
25
/
6
,
390
,
20
+
25
/
6
),
wFilter
,
-
1
);
cbLimit
=
env
->
addComboBox
(
rect
<
s32
>
(
260
,
25
/
6
,
390
,
20
+
25
/
6
),
wFilter
,
COMBOBOX_LIMIT
);
cbLimit
->
setMaxSelectionRows
(
10
);
cbLimit
->
addItem
(
dataManager
.
GetSysString
(
1310
));
cbLimit
->
addItem
(
dataManager
.
GetSysString
(
1316
));
...
...
@@ -474,13 +474,13 @@ bool Game::Initialize() {
cbLimit
->
addItem
(
dataManager
.
GetSysString
(
1242
));
cbLimit
->
addItem
(
dataManager
.
GetSysString
(
1243
));
env
->
addStaticText
(
dataManager
.
GetSysString
(
1319
),
rect
<
s32
>
(
10
,
22
+
50
/
6
,
70
,
42
+
50
/
6
),
false
,
false
,
wFilter
);
cbAttribute
=
env
->
addComboBox
(
rect
<
s32
>
(
60
,
20
+
50
/
6
,
190
,
40
+
50
/
6
),
wFilter
,
-
1
);
cbAttribute
=
env
->
addComboBox
(
rect
<
s32
>
(
60
,
20
+
50
/
6
,
190
,
40
+
50
/
6
),
wFilter
,
COMBOBOX_ATTRIBUTE
);
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
,
42
+
75
/
6
,
70
,
62
+
75
/
6
),
false
,
false
,
wFilter
);
cbRace
=
env
->
addComboBox
(
rect
<
s32
>
(
60
,
40
+
75
/
6
,
190
,
60
+
75
/
6
),
wFilter
,
-
1
);
cbRace
=
env
->
addComboBox
(
rect
<
s32
>
(
60
,
40
+
75
/
6
,
190
,
60
+
75
/
6
),
wFilter
,
COMBOBOX_RACE
);
cbRace
->
setMaxSelectionRows
(
10
);
cbRace
->
addItem
(
dataManager
.
GetSysString
(
1310
),
0
);
for
(
int
filter
=
0x1
;
filter
!=
0x2000000
;
filter
<<=
1
)
...
...
gframe/game.h
View file @
c1856c89
...
...
@@ -551,6 +551,8 @@ extern Game* mainGame;
#define SCROLL_FILTER 315
#define EDITBOX_KEYWORD 316
#define BUTTON_CLEAR_FILTER 317
#define COMBOBOX_ATTRIBUTE 318
#define COMBOBOX_RACE 319
#define BUTTON_REPLAY_START 320
#define BUTTON_REPLAY_PAUSE 321
#define BUTTON_REPLAY_STEP 322
...
...
@@ -564,6 +566,7 @@ extern Game* mainGame;
#define BUTTON_CANCEL_SINGLEPLAY 352
#define CHECKBOX_AUTO_SEARCH 360
#define COMBOBOX_SORTTYPE 370
#define COMBOBOX_LIMIT 371
#define BUTTON_MARKS_FILTER 380
#define BUTTON_MARKERS_OK 381
...
...
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