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
a7fdb21a
Commit
a7fdb21a
authored
Oct 27, 2018
by
mercury233
Committed by
nanahira
Oct 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add config (#6)
* add config * move strings * move strings
parent
c961dbf5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
2 deletions
+19
-2
gframe/deck_con.cpp
gframe/deck_con.cpp
+2
-2
gframe/event_handler.cpp
gframe/event_handler.cpp
+5
-0
gframe/game.cpp
gframe/game.cpp
+8
-0
gframe/game.h
gframe/game.h
+3
-0
strings.conf
strings.conf
+1
-0
No files found.
gframe/deck_con.cpp
View file @
a7fdb21a
...
@@ -780,8 +780,8 @@ void DeckBuilder::FilterCards() {
...
@@ -780,8 +780,8 @@ void DeckBuilder::FilterCards() {
std
::
vector
<
std
::
wstring
>
query_elements
;
std
::
vector
<
std
::
wstring
>
query_elements
;
std
::
vector
<
std
::
vector
<
std
::
wstring
>::
iterator
>
query_elements_track
;
std
::
vector
<
std
::
vector
<
std
::
wstring
>::
iterator
>
query_elements_track
;
size_t
element_start
=
0
;
size_t
element_start
=
0
;
while
(
1
)
{
while
(
mainGame
->
gameConf
.
search_multiple_keywords
)
{
size_t
element_end
=
str
.
find_first_of
(
L'
'
,
element_start
);
size_t
element_end
=
str
.
find_first_of
(
mainGame
->
gameConf
.
search_multiple_keywords
==
1
?
L' '
:
L'+
'
,
element_start
);
if
(
element_end
==
std
::
wstring
::
npos
)
if
(
element_end
==
std
::
wstring
::
npos
)
break
;
break
;
size_t
length
=
element_end
-
element_start
;
size_t
length
=
element_end
-
element_start
;
...
...
gframe/event_handler.cpp
View file @
a7fdb21a
...
@@ -1792,6 +1792,11 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
...
@@ -1792,6 +1792,11 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return
true
;
return
true
;
break
;
break
;
}
}
case
CHECKBOX_MULTI_KEYWORDS
:
{
mainGame
->
gameConf
.
search_multiple_keywords
=
mainGame
->
chkMultiKeywords
->
isChecked
()
?
1
:
0
;
return
true
;
break
;
}
case
CHECKBOX_ENABLE_MUSIC
:
{
case
CHECKBOX_ENABLE_MUSIC
:
{
if
(
!
mainGame
->
chkEnableMusic
->
isChecked
())
if
(
!
mainGame
->
chkEnableMusic
->
isChecked
())
soundManager
.
StopBGM
();
soundManager
.
StopBGM
();
...
...
gframe/game.cpp
View file @
a7fdb21a
...
@@ -295,6 +295,9 @@ bool Game::Initialize() {
...
@@ -295,6 +295,9 @@ bool Game::Initialize() {
chkAutoSearch
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabSystem
,
CHECKBOX_AUTO_SEARCH
,
dataManager
.
GetSysString
(
1358
));
chkAutoSearch
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabSystem
,
CHECKBOX_AUTO_SEARCH
,
dataManager
.
GetSysString
(
1358
));
chkAutoSearch
->
setChecked
(
gameConf
.
auto_search_limit
>=
0
);
chkAutoSearch
->
setChecked
(
gameConf
.
auto_search_limit
>=
0
);
posY
+=
30
;
posY
+=
30
;
chkMultiKeywords
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabSystem
,
CHECKBOX_MULTI_KEYWORDS
,
dataManager
.
GetSysString
(
1377
));
chkMultiKeywords
->
setChecked
(
gameConf
.
search_multiple_keywords
>
0
);
posY
+=
30
;
chkEnableSound
=
env
->
addCheckBox
(
gameConf
.
enable_sound
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
120
,
posY
+
25
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1279
));
chkEnableSound
=
env
->
addCheckBox
(
gameConf
.
enable_sound
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
120
,
posY
+
25
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1279
));
chkEnableSound
->
setChecked
(
gameConf
.
enable_sound
);
chkEnableSound
->
setChecked
(
gameConf
.
enable_sound
);
scrSoundVolume
=
env
->
addScrollBar
(
true
,
rect
<
s32
>
(
posX
+
126
,
posY
+
4
,
posX
+
260
,
posY
+
21
),
tabSystem
,
SCROLL_VOLUME
);
scrSoundVolume
=
env
->
addScrollBar
(
true
,
rect
<
s32
>
(
posX
+
126
,
posY
+
4
,
posX
+
260
,
posY
+
21
),
tabSystem
,
SCROLL_VOLUME
);
...
@@ -1065,6 +1068,7 @@ void Game::LoadConfig() {
...
@@ -1065,6 +1068,7 @@ void Game::LoadConfig() {
gameConf
.
draw_field_spell
=
1
;
gameConf
.
draw_field_spell
=
1
;
gameConf
.
separate_clear_button
=
1
;
gameConf
.
separate_clear_button
=
1
;
gameConf
.
auto_search_limit
=
-
1
;
gameConf
.
auto_search_limit
=
-
1
;
gameConf
.
search_multiple_keywords
=
1
;
gameConf
.
chkIgnoreDeckChanges
=
0
;
gameConf
.
chkIgnoreDeckChanges
=
0
;
gameConf
.
defaultOT
=
1
;
gameConf
.
defaultOT
=
1
;
gameConf
.
enable_bot_mode
=
0
;
gameConf
.
enable_bot_mode
=
0
;
...
@@ -1130,6 +1134,8 @@ void Game::LoadConfig() {
...
@@ -1130,6 +1134,8 @@ void Game::LoadConfig() {
gameConf
.
separate_clear_button
=
atoi
(
valbuf
);
gameConf
.
separate_clear_button
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"auto_search_limit"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"auto_search_limit"
))
{
gameConf
.
auto_search_limit
=
atoi
(
valbuf
);
gameConf
.
auto_search_limit
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"search_multiple_keywords"
))
{
gameConf
.
search_multiple_keywords
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"ignore_deck_changes"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"ignore_deck_changes"
))
{
gameConf
.
chkIgnoreDeckChanges
=
atoi
(
valbuf
);
gameConf
.
chkIgnoreDeckChanges
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"default_ot"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"default_ot"
))
{
...
@@ -1207,6 +1213,8 @@ void Game::SaveConfig() {
...
@@ -1207,6 +1213,8 @@ void Game::SaveConfig() {
fprintf
(
fp
,
"separate_clear_button = %d
\n
"
,
gameConf
.
separate_clear_button
);
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 >= 0: Start search automatically when the user enters N chars
\n
"
);
fprintf
(
fp
,
"auto_search_limit = %d
\n
"
,
gameConf
.
auto_search_limit
);
fprintf
(
fp
,
"auto_search_limit = %d
\n
"
,
gameConf
.
auto_search_limit
);
fprintf
(
fp
,
"#search_multiple_keywords = 0: Disable. 1: Search mutiple keywords with separator
\"
\"
. 2: with separator
\"
+
\"\n
"
);
fprintf
(
fp
,
"search_multiple_keywords = %d
\n
"
,
gameConf
.
search_multiple_keywords
);
fprintf
(
fp
,
"ignore_deck_changes = %d
\n
"
,
(
chkIgnoreDeckChanges
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"ignore_deck_changes = %d
\n
"
,
(
chkIgnoreDeckChanges
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"default_ot = %d
\n
"
,
gameConf
.
defaultOT
);
fprintf
(
fp
,
"default_ot = %d
\n
"
,
gameConf
.
defaultOT
);
fprintf
(
fp
,
"enable_bot_mode = %d
\n
"
,
gameConf
.
enable_bot_mode
);
fprintf
(
fp
,
"enable_bot_mode = %d
\n
"
,
gameConf
.
enable_bot_mode
);
...
...
gframe/game.h
View file @
a7fdb21a
...
@@ -39,6 +39,7 @@ struct Config {
...
@@ -39,6 +39,7 @@ struct Config {
int
draw_field_spell
;
int
draw_field_spell
;
int
separate_clear_button
;
int
separate_clear_button
;
int
auto_search_limit
;
int
auto_search_limit
;
int
search_multiple_keywords
;
int
chkIgnoreDeckChanges
;
int
chkIgnoreDeckChanges
;
int
defaultOT
;
int
defaultOT
;
int
enable_bot_mode
;
int
enable_bot_mode
;
...
@@ -247,6 +248,7 @@ public:
...
@@ -247,6 +248,7 @@ public:
irr
::
gui
::
IGUICheckBox
*
chkHideHintButton
;
irr
::
gui
::
IGUICheckBox
*
chkHideHintButton
;
irr
::
gui
::
IGUICheckBox
*
chkIgnoreDeckChanges
;
irr
::
gui
::
IGUICheckBox
*
chkIgnoreDeckChanges
;
irr
::
gui
::
IGUICheckBox
*
chkAutoSearch
;
irr
::
gui
::
IGUICheckBox
*
chkAutoSearch
;
irr
::
gui
::
IGUICheckBox
*
chkMultiKeywords
;
irr
::
gui
::
IGUICheckBox
*
chkEnableSound
;
irr
::
gui
::
IGUICheckBox
*
chkEnableSound
;
irr
::
gui
::
IGUICheckBox
*
chkEnableMusic
;
irr
::
gui
::
IGUICheckBox
*
chkEnableMusic
;
irr
::
gui
::
IGUIScrollBar
*
scrSoundVolume
;
irr
::
gui
::
IGUIScrollBar
*
scrSoundVolume
;
...
@@ -623,6 +625,7 @@ extern Game* mainGame;
...
@@ -623,6 +625,7 @@ extern Game* mainGame;
#define BUTTON_LOAD_SINGLEPLAY 351
#define BUTTON_LOAD_SINGLEPLAY 351
#define BUTTON_CANCEL_SINGLEPLAY 352
#define BUTTON_CANCEL_SINGLEPLAY 352
#define CHECKBOX_AUTO_SEARCH 360
#define CHECKBOX_AUTO_SEARCH 360
#define CHECKBOX_MULTI_KEYWORDS 372
#define CHECKBOX_ENABLE_SOUND 361
#define CHECKBOX_ENABLE_SOUND 361
#define CHECKBOX_ENABLE_MUSIC 362
#define CHECKBOX_ENABLE_MUSIC 362
#define SCROLL_VOLUME 363
#define SCROLL_VOLUME 363
...
...
strings.conf
View file @
a7fdb21a
...
@@ -391,6 +391,7 @@
...
@@ -391,6 +391,7 @@
!
system
1372
守备↑
!
system
1372
守备↑
!
system
1373
名称↓
!
system
1373
名称↓
!
system
1374
连接标记
!
system
1374
连接标记
!
system
1377
使用多个关键词搜索卡片
!
system
1380
人机模式
!
system
1380
人机模式
!
system
1381
残局模式
!
system
1381
残局模式
!
system
1382
人机信息:
!
system
1382
人机信息:
...
...
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