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-520DIY
ygopro
Commits
b37f6fa6
Commit
b37f6fa6
authored
Mar 21, 2021
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro
into server
parents
63230d50
2262dc8e
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1002 additions
and
150 deletions
+1002
-150
gframe/deck_con.cpp
gframe/deck_con.cpp
+630
-85
gframe/deck_con.h
gframe/deck_con.h
+10
-0
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+70
-10
gframe/deck_manager.h
gframe/deck_manager.h
+8
-2
gframe/duelclient.cpp
gframe/duelclient.cpp
+4
-2
gframe/event_handler.cpp
gframe/event_handler.cpp
+21
-0
gframe/game.cpp
gframe/game.cpp
+122
-33
gframe/game.h
gframe/game.h
+53
-5
gframe/gframe.cpp
gframe/gframe.cpp
+1
-0
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+54
-11
strings.conf
strings.conf
+25
-2
system.conf
system.conf
+4
-0
No files found.
gframe/deck_con.cpp
View file @
b37f6fa6
This diff is collapsed.
Click to expand it.
gframe/deck_con.h
View file @
b37f6fa6
...
@@ -21,6 +21,14 @@ public:
...
@@ -21,6 +21,14 @@ public:
void
ClearSearch
();
void
ClearSearch
();
void
SortList
();
void
SortList
();
void
RefreshDeckList
();
void
RefreshReadonly
(
int
catesel
);
void
ChangeCategory
(
int
catesel
);
void
ShowDeckManage
();
void
ShowBigCard
(
int
code
,
float
zoom
);
void
ZoomBigCard
(
s32
centerx
=
-
1
,
s32
centery
=
-
1
);
void
CloseBigCard
();
bool
CardNameContains
(
const
wchar_t
*
haystack
,
const
wchar_t
*
needle
);
bool
CardNameContains
(
const
wchar_t
*
haystack
,
const
wchar_t
*
needle
);
bool
push_main
(
code_pointer
pointer
,
int
seq
=
-
1
);
bool
push_main
(
code_pointer
pointer
,
int
seq
=
-
1
);
...
@@ -62,10 +70,12 @@ public:
...
@@ -62,10 +70,12 @@ public:
size_t
pre_extrac
;
size_t
pre_extrac
;
size_t
pre_sidec
;
size_t
pre_sidec
;
code_pointer
draging_pointer
;
code_pointer
draging_pointer
;
int
prev_category
;
int
prev_deck
;
int
prev_deck
;
s32
prev_operation
;
s32
prev_operation
;
int
prev_sel
;
int
prev_sel
;
bool
is_modified
;
bool
is_modified
;
bool
readonly
;
const
std
::
unordered_map
<
int
,
int
>*
filterList
;
const
std
::
unordered_map
<
int
,
int
>*
filterList
;
std
::
vector
<
code_pointer
>
results
;
std
::
vector
<
code_pointer
>
results
;
...
...
gframe/deck_manager.cpp
View file @
b37f6fa6
...
@@ -192,6 +192,43 @@ bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) {
...
@@ -192,6 +192,43 @@ bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) {
deck
=
ndeck
;
deck
=
ndeck
;
return
true
;
return
true
;
}
}
void
DeckManager
::
GetCategoryPath
(
wchar_t
*
ret
,
int
index
,
const
wchar_t
*
text
)
{
wchar_t
catepath
[
256
];
switch
(
index
)
{
case
0
:
myswprintf
(
catepath
,
L"./pack"
);
break
;
case
1
:
myswprintf
(
catepath
,
mainGame
->
gameConf
.
bot_deck_path
);
break
;
case
-
1
:
case
2
:
case
3
:
myswprintf
(
catepath
,
L"./deck"
);
break
;
default:
myswprintf
(
catepath
,
L"./deck/%ls"
,
text
);
}
BufferIO
::
CopyWStr
(
catepath
,
ret
,
256
);
}
void
DeckManager
::
GetDeckFile
(
wchar_t
*
ret
,
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
)
{
wchar_t
filepath
[
256
];
wchar_t
catepath
[
256
];
wchar_t
*
deckname
=
(
wchar_t
*
)
cbDeck
->
getItem
(
cbDeck
->
getSelected
());
if
(
deckname
!=
NULL
)
{
GetCategoryPath
(
catepath
,
cbCategory
->
getSelected
(),
cbCategory
->
getText
());
myswprintf
(
filepath
,
L"%ls/%ls.ydk"
,
catepath
,
deckname
);
BufferIO
::
CopyWStr
(
filepath
,
ret
,
256
);
}
else
{
BufferIO
::
CopyWStr
(
L""
,
ret
,
256
);
}
}
bool
DeckManager
::
LoadDeck
(
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
)
{
wchar_t
filepath
[
256
];
GetDeckFile
(
filepath
,
cbCategory
,
cbDeck
);
return
LoadDeck
(
filepath
);
}
FILE
*
DeckManager
::
OpenDeckFile
(
const
wchar_t
*
file
,
const
char
*
mode
)
{
FILE
*
DeckManager
::
OpenDeckFile
(
const
wchar_t
*
file
,
const
char
*
mode
)
{
#ifdef WIN32
#ifdef WIN32
FILE
*
fp
=
_wfopen
(
file
,
(
wchar_t
*
)
mode
);
FILE
*
fp
=
_wfopen
(
file
,
(
wchar_t
*
)
mode
);
...
@@ -204,11 +241,11 @@ FILE* DeckManager::OpenDeckFile(const wchar_t* file, const char* mode) {
...
@@ -204,11 +241,11 @@ FILE* DeckManager::OpenDeckFile(const wchar_t* file, const char* mode) {
}
}
bool
DeckManager
::
LoadDeck
(
const
wchar_t
*
file
)
{
bool
DeckManager
::
LoadDeck
(
const
wchar_t
*
file
)
{
int
sp
=
0
,
ct
=
0
,
mainc
=
0
,
sidec
=
0
,
code
;
int
sp
=
0
,
ct
=
0
,
mainc
=
0
,
sidec
=
0
,
code
;
FILE
*
fp
=
OpenDeckFile
(
file
,
"r"
);
if
(
!
fp
)
{
wchar_t
localfile
[
64
];
wchar_t
localfile
[
64
];
myswprintf
(
localfile
,
L"./deck/%ls.ydk"
,
file
);
myswprintf
(
localfile
,
L"./deck/%ls.ydk"
,
file
);
FILE
*
fp
=
OpenDeckFile
(
localfile
,
"r"
);
fp
=
OpenDeckFile
(
localfile
,
"r"
);
if
(
!
fp
)
{
fp
=
OpenDeckFile
(
file
,
"r"
);
}
}
if
(
!
fp
)
if
(
!
fp
)
return
false
;
return
false
;
...
@@ -234,11 +271,9 @@ bool DeckManager::LoadDeck(const wchar_t* file) {
...
@@ -234,11 +271,9 @@ bool DeckManager::LoadDeck(const wchar_t* file) {
LoadDeck
(
current_deck
,
cardlist
,
mainc
,
sidec
);
LoadDeck
(
current_deck
,
cardlist
,
mainc
,
sidec
);
return
true
;
return
true
;
}
}
bool
DeckManager
::
SaveDeck
(
Deck
&
deck
,
const
wchar_t
*
nam
e
)
{
bool
DeckManager
::
SaveDeck
(
Deck
&
deck
,
const
wchar_t
*
fil
e
)
{
if
(
!
FileSystem
::
IsDirExists
(
L"./deck"
)
&&
!
FileSystem
::
MakeDir
(
L"./deck"
))
if
(
!
FileSystem
::
IsDirExists
(
L"./deck"
)
&&
!
FileSystem
::
MakeDir
(
L"./deck"
))
return
false
;
return
false
;
wchar_t
file
[
64
];
myswprintf
(
file
,
L"./deck/%ls.ydk"
,
name
);
FILE
*
fp
=
OpenDeckFile
(
file
,
"w"
);
FILE
*
fp
=
OpenDeckFile
(
file
,
"w"
);
if
(
!
fp
)
if
(
!
fp
)
return
false
;
return
false
;
...
@@ -254,9 +289,7 @@ bool DeckManager::SaveDeck(Deck& deck, const wchar_t* name) {
...
@@ -254,9 +289,7 @@ bool DeckManager::SaveDeck(Deck& deck, const wchar_t* name) {
fclose
(
fp
);
fclose
(
fp
);
return
true
;
return
true
;
}
}
bool
DeckManager
::
DeleteDeck
(
Deck
&
deck
,
const
wchar_t
*
name
)
{
bool
DeckManager
::
DeleteDeck
(
const
wchar_t
*
file
)
{
wchar_t
file
[
64
];
myswprintf
(
file
,
L"./deck/%ls.ydk"
,
name
);
#ifdef WIN32
#ifdef WIN32
BOOL
result
=
DeleteFileW
(
file
);
BOOL
result
=
DeleteFileW
(
file
);
return
!!
result
;
return
!!
result
;
...
@@ -267,4 +300,31 @@ bool DeckManager::DeleteDeck(Deck& deck, const wchar_t* name) {
...
@@ -267,4 +300,31 @@ bool DeckManager::DeleteDeck(Deck& deck, const wchar_t* name) {
return
result
==
0
;
return
result
==
0
;
#endif
#endif
}
}
bool
DeckManager
::
CreateCategory
(
const
wchar_t
*
name
)
{
if
(
!
FileSystem
::
IsDirExists
(
L"./deck"
)
&&
!
FileSystem
::
MakeDir
(
L"./deck"
))
return
false
;
if
(
name
[
0
]
==
0
)
return
false
;
wchar_t
localname
[
256
];
myswprintf
(
localname
,
L"./deck/%ls"
,
name
);
return
FileSystem
::
MakeDir
(
localname
);
}
bool
DeckManager
::
RenameCategory
(
const
wchar_t
*
oldname
,
const
wchar_t
*
newname
)
{
if
(
!
FileSystem
::
IsDirExists
(
L"./deck"
)
&&
!
FileSystem
::
MakeDir
(
L"./deck"
))
return
false
;
if
(
newname
[
0
]
==
0
)
return
false
;
wchar_t
oldlocalname
[
256
];
wchar_t
newlocalname
[
256
];
myswprintf
(
oldlocalname
,
L"./deck/%ls"
,
oldname
);
myswprintf
(
newlocalname
,
L"./deck/%ls"
,
newname
);
return
FileSystem
::
Rename
(
oldlocalname
,
newlocalname
);
}
bool
DeckManager
::
DeleteCategory
(
const
wchar_t
*
name
)
{
wchar_t
localname
[
256
];
myswprintf
(
localname
,
L"./deck/%ls"
,
name
);
if
(
!
FileSystem
::
IsDirExists
(
localname
))
return
false
;
return
FileSystem
::
DeleteDir
(
localname
);
}
}
}
gframe/deck_manager.h
View file @
b37f6fa6
...
@@ -42,10 +42,16 @@ public:
...
@@ -42,10 +42,16 @@ public:
int
CheckDeck
(
Deck
&
deck
,
int
lfhash
,
bool
allow_ocg
,
bool
allow_tcg
);
int
CheckDeck
(
Deck
&
deck
,
int
lfhash
,
bool
allow_ocg
,
bool
allow_tcg
);
int
LoadDeck
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
);
int
LoadDeck
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
);
bool
LoadSide
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
);
bool
LoadSide
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
);
void
GetCategoryPath
(
wchar_t
*
ret
,
int
index
,
const
wchar_t
*
text
);
void
GetDeckFile
(
wchar_t
*
ret
,
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
bool
LoadDeck
(
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
FILE
*
OpenDeckFile
(
const
wchar_t
*
file
,
const
char
*
mode
);
FILE
*
OpenDeckFile
(
const
wchar_t
*
file
,
const
char
*
mode
);
bool
LoadDeck
(
const
wchar_t
*
file
);
bool
LoadDeck
(
const
wchar_t
*
file
);
bool
SaveDeck
(
Deck
&
deck
,
const
wchar_t
*
name
);
bool
SaveDeck
(
Deck
&
deck
,
const
wchar_t
*
file
);
bool
DeleteDeck
(
Deck
&
deck
,
const
wchar_t
*
name
);
bool
DeleteDeck
(
const
wchar_t
*
file
);
bool
CreateCategory
(
const
wchar_t
*
name
);
bool
RenameCategory
(
const
wchar_t
*
oldname
,
const
wchar_t
*
newname
);
bool
DeleteCategory
(
const
wchar_t
*
name
);
};
};
extern
DeckManager
deckManager
;
extern
DeckManager
deckManager
;
...
...
gframe/duelclient.cpp
View file @
b37f6fa6
...
@@ -143,7 +143,7 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
...
@@ -143,7 +143,7 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
cscg
.
info
.
start_lp
=
_wtoi
(
mainGame
->
ebStartLP
->
getText
());
cscg
.
info
.
start_lp
=
_wtoi
(
mainGame
->
ebStartLP
->
getText
());
cscg
.
info
.
draw_count
=
_wtoi
(
mainGame
->
ebDrawCount
->
getText
());
cscg
.
info
.
draw_count
=
_wtoi
(
mainGame
->
ebDrawCount
->
getText
());
cscg
.
info
.
time_limit
=
_wtoi
(
mainGame
->
ebTimeLimit
->
getText
());
cscg
.
info
.
time_limit
=
_wtoi
(
mainGame
->
ebTimeLimit
->
getText
());
cscg
.
info
.
lflist
=
mainGame
->
cb
LFlist
->
getItemData
(
mainGame
->
cb
LFlist
->
getSelected
());
cscg
.
info
.
lflist
=
mainGame
->
cb
HostLFlist
->
getItemData
(
mainGame
->
cbHost
LFlist
->
getSelected
());
cscg
.
info
.
duel_rule
=
mainGame
->
cbDuelRule
->
getSelected
()
+
1
;
cscg
.
info
.
duel_rule
=
mainGame
->
cbDuelRule
->
getSelected
()
+
1
;
cscg
.
info
.
no_check_deck
=
mainGame
->
chkNoCheckDeck
->
isChecked
();
cscg
.
info
.
no_check_deck
=
mainGame
->
chkNoCheckDeck
->
isChecked
();
cscg
.
info
.
no_shuffle_deck
=
mainGame
->
chkNoShuffleDeck
->
isChecked
();
cscg
.
info
.
no_shuffle_deck
=
mainGame
->
chkNoShuffleDeck
->
isChecked
();
...
@@ -311,6 +311,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -311,6 +311,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
}
}
soundManager
.
PlaySoundEffect
(
SOUND_INFO
);
soundManager
.
PlaySoundEffect
(
SOUND_INFO
);
mainGame
->
env
->
addMessageBox
(
L""
,
msgbuf
);
mainGame
->
env
->
addMessageBox
(
L""
,
msgbuf
);
mainGame
->
cbCategorySelect
->
setEnabled
(
true
);
mainGame
->
cbDeckSelect
->
setEnabled
(
true
);
mainGame
->
cbDeckSelect
->
setEnabled
(
true
);
mainGame
->
gMutex
.
unlock
();
mainGame
->
gMutex
.
unlock
();
break
;
break
;
...
@@ -477,7 +478,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -477,7 +478,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
stHostPrepDuelist
[
3
]
->
setText
(
L""
);
mainGame
->
stHostPrepDuelist
[
3
]
->
setText
(
L""
);
mainGame
->
stHostPrepOB
->
setText
(
L""
);
mainGame
->
stHostPrepOB
->
setText
(
L""
);
mainGame
->
SetStaticText
(
mainGame
->
stHostPrepRule
,
180
,
mainGame
->
guiFont
,
str
.
c_str
());
mainGame
->
SetStaticText
(
mainGame
->
stHostPrepRule
,
180
,
mainGame
->
guiFont
,
str
.
c_str
());
mainGame
->
RefreshDeck
(
mainGame
->
cbDeckSelect
);
mainGame
->
RefreshCategoryDeck
(
mainGame
->
cbCategorySelect
,
mainGame
->
cbDeckSelect
);
mainGame
->
cbCategorySelect
->
setEnabled
(
true
);
mainGame
->
cbDeckSelect
->
setEnabled
(
true
);
mainGame
->
cbDeckSelect
->
setEnabled
(
true
);
mainGame
->
HideElement
(
mainGame
->
wCreateHost
);
mainGame
->
HideElement
(
mainGame
->
wCreateHost
);
mainGame
->
HideElement
(
mainGame
->
wLanWindow
);
mainGame
->
HideElement
(
mainGame
->
wLanWindow
);
...
...
gframe/event_handler.cpp
View file @
b37f6fa6
...
@@ -1906,6 +1906,27 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
...
@@ -1906,6 +1906,27 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return
true
;
return
true
;
break
;
break
;
}
}
case
CHECKBOX_LFLIST
:
{
mainGame
->
gameConf
.
use_lflist
=
mainGame
->
chkLFlist
->
isChecked
()
?
1
:
0
;
mainGame
->
cbLFlist
->
setEnabled
(
mainGame
->
gameConf
.
use_lflist
);
mainGame
->
cbLFlist
->
setSelected
(
mainGame
->
gameConf
.
use_lflist
?
mainGame
->
gameConf
.
default_lflist
:
mainGame
->
cbLFlist
->
getItemCount
()
-
1
);
mainGame
->
cbHostLFlist
->
setSelected
(
mainGame
->
gameConf
.
use_lflist
?
mainGame
->
gameConf
.
default_lflist
:
mainGame
->
cbHostLFlist
->
getItemCount
()
-
1
);
mainGame
->
deckBuilder
.
filterList
=
&
deckManager
.
_lfList
[
mainGame
->
cbLFlist
->
getSelected
()].
content
;
return
true
;
break
;
}
}
break
;
}
case
irr
:
:
gui
::
EGET_COMBO_BOX_CHANGED
:
{
switch
(
id
)
{
case
COMBOBOX_LFLIST
:
{
mainGame
->
gameConf
.
default_lflist
=
mainGame
->
cbLFlist
->
getSelected
();
mainGame
->
cbHostLFlist
->
setSelected
(
mainGame
->
gameConf
.
default_lflist
);
mainGame
->
deckBuilder
.
filterList
=
&
deckManager
.
_lfList
[
mainGame
->
gameConf
.
default_lflist
].
content
;
return
true
;
break
;
}
}
}
break
;
break
;
}
}
...
...
gframe/game.cpp
View file @
b37f6fa6
This diff is collapsed.
Click to expand it.
gframe/game.h
View file @
b37f6fa6
...
@@ -26,6 +26,7 @@ struct Config {
...
@@ -26,6 +26,7 @@ struct Config {
wchar_t
lastport
[
10
];
wchar_t
lastport
[
10
];
wchar_t
nickname
[
20
];
wchar_t
nickname
[
20
];
wchar_t
gamename
[
20
];
wchar_t
gamename
[
20
];
wchar_t
lastcategory
[
64
];
wchar_t
lastdeck
[
64
];
wchar_t
lastdeck
[
64
];
wchar_t
textfont
[
256
];
wchar_t
textfont
[
256
];
wchar_t
numfont
[
256
];
wchar_t
numfont
[
256
];
...
@@ -39,6 +40,8 @@ struct Config {
...
@@ -39,6 +40,8 @@ struct Config {
int
chkWaitChain
;
int
chkWaitChain
;
int
chkIgnore1
;
int
chkIgnore1
;
int
chkIgnore2
;
int
chkIgnore2
;
int
use_lflist
;
int
default_lflist
;
int
default_rule
;
int
default_rule
;
int
hide_setname
;
int
hide_setname
;
int
hide_hint_button
;
int
hide_hint_button
;
...
@@ -131,7 +134,9 @@ public:
...
@@ -131,7 +134,9 @@ public:
void
InitStaticText
(
irr
::
gui
::
IGUIStaticText
*
pControl
,
u32
cWidth
,
u32
cHeight
,
irr
::
gui
::
CGUITTFont
*
font
,
const
wchar_t
*
text
);
void
InitStaticText
(
irr
::
gui
::
IGUIStaticText
*
pControl
,
u32
cWidth
,
u32
cHeight
,
irr
::
gui
::
CGUITTFont
*
font
,
const
wchar_t
*
text
);
void
SetStaticText
(
irr
::
gui
::
IGUIStaticText
*
pControl
,
u32
cWidth
,
irr
::
gui
::
CGUITTFont
*
font
,
const
wchar_t
*
text
,
u32
pos
=
0
);
void
SetStaticText
(
irr
::
gui
::
IGUIStaticText
*
pControl
,
u32
cWidth
,
irr
::
gui
::
CGUITTFont
*
font
,
const
wchar_t
*
text
,
u32
pos
=
0
);
void
LoadExpansions
();
void
LoadExpansions
();
void
RefreshDeck
(
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
void
RefreshCategoryDeck
(
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
,
bool
selectlastused
=
true
);
void
RefreshDeck
(
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
void
RefreshDeck
(
const
wchar_t
*
deckpath
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
void
RefreshReplay
();
void
RefreshReplay
();
void
RefreshSingleplay
();
void
RefreshSingleplay
();
void
RefreshBot
();
void
RefreshBot
();
...
@@ -308,6 +313,8 @@ public:
...
@@ -308,6 +313,8 @@ public:
irr
::
gui
::
IGUICheckBox
*
chkAutoSearch
;
irr
::
gui
::
IGUICheckBox
*
chkAutoSearch
;
irr
::
gui
::
IGUICheckBox
*
chkMultiKeywords
;
irr
::
gui
::
IGUICheckBox
*
chkMultiKeywords
;
irr
::
gui
::
IGUICheckBox
*
chkPreferExpansionScript
;
irr
::
gui
::
IGUICheckBox
*
chkPreferExpansionScript
;
irr
::
gui
::
IGUICheckBox
*
chkLFlist
;
irr
::
gui
::
IGUIComboBox
*
cbLFlist
;
irr
::
gui
::
IGUICheckBox
*
chkEnableSound
;
irr
::
gui
::
IGUICheckBox
*
chkEnableSound
;
irr
::
gui
::
IGUICheckBox
*
chkEnableMusic
;
irr
::
gui
::
IGUICheckBox
*
chkEnableMusic
;
irr
::
gui
::
IGUIScrollBar
*
scrSoundVolume
;
irr
::
gui
::
IGUIScrollBar
*
scrSoundVolume
;
...
@@ -338,7 +345,7 @@ public:
...
@@ -338,7 +345,7 @@ public:
irr
::
gui
::
IGUIButton
*
btnCreateHost
;
irr
::
gui
::
IGUIButton
*
btnCreateHost
;
//create host
//create host
irr
::
gui
::
IGUIWindow
*
wCreateHost
;
irr
::
gui
::
IGUIWindow
*
wCreateHost
;
irr
::
gui
::
IGUIComboBox
*
cbLFlist
;
irr
::
gui
::
IGUIComboBox
*
cb
Host
LFlist
;
irr
::
gui
::
IGUIComboBox
*
cbMatchMode
;
irr
::
gui
::
IGUIComboBox
*
cbMatchMode
;
irr
::
gui
::
IGUIComboBox
*
cbRule
;
irr
::
gui
::
IGUIComboBox
*
cbRule
;
irr
::
gui
::
IGUIEditBox
*
ebTimeLimit
;
irr
::
gui
::
IGUIEditBox
*
ebTimeLimit
;
...
@@ -359,6 +366,7 @@ public:
...
@@ -359,6 +366,7 @@ public:
irr
::
gui
::
IGUIStaticText
*
stHostPrepDuelist
[
4
];
irr
::
gui
::
IGUIStaticText
*
stHostPrepDuelist
[
4
];
irr
::
gui
::
IGUICheckBox
*
chkHostPrepReady
[
4
];
irr
::
gui
::
IGUICheckBox
*
chkHostPrepReady
[
4
];
irr
::
gui
::
IGUIButton
*
btnHostPrepKick
[
4
];
irr
::
gui
::
IGUIButton
*
btnHostPrepKick
[
4
];
irr
::
gui
::
IGUIComboBox
*
cbCategorySelect
;
irr
::
gui
::
IGUIComboBox
*
cbDeckSelect
;
irr
::
gui
::
IGUIComboBox
*
cbDeckSelect
;
irr
::
gui
::
IGUIStaticText
*
stHostPrepRule
;
irr
::
gui
::
IGUIStaticText
*
stHostPrepRule
;
irr
::
gui
::
IGUIStaticText
*
stHostPrepOB
;
irr
::
gui
::
IGUIStaticText
*
stHostPrepOB
;
...
@@ -381,6 +389,7 @@ public:
...
@@ -381,6 +389,7 @@ public:
irr
::
gui
::
IGUIStaticText
*
stBotInfo
;
irr
::
gui
::
IGUIStaticText
*
stBotInfo
;
irr
::
gui
::
IGUIButton
*
btnStartBot
;
irr
::
gui
::
IGUIButton
*
btnStartBot
;
irr
::
gui
::
IGUIButton
*
btnBotCancel
;
irr
::
gui
::
IGUIButton
*
btnBotCancel
;
irr
::
gui
::
IGUIComboBox
*
cbBotDeckCategory
;
irr
::
gui
::
IGUIComboBox
*
cbBotDeck
;
irr
::
gui
::
IGUIComboBox
*
cbBotDeck
;
irr
::
gui
::
IGUIComboBox
*
cbBotRule
;
irr
::
gui
::
IGUIComboBox
*
cbBotRule
;
irr
::
gui
::
IGUICheckBox
*
chkBotHand
;
irr
::
gui
::
IGUICheckBox
*
chkBotHand
;
...
@@ -483,8 +492,9 @@ public:
...
@@ -483,8 +492,9 @@ public:
irr
::
gui
::
IGUIButton
*
btnEP
;
irr
::
gui
::
IGUIButton
*
btnEP
;
//deck edit
//deck edit
irr
::
gui
::
IGUIStaticText
*
wDeckEdit
;
irr
::
gui
::
IGUIStaticText
*
wDeckEdit
;
irr
::
gui
::
IGUIComboBox
*
cbDB
LFList
;
irr
::
gui
::
IGUIComboBox
*
cbDB
Category
;
irr
::
gui
::
IGUIComboBox
*
cbDBDecks
;
irr
::
gui
::
IGUIComboBox
*
cbDBDecks
;
irr
::
gui
::
IGUIButton
*
btnManageDeck
;
irr
::
gui
::
IGUIButton
*
btnClearDeck
;
irr
::
gui
::
IGUIButton
*
btnClearDeck
;
irr
::
gui
::
IGUIButton
*
btnSortDeck
;
irr
::
gui
::
IGUIButton
*
btnSortDeck
;
irr
::
gui
::
IGUIButton
*
btnShuffleDeck
;
irr
::
gui
::
IGUIButton
*
btnShuffleDeck
;
...
@@ -496,7 +506,7 @@ public:
...
@@ -496,7 +506,7 @@ public:
irr
::
gui
::
IGUIButton
*
btnSideSort
;
irr
::
gui
::
IGUIButton
*
btnSideSort
;
irr
::
gui
::
IGUIButton
*
btnSideReload
;
irr
::
gui
::
IGUIButton
*
btnSideReload
;
irr
::
gui
::
IGUIEditBox
*
ebDeckname
;
irr
::
gui
::
IGUIEditBox
*
ebDeckname
;
irr
::
gui
::
IGUIStaticText
*
st
Banlist
;
irr
::
gui
::
IGUIStaticText
*
st
DBCategory
;
irr
::
gui
::
IGUIStaticText
*
stDeck
;
irr
::
gui
::
IGUIStaticText
*
stDeck
;
irr
::
gui
::
IGUIStaticText
*
stCategory
;
irr
::
gui
::
IGUIStaticText
*
stCategory
;
irr
::
gui
::
IGUIStaticText
*
stLimit
;
irr
::
gui
::
IGUIStaticText
*
stLimit
;
...
@@ -507,6 +517,25 @@ public:
...
@@ -507,6 +517,25 @@ public:
irr
::
gui
::
IGUIStaticText
*
stStar
;
irr
::
gui
::
IGUIStaticText
*
stStar
;
irr
::
gui
::
IGUIStaticText
*
stSearch
;
irr
::
gui
::
IGUIStaticText
*
stSearch
;
irr
::
gui
::
IGUIStaticText
*
stScale
;
irr
::
gui
::
IGUIStaticText
*
stScale
;
//deck manage
irr
::
gui
::
IGUIWindow
*
wDeckManage
;
irr
::
gui
::
IGUIListBox
*
lstCategories
;
irr
::
gui
::
IGUIListBox
*
lstDecks
;
irr
::
gui
::
IGUIButton
*
btnNewCategory
;
irr
::
gui
::
IGUIButton
*
btnRenameCategory
;
irr
::
gui
::
IGUIButton
*
btnDeleteCategory
;
irr
::
gui
::
IGUIButton
*
btnNewDeck
;
irr
::
gui
::
IGUIButton
*
btnRenameDeck
;
irr
::
gui
::
IGUIButton
*
btnDMDeleteDeck
;
irr
::
gui
::
IGUIButton
*
btnMoveDeck
;
irr
::
gui
::
IGUIButton
*
btnCopyDeck
;
irr
::
gui
::
IGUIWindow
*
wDMQuery
;
irr
::
gui
::
IGUIStaticText
*
stDMMessage
;
irr
::
gui
::
IGUIStaticText
*
stDMMessage2
;
irr
::
gui
::
IGUIEditBox
*
ebDMName
;
irr
::
gui
::
IGUIComboBox
*
cbDMCategory
;
irr
::
gui
::
IGUIButton
*
btnDMOK
;
irr
::
gui
::
IGUIButton
*
btnDMCancel
;
//filter
//filter
irr
::
gui
::
IGUIStaticText
*
wFilter
;
irr
::
gui
::
IGUIStaticText
*
wFilter
;
irr
::
gui
::
IGUIScrollBar
*
scrFilter
;
irr
::
gui
::
IGUIScrollBar
*
scrFilter
;
...
@@ -617,6 +646,7 @@ extern time_t pre_seed[3];
...
@@ -617,6 +646,7 @@ extern time_t pre_seed[3];
#define CHECKBOX_HP_READY 125
#define CHECKBOX_HP_READY 125
#define BUTTON_HP_READY 126
#define BUTTON_HP_READY 126
#define BUTTON_HP_NOTREADY 127
#define BUTTON_HP_NOTREADY 127
#define COMBOBOX_HP_CATEGORY 128
#define LISTBOX_REPLAY_LIST 130
#define LISTBOX_REPLAY_LIST 130
#define BUTTON_LOAD_REPLAY 131
#define BUTTON_LOAD_REPLAY 131
#define BUTTON_CANCEL_REPLAY 132
#define BUTTON_CANCEL_REPLAY 132
...
@@ -636,6 +666,7 @@ extern time_t pre_seed[3];
...
@@ -636,6 +666,7 @@ extern time_t pre_seed[3];
#define LISTBOX_BOT_LIST 153
#define LISTBOX_BOT_LIST 153
#define BUTTON_BOT_START 154
#define BUTTON_BOT_START 154
#define COMBOBOX_BOT_RULE 155
#define COMBOBOX_BOT_RULE 155
#define COMBOBOX_BOT_DECKCATEGORY 156
#define EDITBOX_CHAT 199
#define EDITBOX_CHAT 199
#define BUTTON_MSG_OK 200
#define BUTTON_MSG_OK 200
...
@@ -714,7 +745,8 @@ extern time_t pre_seed[3];
...
@@ -714,7 +745,8 @@ extern time_t pre_seed[3];
#define BUTTON_SURRENDER_YES 297
#define BUTTON_SURRENDER_YES 297
#define BUTTON_SURRENDER_NO 298
#define BUTTON_SURRENDER_NO 298
#define COMBOBOX_DBLFLIST 301
#define BUTTON_MANAGE_DECK 300
#define COMBOBOX_DBCATEGORY 301
#define COMBOBOX_DBDECKS 302
#define COMBOBOX_DBDECKS 302
#define BUTTON_CLEAR_DECK 303
#define BUTTON_CLEAR_DECK 303
#define BUTTON_SAVE_DECK 304
#define BUTTON_SAVE_DECK 304
...
@@ -739,6 +771,21 @@ extern time_t pre_seed[3];
...
@@ -739,6 +771,21 @@ extern time_t pre_seed[3];
#define BUTTON_MARKERS_OK 323
#define BUTTON_MARKERS_OK 323
#define COMBOBOX_SORTTYPE 324
#define COMBOBOX_SORTTYPE 324
#define EDITBOX_INPUTS 325
#define EDITBOX_INPUTS 325
#define WINDOW_DECK_MANAGE 330
#define BUTTON_NEW_CATEGORY 331
#define BUTTON_RENAME_CATEGORY 332
#define BUTTON_DELETE_CATEGORY 333
#define BUTTON_NEW_DECK 334
#define BUTTON_RENAME_DECK 335
#define BUTTON_DELETE_DECK_DM 336
#define BUTTON_MOVE_DECK 337
#define BUTTON_COPY_DECK 338
#define LISTBOX_CATEGORIES 339
#define LISTBOX_DECKS 340
#define BUTTON_DM_OK 341
#define BUTTON_DM_CANCEL 342
#define COMBOBOX_LFLIST 349
#define BUTTON_CLEAR_LOG 350
#define BUTTON_CLEAR_LOG 350
#define LISTBOX_LOG 351
#define LISTBOX_LOG 351
#define SCROLL_CARDTEXT 352
#define SCROLL_CARDTEXT 352
...
@@ -757,6 +804,7 @@ extern time_t pre_seed[3];
...
@@ -757,6 +804,7 @@ extern time_t pre_seed[3];
#define CHECKBOX_MULTI_KEYWORDS 372
#define CHECKBOX_MULTI_KEYWORDS 372
#define CHECKBOX_PREFER_EXPANSION 373
#define CHECKBOX_PREFER_EXPANSION 373
#define CHECKBOX_DRAW_SINGLE_CHAIN 374
#define CHECKBOX_DRAW_SINGLE_CHAIN 374
#define CHECKBOX_LFLIST 375
#define BUTTON_BIG_CARD_CLOSE 380
#define BUTTON_BIG_CARD_CLOSE 380
#define BUTTON_BIG_CARD_ZOOM_IN 381
#define BUTTON_BIG_CARD_ZOOM_IN 381
#define BUTTON_BIG_CARD_ZOOM_OUT 382
#define BUTTON_BIG_CARD_ZOOM_OUT 382
...
...
gframe/gframe.cpp
View file @
b37f6fa6
...
@@ -173,6 +173,7 @@ int main(int argc, char* argv[]) {
...
@@ -173,6 +173,7 @@ int main(int argc, char* argv[]) {
keep_on_return
=
true
;
keep_on_return
=
true
;
}
else
if
(
!
wcscmp
(
wargv
[
i
],
L"-d"
))
{
// Deck
}
else
if
(
!
wcscmp
(
wargv
[
i
],
L"-d"
))
{
// Deck
++
i
;
++
i
;
ygo
::
mainGame
->
gameConf
.
lastcategory
[
0
]
=
0
;
if
(
i
+
1
<
wargc
)
{
// select deck
if
(
i
+
1
<
wargc
)
{
// select deck
wcscpy
(
ygo
::
mainGame
->
gameConf
.
lastdeck
,
wargv
[
i
]);
wcscpy
(
ygo
::
mainGame
->
gameConf
.
lastdeck
,
wargv
[
i
]);
continue
;
continue
;
...
...
gframe/menu_handler.cpp
View file @
b37f6fa6
...
@@ -12,6 +12,8 @@
...
@@ -12,6 +12,8 @@
namespace
ygo
{
namespace
ygo
{
void
UpdateDeck
()
{
void
UpdateDeck
()
{
BufferIO
::
CopyWStr
(
mainGame
->
cbCategorySelect
->
getItem
(
mainGame
->
cbCategorySelect
->
getSelected
()),
mainGame
->
gameConf
.
lastcategory
,
64
);
BufferIO
::
CopyWStr
(
mainGame
->
cbDeckSelect
->
getItem
(
mainGame
->
cbDeckSelect
->
getSelected
()),
BufferIO
::
CopyWStr
(
mainGame
->
cbDeckSelect
->
getItem
(
mainGame
->
cbDeckSelect
->
getSelected
()),
mainGame
->
gameConf
.
lastdeck
,
64
);
mainGame
->
gameConf
.
lastdeck
,
64
);
char
deckbuf
[
1024
];
char
deckbuf
[
1024
];
...
@@ -143,6 +145,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -143,6 +145,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_HP_DUELIST
:
{
case
BUTTON_HP_DUELIST
:
{
mainGame
->
cbCategorySelect
->
setEnabled
(
true
);
mainGame
->
cbDeckSelect
->
setEnabled
(
true
);
mainGame
->
cbDeckSelect
->
setEnabled
(
true
);
DuelClient
::
SendPacketToServer
(
CTOS_HS_TODUELIST
);
DuelClient
::
SendPacketToServer
(
CTOS_HS_TODUELIST
);
break
;
break
;
...
@@ -164,17 +167,19 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -164,17 +167,19 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_HP_READY
:
{
case
BUTTON_HP_READY
:
{
if
(
mainGame
->
cbDeckSelect
->
getSelected
()
==
-
1
||
if
(
mainGame
->
cb
CategorySelect
->
getSelected
()
==
-
1
||
mainGame
->
cb
DeckSelect
->
getSelected
()
==
-
1
||
!
deckManager
.
LoadDeck
(
mainGame
->
cb
DeckSelect
->
getItem
(
mainGame
->
cbDeckSelect
->
getSelected
())
))
{
!
deckManager
.
LoadDeck
(
mainGame
->
cb
CategorySelect
,
mainGame
->
cbDeckSelect
))
{
break
;
break
;
}
}
UpdateDeck
();
UpdateDeck
();
DuelClient
::
SendPacketToServer
(
CTOS_HS_READY
);
DuelClient
::
SendPacketToServer
(
CTOS_HS_READY
);
mainGame
->
cbCategorySelect
->
setEnabled
(
false
);
mainGame
->
cbDeckSelect
->
setEnabled
(
false
);
mainGame
->
cbDeckSelect
->
setEnabled
(
false
);
break
;
break
;
}
}
case
BUTTON_HP_NOTREADY
:
{
case
BUTTON_HP_NOTREADY
:
{
DuelClient
::
SendPacketToServer
(
CTOS_HS_NOTREADY
);
DuelClient
::
SendPacketToServer
(
CTOS_HS_NOTREADY
);
mainGame
->
cbCategorySelect
->
setEnabled
(
true
);
mainGame
->
cbDeckSelect
->
setEnabled
(
true
);
mainGame
->
cbDeckSelect
->
setEnabled
(
true
);
break
;
break
;
}
}
...
@@ -294,8 +299,11 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -294,8 +299,11 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
ZeroMemory
(
&
pi
,
sizeof
(
pi
));
ZeroMemory
(
&
pi
,
sizeof
(
pi
));
wchar_t
cmd
[
MAX_PATH
];
wchar_t
cmd
[
MAX_PATH
];
wchar_t
arg1
[
512
];
wchar_t
arg1
[
512
];
if
(
mainGame
->
botInfo
[
sel
].
select_deckfile
)
if
(
mainGame
->
botInfo
[
sel
].
select_deckfile
)
{
myswprintf
(
arg1
,
L"%ls DeckFile='%ls'"
,
mainGame
->
botInfo
[
sel
].
command
,
mainGame
->
cbBotDeck
->
getItem
(
mainGame
->
cbBotDeck
->
getSelected
()));
wchar_t
botdeck
[
256
];
deckManager
.
GetDeckFile
(
botdeck
,
mainGame
->
cbBotDeckCategory
,
mainGame
->
cbBotDeck
);
myswprintf
(
arg1
,
L"%ls DeckFile='%ls'"
,
mainGame
->
botInfo
[
sel
].
command
,
botdeck
);
}
else
else
myswprintf
(
arg1
,
L"%ls"
,
mainGame
->
botInfo
[
sel
].
command
);
myswprintf
(
arg1
,
L"%ls"
,
mainGame
->
botInfo
[
sel
].
command
);
int
flag
=
0
;
int
flag
=
0
;
...
@@ -310,8 +318,11 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -310,8 +318,11 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
if
(
fork
()
==
0
)
{
if
(
fork
()
==
0
)
{
usleep
(
100000
);
usleep
(
100000
);
wchar_t
warg1
[
512
];
wchar_t
warg1
[
512
];
if
(
mainGame
->
botInfo
[
sel
].
select_deckfile
)
if
(
mainGame
->
botInfo
[
sel
].
select_deckfile
)
{
myswprintf
(
warg1
,
L"%ls DeckFile='%ls'"
,
mainGame
->
botInfo
[
sel
].
command
,
mainGame
->
cbBotDeck
->
getItem
(
mainGame
->
cbBotDeck
->
getSelected
()));
wchar_t
botdeck
[
256
];
deckManager
.
GetDeckFile
(
botdeck
,
mainGame
->
cbBotDeckCategory
,
mainGame
->
cbBotDeck
);
myswprintf
(
warg1
,
L"%ls DeckFile='%ls'"
,
mainGame
->
botInfo
[
sel
].
command
,
botdeck
);
}
else
else
myswprintf
(
warg1
,
L"%ls"
,
mainGame
->
botInfo
[
sel
].
command
);
myswprintf
(
warg1
,
L"%ls"
,
mainGame
->
botInfo
[
sel
].
command
);
char
arg1
[
512
];
char
arg1
[
512
];
...
@@ -350,7 +361,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -350,7 +361,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_DECK_EDIT
:
{
case
BUTTON_DECK_EDIT
:
{
mainGame
->
Refresh
Deck
(
mainGame
->
cbDBDecks
);
mainGame
->
Refresh
CategoryDeck
(
mainGame
->
cbDBCategory
,
mainGame
->
cbDBDecks
);
if
(
open_file
&&
deckManager
.
LoadDeck
(
open_file_name
))
{
if
(
open_file
&&
deckManager
.
LoadDeck
(
open_file_name
))
{
#ifdef WIN32
#ifdef WIN32
wchar_t
*
dash
=
wcsrchr
(
open_file_name
,
L'\\'
);
wchar_t
*
dash
=
wcsrchr
(
open_file_name
,
L'\\'
);
...
@@ -363,18 +374,23 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -363,18 +374,23 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
wcsncpy
(
deck_name
,
dash
+
1
,
dot
-
dash
-
1
);
wcsncpy
(
deck_name
,
dash
+
1
,
dot
-
dash
-
1
);
deck_name
[
dot
-
dash
-
1
]
=
L'\0'
;
deck_name
[
dot
-
dash
-
1
]
=
L'\0'
;
mainGame
->
ebDeckname
->
setText
(
deck_name
);
mainGame
->
ebDeckname
->
setText
(
deck_name
);
mainGame
->
cbDBCategory
->
setSelected
(
-
1
);
mainGame
->
cbDBDecks
->
setSelected
(
-
1
);
mainGame
->
cbDBDecks
->
setSelected
(
-
1
);
mainGame
->
btnManageDeck
->
setEnabled
(
false
);
mainGame
->
cbDBCategory
->
setEnabled
(
false
);
mainGame
->
cbDBDecks
->
setEnabled
(
false
);
}
else
{
}
else
{
for
(
size_t
i
=
0
;
i
<
mainGame
->
cbDBDecks
->
getItemCount
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
mainGame
->
cbDBDecks
->
getItemCount
();
++
i
)
{
if
(
!
wcscmp
(
mainGame
->
cbDBDecks
->
getItem
(
i
),
open_file_name
))
{
if
(
!
wcscmp
(
mainGame
->
cbDBDecks
->
getItem
(
i
),
open_file_name
))
{
wcscpy
(
mainGame
->
gameConf
.
lastdeck
,
open_file_name
);
mainGame
->
cbDBDecks
->
setSelected
(
i
);
mainGame
->
cbDBDecks
->
setSelected
(
i
);
break
;
break
;
}
}
}
}
}
}
open_file
=
false
;
open_file
=
false
;
}
else
if
(
mainGame
->
cbDBDecks
->
getSelected
()
!=
-
1
)
{
}
else
if
(
mainGame
->
cbDB
Category
->
getSelected
()
!=
-
1
&&
mainGame
->
cbDB
Decks
->
getSelected
()
!=
-
1
)
{
deckManager
.
LoadDeck
(
mainGame
->
cbDB
Decks
->
getItem
(
mainGame
->
cbDBDecks
->
getSelected
())
);
deckManager
.
LoadDeck
(
mainGame
->
cbDB
Category
,
mainGame
->
cbDBDecks
);
mainGame
->
ebDeckname
->
setText
(
L""
);
mainGame
->
ebDeckname
->
setText
(
L""
);
}
}
mainGame
->
HideElement
(
mainGame
->
wMainMenu
);
mainGame
->
HideElement
(
mainGame
->
wMainMenu
);
...
@@ -524,6 +540,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -524,6 +540,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
if
(
sel
==
-
1
)
if
(
sel
==
-
1
)
break
;
break
;
mainGame
->
SetStaticText
(
mainGame
->
stBotInfo
,
200
,
mainGame
->
guiFont
,
mainGame
->
botInfo
[
sel
].
desc
);
mainGame
->
SetStaticText
(
mainGame
->
stBotInfo
,
200
,
mainGame
->
guiFont
,
mainGame
->
botInfo
[
sel
].
desc
);
mainGame
->
cbBotDeckCategory
->
setVisible
(
mainGame
->
botInfo
[
sel
].
select_deckfile
);
mainGame
->
cbBotDeck
->
setVisible
(
mainGame
->
botInfo
[
sel
].
select_deckfile
);
mainGame
->
cbBotDeck
->
setVisible
(
mainGame
->
botInfo
[
sel
].
select_deckfile
);
break
;
break
;
}
}
...
@@ -537,16 +554,18 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -537,16 +554,18 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
break
;
break
;
mainGame
->
env
->
setFocus
(
mainGame
->
wHostPrepare
);
mainGame
->
env
->
setFocus
(
mainGame
->
wHostPrepare
);
if
(
static_cast
<
irr
::
gui
::
IGUICheckBox
*>
(
caller
)
->
isChecked
())
{
if
(
static_cast
<
irr
::
gui
::
IGUICheckBox
*>
(
caller
)
->
isChecked
())
{
if
(
mainGame
->
cbDeckSelect
->
getSelected
()
==
-
1
||
if
(
mainGame
->
cb
CategorySelect
->
getSelected
()
==
-
1
||
mainGame
->
cb
DeckSelect
->
getSelected
()
==
-
1
||
!
deckManager
.
LoadDeck
(
mainGame
->
cbDeckSelect
->
getItem
(
mainGame
->
cbDeckSelect
->
getSelected
())
))
{
!
deckManager
.
LoadDeck
(
mainGame
->
cbCategorySelect
,
mainGame
->
cbDeckSelect
))
{
static_cast
<
irr
::
gui
::
IGUICheckBox
*>
(
caller
)
->
setChecked
(
false
);
static_cast
<
irr
::
gui
::
IGUICheckBox
*>
(
caller
)
->
setChecked
(
false
);
break
;
break
;
}
}
UpdateDeck
();
UpdateDeck
();
DuelClient
::
SendPacketToServer
(
CTOS_HS_READY
);
DuelClient
::
SendPacketToServer
(
CTOS_HS_READY
);
mainGame
->
cbCategorySelect
->
setEnabled
(
false
);
mainGame
->
cbDeckSelect
->
setEnabled
(
false
);
mainGame
->
cbDeckSelect
->
setEnabled
(
false
);
}
else
{
}
else
{
DuelClient
::
SendPacketToServer
(
CTOS_HS_NOTREADY
);
DuelClient
::
SendPacketToServer
(
CTOS_HS_NOTREADY
);
mainGame
->
cbCategorySelect
->
setEnabled
(
true
);
mainGame
->
cbDeckSelect
->
setEnabled
(
true
);
mainGame
->
cbDeckSelect
->
setEnabled
(
true
);
}
}
break
;
break
;
...
@@ -560,6 +579,30 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -560,6 +579,30 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
RefreshBot
();
mainGame
->
RefreshBot
();
break
;
break
;
}
}
case
COMBOBOX_HP_CATEGORY
:
{
int
catesel
=
mainGame
->
cbCategorySelect
->
getSelected
();
if
(
catesel
==
3
)
{
catesel
=
2
;
mainGame
->
cbCategorySelect
->
setSelected
(
2
);
}
if
(
catesel
>=
0
)
{
mainGame
->
RefreshDeck
(
mainGame
->
cbCategorySelect
,
mainGame
->
cbDeckSelect
);
mainGame
->
cbDeckSelect
->
setSelected
(
0
);
}
break
;
}
case
COMBOBOX_BOT_DECKCATEGORY
:
{
int
catesel
=
mainGame
->
cbBotDeckCategory
->
getSelected
();
if
(
catesel
==
3
)
{
catesel
=
2
;
mainGame
->
cbBotDeckCategory
->
setSelected
(
2
);
}
if
(
catesel
>=
0
)
{
mainGame
->
RefreshDeck
(
mainGame
->
cbBotDeckCategory
,
mainGame
->
cbBotDeck
);
mainGame
->
cbBotDeck
->
setSelected
(
0
);
}
break
;
}
}
}
break
;
break
;
}
}
...
...
strings.conf
View file @
b37f6fa6
...
@@ -336,6 +336,7 @@
...
@@ -336,6 +336,7 @@
!
system
1285
大
!
system
1285
大
!
system
1286
特大
!
system
1286
特大
!
system
1287
只有连锁
1
也显示连锁动画
!
system
1287
只有连锁
1
也显示连锁动画
!
system
1288
禁限卡表
!
system
1290
禁用聊天功能
!
system
1290
禁用聊天功能
!
system
1291
忽略观战者发言
!
system
1291
忽略观战者发言
!
system
1292
忽略时点
!
system
1292
忽略时点
...
@@ -346,7 +347,7 @@
...
@@ -346,7 +347,7 @@
!
system
1297
洗切手卡
!
system
1297
洗切手卡
!
system
1298
辅助功能
!
system
1298
辅助功能
!
system
1299
加快动画效果
!
system
1299
加快动画效果
!
system
1300
禁限卡表
:
!
system
1300
卡组分类
:
!
system
1301
卡组列表:
!
system
1301
卡组列表:
!
system
1302
保存
!
system
1302
保存
!
system
1303
另存
!
system
1303
另存
...
@@ -373,6 +374,7 @@
...
@@ -373,6 +374,7 @@
!
system
1325
关键字:
!
system
1325
关键字:
!
system
1326
效果
!
system
1326
效果
!
system
1327
搜索
!
system
1327
搜索
!
system
1328
管理
!
system
1329
系列:
!
system
1329
系列:
!
system
1330
主卡组:
!
system
1330
主卡组:
!
system
1331
额外卡组:
!
system
1331
额外卡组:
...
@@ -398,7 +400,7 @@
...
@@ -398,7 +400,7 @@
!
system
1351
投降
!
system
1351
投降
!
system
1352
主要信息:
!
system
1352
主要信息:
!
system
1353
播放起始于回合:
!
system
1353
播放起始于回合:
!
system
1356
是否要放弃对卡组的修改
?
!
system
1356
此操作将放弃对当前卡组的修改,是否继续
?
!
system
1357
不提示保留对卡组的修改
!
system
1357
不提示保留对卡组的修改
!
system
1358
键入关键字后自动进行搜索
!
system
1358
键入关键字后自动进行搜索
!
system
1359
是否确定投降?
!
system
1359
是否确定投降?
...
@@ -461,6 +463,27 @@
...
@@ -461,6 +463,27 @@
!
system
1441
放大
!
system
1441
放大
!
system
1442
缩小
!
system
1442
缩小
!
system
1443
原始尺寸
!
system
1443
原始尺寸
!
system
1450
卡包展示
!
system
1451
人机卡组
!
system
1452
未分类卡组
!
system
1453
--------
!
system
1460
卡组管理
!
system
1461
新建分类
!
system
1462
重命名分类
!
system
1463
删除分类
!
system
1464
新建卡组
!
system
1465
重命名卡组
!
system
1466
删除卡组
!
system
1467
移动到分类
!
system
1468
复制到分类
!
system
1469
请输入分类名:
!
system
1470
确实要删除此分类和分类下全部卡组吗?
!
system
1471
请输入卡组名:
!
system
1472
请选择要移动到的分类:
!
system
1473
请选择要复制到的分类:
!
system
1474
已存在同名分类
!
system
1475
已存在同名卡组
!
system
1476
删除失败
!
system
1500
决斗结束。
!
system
1500
决斗结束。
!
system
1501
录像结束。
!
system
1501
录像结束。
!
system
1502
连接已断开。
!
system
1502
连接已断开。
...
...
system.conf
View file @
b37f6fa6
...
@@ -6,6 +6,7 @@ antialias = 2
...
@@ -6,6 +6,7 @@ antialias = 2
errorlog
=
3
errorlog
=
3
nickname
=
Player
nickname
=
Player
gamename
=
Game
gamename
=
Game
lastcategory
= 未分类卡组
lastdeck
=
new
lastdeck
=
new
textfont
=
c
:/
windows
/
fonts
/
simsun
.
ttc
14
textfont
=
c
:/
windows
/
fonts
/
simsun
.
ttc
14
numfont
=
c
:/
windows
/
fonts
/
arialbd
.
ttf
numfont
=
c
:/
windows
/
fonts
/
arialbd
.
ttf
...
@@ -19,6 +20,8 @@ autochain = 0
...
@@ -19,6 +20,8 @@ autochain = 0
waitchain
=
0
waitchain
=
0
mute_opponent
=
0
mute_opponent
=
0
mute_spectators
=
0
mute_spectators
=
0
use_lflist
=
1
default_lflist
=
0
default_rule
=
0
default_rule
=
0
hide_setname
=
0
hide_setname
=
0
hide_hint_button
=
0
hide_hint_button
=
0
...
@@ -33,6 +36,7 @@ search_multiple_keywords = 1
...
@@ -33,6 +36,7 @@ search_multiple_keywords = 1
ignore_deck_changes
=
0
ignore_deck_changes
=
0
default_ot
=
1
default_ot
=
1
enable_bot_mode
=
0
enable_bot_mode
=
0
bot_deck_path
= ./
botdeck
quick_animation
=
0
quick_animation
=
0
auto_save_replay
=
0
auto_save_replay
=
0
draw_single_chain
=
0
draw_single_chain
=
0
...
...
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