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
b4fc5160
Commit
b4fc5160
authored
Jun 28, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
separate settings tab
parent
9c054af4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
18 deletions
+39
-18
gframe/deck_con.cpp
gframe/deck_con.cpp
+2
-2
gframe/game.cpp
gframe/game.cpp
+31
-15
gframe/game.h
gframe/game.h
+3
-1
strings.conf
strings.conf
+3
-0
No files found.
gframe/deck_con.cpp
View file @
b4fc5160
...
@@ -176,7 +176,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -176,7 +176,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_LEAVE_GAME
:
{
case
BUTTON_LEAVE_GAME
:
{
if
(
is_modified
&&
mainGame
->
gameConf
.
prompt_to_discard_deck_changes
)
{
if
(
is_modified
&&
!
mainGame
->
chkIgnoreDeckChanges
->
isChecked
()
)
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
310
,
mainGame
->
textFont
,
(
wchar_t
*
)
dataManager
.
GetSysString
(
1356
));
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
310
,
mainGame
->
textFont
,
(
wchar_t
*
)
dataManager
.
GetSysString
(
1356
));
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
...
@@ -340,7 +340,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -340,7 +340,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
COMBOBOX_DBDECKS
:
{
case
COMBOBOX_DBDECKS
:
{
if
(
is_modified
&&
mainGame
->
gameConf
.
prompt_to_discard_deck_changes
)
{
if
(
is_modified
&&
!
mainGame
->
chkIgnoreDeckChanges
->
isChecked
()
)
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
310
,
mainGame
->
textFont
,
(
wchar_t
*
)
dataManager
.
GetSysString
(
1356
));
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
310
,
mainGame
->
textFont
,
(
wchar_t
*
)
dataManager
.
GetSysString
(
1356
));
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
...
...
gframe/game.cpp
View file @
b4fc5160
...
@@ -214,6 +214,7 @@ bool Game::Initialize() {
...
@@ -214,6 +214,7 @@ bool Game::Initialize() {
btnEP
->
setVisible
(
false
);
btnEP
->
setVisible
(
false
);
//tab
//tab
wInfos
=
env
->
addTabControl
(
rect
<
s32
>
(
1
,
275
,
301
,
639
),
0
,
true
);
wInfos
=
env
->
addTabControl
(
rect
<
s32
>
(
1
,
275
,
301
,
639
),
0
,
true
);
wInfos
->
setTabExtraWidth
(
16
);
wInfos
->
setVisible
(
false
);
wInfos
->
setVisible
(
false
);
//info
//info
irr
::
gui
::
IGUITab
*
tabInfo
=
wInfos
->
addTab
(
dataManager
.
GetSysString
(
1270
));
irr
::
gui
::
IGUITab
*
tabInfo
=
wInfos
->
addTab
(
dataManager
.
GetSysString
(
1270
));
...
@@ -235,26 +236,41 @@ bool Game::Initialize() {
...
@@ -235,26 +236,41 @@ bool Game::Initialize() {
lstLog
=
env
->
addListBox
(
rect
<
s32
>
(
10
,
10
,
290
,
290
),
tabLog
,
LISTBOX_LOG
,
false
);
lstLog
=
env
->
addListBox
(
rect
<
s32
>
(
10
,
10
,
290
,
290
),
tabLog
,
LISTBOX_LOG
,
false
);
lstLog
->
setItemHeight
(
18
);
lstLog
->
setItemHeight
(
18
);
btnClearLog
=
env
->
addButton
(
rect
<
s32
>
(
160
,
300
,
260
,
325
),
tabLog
,
BUTTON_CLEAR_LOG
,
dataManager
.
GetSysString
(
1272
));
btnClearLog
=
env
->
addButton
(
rect
<
s32
>
(
160
,
300
,
260
,
325
),
tabLog
,
BUTTON_CLEAR_LOG
,
dataManager
.
GetSysString
(
1272
));
//system
//helper
irr
::
gui
::
IGUITab
*
tabSystem
=
wInfos
->
addTab
(
dataManager
.
GetSysString
(
1273
));
irr
::
gui
::
IGUITab
*
tabHelper
=
wInfos
->
addTab
(
dataManager
.
GetSysString
(
1298
));
chkMAutoPos
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
20
,
280
,
45
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1274
));
int
posX
=
20
;
int
posY
=
20
;
chkMAutoPos
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabHelper
,
-
1
,
dataManager
.
GetSysString
(
1274
));
chkMAutoPos
->
setChecked
(
gameConf
.
chkMAutoPos
!=
0
);
chkMAutoPos
->
setChecked
(
gameConf
.
chkMAutoPos
!=
0
);
chkSTAutoPos
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
50
,
280
,
75
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1278
));
posY
+=
30
;
chkSTAutoPos
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabHelper
,
-
1
,
dataManager
.
GetSysString
(
1278
));
chkSTAutoPos
->
setChecked
(
gameConf
.
chkSTAutoPos
!=
0
);
chkSTAutoPos
->
setChecked
(
gameConf
.
chkSTAutoPos
!=
0
);
chkRandomPos
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
40
,
80
,
300
,
105
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1275
));
posY
+=
30
;
chkRandomPos
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
+
20
,
posY
,
posX
+
20
+
260
,
posY
+
25
),
tabHelper
,
-
1
,
dataManager
.
GetSysString
(
1275
));
chkRandomPos
->
setChecked
(
gameConf
.
chkRandomPos
!=
0
);
chkRandomPos
->
setChecked
(
gameConf
.
chkRandomPos
!=
0
);
chkAutoChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
110
,
280
,
135
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1276
));
posY
+=
30
;
chkAutoChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabHelper
,
-
1
,
dataManager
.
GetSysString
(
1276
));
chkAutoChain
->
setChecked
(
gameConf
.
chkAutoChain
!=
0
);
chkAutoChain
->
setChecked
(
gameConf
.
chkAutoChain
!=
0
);
chkWaitChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
140
,
280
,
165
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1277
));
posY
+=
30
;
chkWaitChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabHelper
,
-
1
,
dataManager
.
GetSysString
(
1277
));
chkWaitChain
->
setChecked
(
gameConf
.
chkWaitChain
!=
0
);
chkWaitChain
->
setChecked
(
gameConf
.
chkWaitChain
!=
0
);
chkIgnore1
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
200
,
280
,
225
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1290
));
//system
irr
::
gui
::
IGUITab
*
tabSystem
=
wInfos
->
addTab
(
dataManager
.
GetSysString
(
1273
));
posY
=
20
;
chkIgnore1
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1290
));
chkIgnore1
->
setChecked
(
gameConf
.
chkIgnore1
!=
0
);
chkIgnore1
->
setChecked
(
gameConf
.
chkIgnore1
!=
0
);
chkIgnore2
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
230
,
280
,
255
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1291
));
posY
+=
30
;
chkIgnore2
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1291
));
chkIgnore2
->
setChecked
(
gameConf
.
chkIgnore2
!=
0
);
chkIgnore2
->
setChecked
(
gameConf
.
chkIgnore2
!=
0
);
chkHideSetname
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
260
,
280
,
285
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1354
));
posY
+=
30
;
chkHideSetname
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1354
));
chkHideSetname
->
setChecked
(
gameConf
.
chkHideSetname
!=
0
);
chkHideSetname
->
setChecked
(
gameConf
.
chkHideSetname
!=
0
);
chkHideHintButton
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
290
,
280
,
315
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1355
));
posY
+=
30
;
chkHideHintButton
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1355
));
chkHideHintButton
->
setChecked
(
gameConf
.
chkHideHintButton
!=
0
);
chkHideHintButton
->
setChecked
(
gameConf
.
chkHideHintButton
!=
0
);
posY
+=
30
;
chkIgnoreDeckChanges
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1357
));
chkIgnoreDeckChanges
->
setChecked
(
gameConf
.
chkIgnoreDeckChanges
!=
0
);
//
//
wHand
=
env
->
addWindow
(
rect
<
s32
>
(
500
,
450
,
825
,
605
),
false
,
L""
);
wHand
=
env
->
addWindow
(
rect
<
s32
>
(
500
,
450
,
825
,
605
),
false
,
L""
);
wHand
->
getCloseButton
()
->
setVisible
(
false
);
wHand
->
getCloseButton
()
->
setVisible
(
false
);
...
@@ -911,7 +927,7 @@ void Game::LoadConfig() {
...
@@ -911,7 +927,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
.
prompt_to_discard_deck_changes
=
1
;
gameConf
.
chkIgnoreDeckChanges
=
0
;
fseek
(
fp
,
0
,
SEEK_END
);
fseek
(
fp
,
0
,
SEEK_END
);
int
fsize
=
ftell
(
fp
);
int
fsize
=
ftell
(
fp
);
fseek
(
fp
,
0
,
SEEK_SET
);
fseek
(
fp
,
0
,
SEEK_SET
);
...
@@ -970,8 +986,8 @@ void Game::LoadConfig() {
...
@@ -970,8 +986,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
,
"
prompt_to_discard
_deck_changes"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"
ignore
_deck_changes"
))
{
gameConf
.
prompt_to_discard_deck_c
hanges
=
atoi
(
valbuf
);
gameConf
.
chkIgnoreDeckC
hanges
=
atoi
(
valbuf
);
}
else
{
}
else
{
// options allowing multiple words
// options allowing multiple words
sscanf
(
linebuf
,
"%s = %240[^
\n
]"
,
strbuf
,
valbuf
);
sscanf
(
linebuf
,
"%s = %240[^
\n
]"
,
strbuf
,
valbuf
);
...
@@ -1028,7 +1044,7 @@ void Game::SaveConfig() {
...
@@ -1028,7 +1044,7 @@ 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
,
"
prompt_to_discard_deck_changes = %d
\n
"
,
gameConf
.
prompt_to_discard_deck_changes
);
fprintf
(
fp
,
"
ignore_deck_changes = %d
\n
"
,
((
mainGame
->
chkIgnoreDeckChanges
->
isChecked
())
?
1
:
0
)
);
fclose
(
fp
);
fclose
(
fp
);
}
}
void
Game
::
ShowCardInfo
(
int
code
)
{
void
Game
::
ShowCardInfo
(
int
code
)
{
...
...
gframe/game.h
View file @
b4fc5160
...
@@ -38,7 +38,7 @@ struct Config {
...
@@ -38,7 +38,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
prompt_to_discard_deck_c
hanges
;
int
chkIgnoreDeckC
hanges
;
};
};
struct
DuelInfo
{
struct
DuelInfo
{
...
@@ -211,6 +211,8 @@ public:
...
@@ -211,6 +211,8 @@ public:
irr
::
gui
::
IGUICheckBox
*
chkWaitChain
;
irr
::
gui
::
IGUICheckBox
*
chkWaitChain
;
irr
::
gui
::
IGUICheckBox
*
chkHideSetname
;
irr
::
gui
::
IGUICheckBox
*
chkHideSetname
;
irr
::
gui
::
IGUICheckBox
*
chkHideHintButton
;
irr
::
gui
::
IGUICheckBox
*
chkHideHintButton
;
irr
::
gui
::
IGUICheckBox
*
chkIgnoreDeckChanges
;
irr
::
gui
::
IGUICheckBox
*
chkAutoSearch
;
irr
::
gui
::
IGUIListBox
*
lstLog
;
irr
::
gui
::
IGUIListBox
*
lstLog
;
irr
::
gui
::
IGUIButton
*
btnClearLog
;
irr
::
gui
::
IGUIButton
*
btnClearLog
;
irr
::
gui
::
IGUIButton
*
btnSaveLog
;
irr
::
gui
::
IGUIButton
*
btnSaveLog
;
...
...
strings.conf
View file @
b4fc5160
...
@@ -303,6 +303,7 @@
...
@@ -303,6 +303,7 @@
!
system
1295
取消操作
!
system
1295
取消操作
!
system
1296
完成选择
!
system
1296
完成选择
!
system
1297
切洗手卡
!
system
1297
切洗手卡
!
system
1298
辅助功能
!
system
1300
禁限卡表:
!
system
1300
禁限卡表:
!
system
1301
卡组列表:
!
system
1301
卡组列表:
!
system
1302
保存
!
system
1302
保存
...
@@ -357,6 +358,8 @@
...
@@ -357,6 +358,8 @@
!
system
1354
不显示卡片系列
!
system
1354
不显示卡片系列
!
system
1355
不显示提示按钮
!
system
1355
不显示提示按钮
!
system
1356
是否要放弃对卡组的修改?
!
system
1356
是否要放弃对卡组的修改?
!
system
1357
不提示保留对卡组的修改
!
system
1358
键入关键字后自动进行搜索
!
system
1360
上一步
!
system
1360
上一步
!
system
1370
星数↑
!
system
1370
星数↑
!
system
1371
攻击↑
!
system
1371
攻击↑
...
...
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