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
baichixing
ygopro
Commits
2a0cf61c
Commit
2a0cf61c
authored
Jun 24, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update deck_con
parent
08dd3309
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
306 additions
and
345 deletions
+306
-345
gframe/deck_con.cpp
gframe/deck_con.cpp
+282
-301
gframe/deck_con.h
gframe/deck_con.h
+16
-4
gframe/game.cpp
gframe/game.cpp
+4
-0
gframe/game.h
gframe/game.h
+1
-0
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+1
-40
strings.conf
strings.conf
+1
-0
system.conf
system.conf
+1
-0
No files found.
gframe/deck_con.cpp
View file @
2a0cf61c
This diff is collapsed.
Click to expand it.
gframe/deck_con.h
View file @
2a0cf61c
...
...
@@ -11,6 +11,9 @@ namespace ygo {
class
DeckBuilder
:
public
irr
::
IEventReceiver
{
public:
virtual
bool
OnEvent
(
const
irr
::
SEvent
&
event
);
void
Initialize
();
void
Terminate
();
void
GetHoveredCard
();
void
FilterCards
();
void
StartFilter
();
void
ClearFilter
();
...
...
@@ -18,7 +21,15 @@ public:
void
SortList
();
bool
CardNameContains
(
const
wchar_t
*
haystack
,
const
wchar_t
*
needle
);
bool
push_main
(
code_pointer
pointer
,
int
seq
=
-
1
);
bool
push_extra
(
code_pointer
pointer
,
int
seq
=
-
1
);
bool
push_side
(
code_pointer
pointer
,
int
seq
=
-
1
);
void
pop_main
(
int
seq
);
void
pop_extra
(
int
seq
);
void
pop_side
(
int
seq
);
bool
check_limit
(
code_pointer
pointer
);
long
long
filter_effect
;
unsigned
int
filter_type
;
unsigned
int
filter_type2
;
...
...
@@ -34,6 +45,7 @@ public:
unsigned
int
filter_scl
;
unsigned
int
filter_marks
;
int
filter_lm
;
position2di
mouse_pos
;
int
hovered_code
;
int
hovered_pos
;
int
hovered_seq
;
...
...
@@ -45,9 +57,9 @@ public:
size_t
pre_extrac
;
size_t
pre_sidec
;
code_pointer
draging_pointer
;
bool
is_deleting
;
bool
is_
clearing
;
s32
prevID
;
bool
is_
modified
;
std
::
unordered_map
<
int
,
int
>*
filterList
;
std
::
vector
<
code_pointer
>
results
;
wchar_t
result_string
[
8
];
...
...
gframe/game.cpp
View file @
2a0cf61c
...
...
@@ -911,6 +911,7 @@ void Game::LoadConfig() {
gameConf
.
draw_field_spell
=
1
;
gameConf
.
separate_clear_button
=
1
;
gameConf
.
auto_search_limit
=
-
1
;
gameConf
.
prompt_to_discard_deck_changes
=
1
;
fseek
(
fp
,
0
,
SEEK_END
);
int
fsize
=
ftell
(
fp
);
fseek
(
fp
,
0
,
SEEK_SET
);
...
...
@@ -969,6 +970,8 @@ void Game::LoadConfig() {
gameConf
.
separate_clear_button
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"auto_search_limit"
))
{
gameConf
.
auto_search_limit
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"prompt_to_discard_deck_changes"
))
{
gameConf
.
prompt_to_discard_deck_changes
=
atoi
(
valbuf
);
}
else
{
// options allowing multiple words
sscanf
(
linebuf
,
"%s = %240[^
\n
]"
,
strbuf
,
valbuf
);
...
...
@@ -1025,6 +1028,7 @@ void Game::SaveConfig() {
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
);
fprintf
(
fp
,
"prompt_to_discard_deck_changes = %d
\n
"
,
gameConf
.
prompt_to_discard_deck_changes
);
fclose
(
fp
);
}
void
Game
::
ShowCardInfo
(
int
code
)
{
...
...
gframe/game.h
View file @
2a0cf61c
...
...
@@ -38,6 +38,7 @@ struct Config {
int
draw_field_spell
;
int
separate_clear_button
;
int
auto_search_limit
;
int
prompt_to_discard_deck_changes
;
};
struct
DuelInfo
{
...
...
gframe/menu_handler.cpp
View file @
2a0cf61c
...
...
@@ -244,46 +244,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
ebDeckname
->
setText
(
L""
);
}
mainGame
->
HideElement
(
mainGame
->
wMainMenu
);
mainGame
->
is_building
=
true
;
mainGame
->
is_siding
=
false
;
mainGame
->
wInfos
->
setVisible
(
true
);
mainGame
->
wCardImg
->
setVisible
(
true
);
mainGame
->
wDeckEdit
->
setVisible
(
true
);
mainGame
->
wFilter
->
setVisible
(
true
);
mainGame
->
wSort
->
setVisible
(
true
);
mainGame
->
btnLeaveGame
->
setVisible
(
true
);
mainGame
->
btnLeaveGame
->
setText
(
dataManager
.
GetSysString
(
1306
));
mainGame
->
btnSideOK
->
setVisible
(
false
);
mainGame
->
deckBuilder
.
filterList
=
deckManager
.
_lfList
[
0
].
content
;
mainGame
->
cbDBLFList
->
setSelected
(
0
);
mainGame
->
cbCardType
->
setSelected
(
0
);
mainGame
->
cbCardType2
->
setSelected
(
0
);
mainGame
->
cbAttribute
->
setSelected
(
0
);
mainGame
->
cbRace
->
setSelected
(
0
);
mainGame
->
ebAttack
->
setText
(
L""
);
mainGame
->
ebDefense
->
setText
(
L""
);
mainGame
->
ebStar
->
setText
(
L""
);
mainGame
->
ebScale
->
setText
(
L""
);
mainGame
->
cbCardType2
->
setEnabled
(
false
);
mainGame
->
cbAttribute
->
setEnabled
(
false
);
mainGame
->
cbRace
->
setEnabled
(
false
);
mainGame
->
ebAttack
->
setEnabled
(
false
);
mainGame
->
ebDefense
->
setEnabled
(
false
);
mainGame
->
ebStar
->
setEnabled
(
false
);
mainGame
->
ebScale
->
setEnabled
(
false
);
mainGame
->
deckBuilder
.
filter_effect
=
0
;
mainGame
->
deckBuilder
.
filter_marks
=
0
;
mainGame
->
deckBuilder
.
result_string
[
0
]
=
L'0'
;
mainGame
->
deckBuilder
.
result_string
[
1
]
=
0
;
mainGame
->
deckBuilder
.
results
.
clear
();
mainGame
->
deckBuilder
.
is_draging
=
false
;
mainGame
->
deckBuilder
.
is_deleting
=
false
;
mainGame
->
deckBuilder
.
is_clearing
=
false
;
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
deckBuilder
);
for
(
int
i
=
0
;
i
<
32
;
++
i
)
mainGame
->
chkCategory
[
i
]
->
setChecked
(
false
);
for
(
int
i
=
0
;
i
<
8
;
i
++
)
mainGame
->
btnMark
[
i
]
->
setPressed
(
false
);
mainGame
->
deckBuilder
.
Initialize
();
break
;
}
}
...
...
strings.conf
View file @
2a0cf61c
...
...
@@ -356,6 +356,7 @@
!
system
1353
播放起始于回合:
!
system
1354
不显示卡片系列
!
system
1355
不显示提示按钮
!
system
1356
是否要放弃改变?
!
system
1360
上一步
!
system
1370
星数↑
!
system
1371
攻击↑
...
...
system.conf
View file @
2a0cf61c
...
...
@@ -26,3 +26,4 @@ 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
prompt_to_discard_deck_changes
=
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