Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
R
rd-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
苍蓝
rd-ygopro
Commits
97a3b04c
Commit
97a3b04c
authored
Apr 27, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add auto_search_limit
parent
317ce145
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
2 deletions
+11
-2
gframe/deck_con.cpp
gframe/deck_con.cpp
+3
-2
gframe/game.cpp
gframe/game.cpp
+5
-0
gframe/game.h
gframe/game.h
+1
-0
system.conf
system.conf
+2
-0
No files found.
gframe/deck_con.cpp
View file @
97a3b04c
...
...
@@ -281,8 +281,9 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
}
case
irr
:
:
gui
::
EGET_EDITBOX_CHANGED
:
{
switch
(
id
)
{
switch
(
id
)
{
case
EDITBOX_KEYWORD
:
{
if
(
mainGame
->
gameConf
.
auto_search_limit
>=
0
&&
(
wcslen
(
mainGame
->
ebCardName
->
getText
())
>=
mainGame
->
gameConf
.
auto_search_limit
))
StartFilter
();
break
;
}
...
...
gframe/game.cpp
View file @
97a3b04c
...
...
@@ -902,6 +902,7 @@ void Game::LoadConfig() {
gameConf
.
control_mode
=
0
;
gameConf
.
draw_field_spell
=
1
;
gameConf
.
separate_clear_button
=
1
;
gameConf
.
auto_search_limit
=
-
1
;
fseek
(
fp
,
0
,
SEEK_END
);
int
fsize
=
ftell
(
fp
);
fseek
(
fp
,
0
,
SEEK_SET
);
...
...
@@ -956,6 +957,8 @@ void Game::LoadConfig() {
gameConf
.
draw_field_spell
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"separate_clear_button"
))
{
gameConf
.
separate_clear_button
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"auto_search_limit"
))
{
gameConf
.
auto_search_limit
=
atoi
(
valbuf
);
}
else
{
// options allowing multiple words
sscanf
(
linebuf
,
"%s = %240[^
\n
]"
,
strbuf
,
valbuf
);
...
...
@@ -1009,6 +1012,8 @@ void Game::SaveConfig() {
fprintf
(
fp
,
"control_mode = %d
\n
"
,
gameConf
.
control_mode
);
fprintf
(
fp
,
"draw_field_spell = %d
\n
"
,
gameConf
.
draw_field_spell
);
fprintf
(
fp
,
"separate_clear_button = %d
\n
"
,
gameConf
.
separate_clear_button
);
fprintf
(
fp
,
"#auto_search_limit >= 0: Start search automatically when the user enters N chars
\n
"
);
fprintf
(
fp
,
"auto_search_limit = %d
\n
"
,
gameConf
.
auto_search_limit
);
fclose
(
fp
);
}
void
Game
::
ShowCardInfo
(
int
code
)
{
...
...
gframe/game.h
View file @
97a3b04c
...
...
@@ -36,6 +36,7 @@ struct Config {
int
control_mode
;
int
draw_field_spell
;
int
separate_clear_button
;
int
auto_search_limit
;
};
struct
DuelInfo
{
...
...
system.conf
View file @
97a3b04c
...
...
@@ -23,3 +23,5 @@ hide_hint_button = 1
control_mode
=
0
draw_field_spell
=
1
separate_clear_button
=
1
#auto_search_limit >= 0: Start search automatically when the user enters N chars.
auto_search_limit
= -
1
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