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
nanahira
ygopro
Commits
4c5de5d4
Commit
4c5de5d4
authored
Apr 21, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename
parent
0cbdcdf0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
44 deletions
+50
-44
gframe/deck_con.cpp
gframe/deck_con.cpp
+18
-18
gframe/game.cpp
gframe/game.cpp
+17
-18
gframe/game.h
gframe/game.h
+15
-8
No files found.
gframe/deck_con.cpp
View file @
4c5de5d4
...
...
@@ -59,8 +59,8 @@ static bool check_set_code(const CardDataC& data, int set_code) {
return
res
;
}
inline
bool
isH
avePopupWindow
()
{
return
mainGame
->
wQuery
->
isVisible
()
||
mainGame
->
wCategories
->
isVisible
()
||
mainGame
->
wLinkMarks
->
isVisible
()
||
mainGame
->
w
ManageDeck
->
isVisible
();
inline
bool
h
avePopupWindow
()
{
return
mainGame
->
wQuery
->
isVisible
()
||
mainGame
->
wCategories
->
isVisible
()
||
mainGame
->
wLinkMarks
->
isVisible
()
||
mainGame
->
w
DeckManage
->
isVisible
();
}
inline
void
refreshDeckList
()
{
irr
::
gui
::
IGUIListBox
*
lstCategories
=
mainGame
->
lstCategories
;
...
...
@@ -89,7 +89,7 @@ inline void changeCategory(int catesel) {
mainGame
->
deckBuilder
.
prev_category
=
catesel
;
mainGame
->
deckBuilder
.
prev_deck
=
0
;
}
inline
void
show
ManageDeck
()
{
inline
void
show
DeckManage
()
{
mainGame
->
RefreshCategoryDeck
(
mainGame
->
cbDBCategory
,
mainGame
->
cbDBDecks
,
false
);
mainGame
->
cbDBCategory
->
setSelected
(
mainGame
->
deckBuilder
.
prev_category
);
mainGame
->
RefreshDeck
(
mainGame
->
cbDBCategory
,
mainGame
->
cbDBDecks
);
...
...
@@ -108,7 +108,7 @@ inline void showManageDeck() {
lstCategories
->
setSelected
(
mainGame
->
deckBuilder
.
prev_category
);
refreshDeckList
();
mainGame
->
lstDecks
->
setSelected
(
mainGame
->
deckBuilder
.
prev_deck
);
mainGame
->
PopupElement
(
mainGame
->
w
ManageDeck
);
mainGame
->
PopupElement
(
mainGame
->
w
DeckManage
);
}
void
DeckBuilder
::
Initialize
()
{
...
...
@@ -127,7 +127,7 @@ void DeckBuilder::Initialize() {
mainGame
->
btnSideSort
->
setVisible
(
false
);
mainGame
->
btnSideReload
->
setVisible
(
false
);
filterList
=
deckManager
.
_lfList
[
0
].
content
;
mainGame
->
cb
DB
LFList
->
setSelected
(
0
);
mainGame
->
cbLFList
->
setSelected
(
0
);
ClearSearch
();
mouse_pos
.
set
(
0
,
0
);
hovered_code
=
0
;
...
...
@@ -180,14 +180,14 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
if
(((
mainGame
->
wCategories
->
isVisible
()
&&
id
!=
BUTTON_CATEGORY_OK
)
||
(
mainGame
->
wQuery
->
isVisible
()
&&
id
!=
BUTTON_YES
&&
id
!=
BUTTON_NO
)
||
(
mainGame
->
wLinkMarks
->
isVisible
()
&&
id
!=
BUTTON_MARKERS_OK
)
||
(
mainGame
->
w
ManageDeck
->
isVisible
()
&&
!
(
id
>=
WINDOW_MANAGE_DECK
&&
id
<=
LISTBOX_CATEGORY_DECKS
)))
(
mainGame
->
w
DeckManage
->
isVisible
()
&&
!
(
id
>=
WINDOW_DECK_MANAGE
&&
id
<=
COMBOBOX_LFLIST
)))
&&
event
.
GUIEvent
.
EventType
!=
irr
::
gui
::
EGET_COMBO_BOX_CHANGED
)
{
break
;
}
switch
(
event
.
GUIEvent
.
EventType
)
{
case
irr
:
:
gui
::
EGET_ELEMENT_CLOSED
:
{
if
(
id
==
WINDOW_
MANAGE_DECK
)
{
mainGame
->
HideElement
(
mainGame
->
w
ManageDeck
);
if
(
id
==
WINDOW_
DECK_MANAGE
)
{
mainGame
->
HideElement
(
mainGame
->
w
DeckManage
);
return
true
;
break
;
}
...
...
@@ -314,7 +314,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
prev_operation
=
id
;
break
;
}
show
ManageDeck
();
show
DeckManage
();
break
;
}
case
BUTTON_SIDE_OK
:
{
...
...
@@ -385,7 +385,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
prev_deck
=
decksel
;
is_modified
=
false
;
}
else
if
(
prev_operation
==
BUTTON_MANAGE_DECK
)
{
show
ManageDeck
();
show
DeckManage
();
}
prev_operation
=
0
;
break
;
...
...
@@ -460,12 +460,12 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
}
case
irr
:
:
gui
::
EGET_COMBO_BOX_CHANGED
:
{
switch
(
id
)
{
case
COMBOBOX_
DB
LFLIST
:
{
filterList
=
deckManager
.
_lfList
[
mainGame
->
cb
DB
LFList
->
getSelected
()].
content
;
case
COMBOBOX_LFLIST
:
{
filterList
=
deckManager
.
_lfList
[
mainGame
->
cbLFList
->
getSelected
()].
content
;
break
;
}
case
COMBOBOX_DBCATEGORY
:
{
if
(
isH
avePopupWindow
())
{
if
(
h
avePopupWindow
())
{
mainGame
->
cbDBCategory
->
setSelected
(
prev_category
);
break
;
}
...
...
@@ -488,7 +488,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
}
case
COMBOBOX_DBDECKS
:
{
if
(
isH
avePopupWindow
())
{
if
(
h
avePopupWindow
())
{
mainGame
->
cbDBDecks
->
setSelected
(
prev_deck
);
break
;
}
...
...
@@ -639,7 +639,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
changeCategory
(
catesel
);
break
;
}
case
LISTBOX_
CATEGORY_
DECKS
:
{
case
LISTBOX_DECKS
:
{
int
decksel
=
mainGame
->
lstDecks
->
getSelected
();
mainGame
->
cbDBDecks
->
setSelected
(
decksel
);
if
(
decksel
==
-
1
)
...
...
@@ -665,7 +665,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
irr
::
gui
::
IGUIElement
*
root
=
mainGame
->
env
->
getRootGUIElement
();
if
(
root
->
getElementFromPoint
(
mouse_pos
)
!=
root
)
break
;
if
(
isH
avePopupWindow
())
if
(
h
avePopupWindow
())
break
;
if
(
hovered_pos
==
0
||
hovered_seq
==
-
1
)
break
;
...
...
@@ -729,7 +729,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
}
break
;
}
if
(
isH
avePopupWindow
())
if
(
h
avePopupWindow
())
break
;
if
(
!
is_draging
)
{
if
(
hovered_pos
==
0
||
hovered_seq
==
-
1
)
...
...
@@ -769,7 +769,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case
irr
:
:
EMIE_MMOUSE_LEFT_UP
:
{
if
(
mainGame
->
is_siding
)
break
;
if
(
isH
avePopupWindow
())
if
(
h
avePopupWindow
())
break
;
if
(
hovered_pos
==
0
||
hovered_seq
==
-
1
)
break
;
...
...
gframe/game.cpp
View file @
4c5de5d4
...
...
@@ -498,30 +498,31 @@ bool Game::Initialize() {
wDeckEdit
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
309
,
5
,
605
,
130
),
true
,
false
,
0
,
-
1
,
true
);
wDeckEdit
->
setVisible
(
false
);
btnManageDeck
=
env
->
addButton
(
rect
<
s32
>
(
225
,
5
,
290
,
30
),
wDeckEdit
,
BUTTON_MANAGE_DECK
,
L"管理"
);
w
ManageDeck
=
env
->
addWindow
(
rect
<
s32
>
(
310
,
135
,
800
,
465
),
false
,
L"管理卡组"
,
0
,
WINDOW_MANAGE_DECK
);
w
ManageDeck
->
setVisible
(
false
);
lstCategories
=
env
->
addListBox
(
rect
<
s32
>
(
10
,
30
,
170
,
320
),
w
ManageDeck
,
LISTBOX_CATEGORIES
,
true
);
lstDecks
=
env
->
addListBox
(
rect
<
s32
>
(
180
,
30
,
340
,
320
),
w
ManageDeck
,
LISTBOX_CATEGORY
_DECKS
,
true
);
w
DeckManage
=
env
->
addWindow
(
rect
<
s32
>
(
310
,
135
,
800
,
465
),
false
,
L"管理卡组"
,
0
,
WINDOW_DECK_MANAGE
);
w
DeckManage
->
setVisible
(
false
);
lstCategories
=
env
->
addListBox
(
rect
<
s32
>
(
10
,
30
,
170
,
320
),
w
DeckManage
,
LISTBOX_CATEGORIES
,
true
);
lstDecks
=
env
->
addListBox
(
rect
<
s32
>
(
180
,
30
,
340
,
320
),
w
DeckManage
,
LISTBOX
_DECKS
,
true
);
posY
=
30
;
btnNewCategory
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
w
ManageDeck
,
BUTTON_NEW_CATEGORY
,
L"新建分类"
);
btnNewCategory
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
w
DeckManage
,
BUTTON_NEW_CATEGORY
,
L"新建分类"
);
posY
+=
30
;
btnRenameCategory
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
w
ManageDeck
,
BUTTON_RENAME_CATEGORY
,
L"重命名分类"
);
btnRenameCategory
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
w
DeckManage
,
BUTTON_RENAME_CATEGORY
,
L"重命名分类"
);
posY
+=
30
;
btnDeleteCategory
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
w
ManageDeck
,
BUTTON_DELETE_CATEGORY
,
L"删除分类"
);
btnDeleteCategory
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
w
DeckManage
,
BUTTON_DELETE_CATEGORY
,
L"删除分类"
);
posY
+=
30
;
btnNewDeck
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
w
ManageDeck
,
BUTTON_NEW_DECK
,
L"新建卡组"
);
btnNewDeck
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
w
DeckManage
,
BUTTON_NEW_DECK
,
L"新建卡组"
);
posY
+=
30
;
btnRenameDeck
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
w
ManageDeck
,
BUTTON_RENAME_DECK
,
L"重命名卡组"
);
btnRenameDeck
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
w
DeckManage
,
BUTTON_RENAME_DECK
,
L"重命名卡组"
);
posY
+=
30
;
btn
ManageDeleteDeck
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
wManageDeck
,
BUTTON_DELETE_DECK_MANAGE
,
L"删除卡组"
);
btn
DMDeleteDeck
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
wDeckManage
,
BUTTON_DELETE_DECK_DM
,
L"删除卡组"
);
posY
+=
30
;
btnMoveDeck
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
w
ManageDeck
,
BUTTON_MOVE_DECK
,
L"移动到分类"
);
btnMoveDeck
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
w
DeckManage
,
BUTTON_MOVE_DECK
,
L"移动到分类"
);
posY
+=
30
;
btnCopyDeck
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
w
ManageDeck
,
BUTTON_COPY_DECK
,
L"复制到分类"
);
btnCopyDeck
=
env
->
addButton
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
w
DeckManage
,
BUTTON_COPY_DECK
,
L"复制到分类"
);
posY
+=
55
;
//env->addStaticText(dataManager.GetSysString(1300), rect<s32>(350, posY, 440, posY + 25), false, false, wManageDeck);
cbDBLFList
=
env
->
addComboBox
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
wManageDeck
,
COMBOBOX_DBLFLIST
);
cbDBLFList
->
setMaxSelectionRows
(
10
);
cbLFList
=
env
->
addComboBox
(
rect
<
s32
>
(
350
,
posY
,
480
,
posY
+
25
),
wDeckManage
,
COMBOBOX_LFLIST
);
cbLFList
->
setMaxSelectionRows
(
10
);
for
(
unsigned
int
i
=
0
;
i
<
deckManager
.
_lfList
.
size
();
++
i
)
cbLFList
->
addItem
(
deckManager
.
_lfList
[
i
].
listName
);
stDBCategory
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1300
),
rect
<
s32
>
(
10
,
9
,
100
,
29
),
false
,
false
,
wDeckEdit
);
cbDBCategory
=
env
->
addComboBox
(
rect
<
s32
>
(
80
,
5
,
220
,
30
),
wDeckEdit
,
COMBOBOX_DBCATEGORY
);
...
...
@@ -529,8 +530,6 @@ bool Game::Initialize() {
stDeck
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1301
),
rect
<
s32
>
(
10
,
39
,
100
,
59
),
false
,
false
,
wDeckEdit
);
cbDBDecks
=
env
->
addComboBox
(
rect
<
s32
>
(
80
,
35
,
220
,
60
),
wDeckEdit
,
COMBOBOX_DBDECKS
);
cbDBDecks
->
setMaxSelectionRows
(
15
);
for
(
unsigned
int
i
=
0
;
i
<
deckManager
.
_lfList
.
size
();
++
i
)
cbDBLFList
->
addItem
(
deckManager
.
_lfList
[
i
].
listName
);
btnSaveDeck
=
env
->
addButton
(
rect
<
s32
>
(
225
,
35
,
290
,
60
),
wDeckEdit
,
BUTTON_SAVE_DECK
,
dataManager
.
GetSysString
(
1302
));
ebDeckname
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
80
,
65
,
220
,
90
),
true
,
wDeckEdit
,
-
1
);
ebDeckname
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
...
...
@@ -1594,7 +1593,7 @@ void Game::OnResize() {
ebDeckname
->
setRelativePosition
(
Resize
(
80
,
65
,
220
,
90
));
cbDBCategory
->
setRelativePosition
(
Resize
(
80
,
5
,
220
,
30
));
btnManageDeck
->
setRelativePosition
(
Resize
(
225
,
5
,
290
,
30
));
w
ManageDeck
->
setRelativePosition
(
ResizeWin
(
310
,
135
,
800
,
465
));
w
DeckManage
->
setRelativePosition
(
ResizeWin
(
310
,
135
,
800
,
465
));
wSort
->
setRelativePosition
(
Resize
(
930
,
132
,
1020
,
156
));
cbSortType
->
setRelativePosition
(
Resize
(
10
,
2
,
85
,
22
));
...
...
gframe/game.h
View file @
4c5de5d4
...
...
@@ -480,18 +480,23 @@ public:
irr
::
gui
::
IGUIStaticText
*
stSearch
;
irr
::
gui
::
IGUIStaticText
*
stScale
;
//deck manage
irr
::
gui
::
IGUIWindow
*
w
ManageDeck
;
irr
::
gui
::
IGUIWindow
*
w
DeckManage
;
irr
::
gui
::
IGUIListBox
*
lstCategories
;
irr
::
gui
::
IGUIListBox
*
lstDecks
;
irr
::
gui
::
IGUIComboBox
*
cbDBLFList
;
irr
::
gui
::
IGUIButton
*
btnNewCategory
;
irr
::
gui
::
IGUIButton
*
btnRenameCategory
;
irr
::
gui
::
IGUIButton
*
btnDeleteCategory
;
irr
::
gui
::
IGUIButton
*
btnNewDeck
;
irr
::
gui
::
IGUIButton
*
btnRenameDeck
;
irr
::
gui
::
IGUIButton
*
btn
Manage
DeleteDeck
;
irr
::
gui
::
IGUIButton
*
btn
DM
DeleteDeck
;
irr
::
gui
::
IGUIButton
*
btnMoveDeck
;
irr
::
gui
::
IGUIButton
*
btnCopyDeck
;
irr
::
gui
::
IGUIWindow
*
wDMQuery
;
irr
::
gui
::
IGUIEditBox
*
ebDMName
;
irr
::
gui
::
IGUIComboBox
*
cbDMCategory
;
irr
::
gui
::
IGUIButton
*
btnDMYes
;
irr
::
gui
::
IGUIButton
*
btnDMNo
;
irr
::
gui
::
IGUIComboBox
*
cbLFList
;
//filter
irr
::
gui
::
IGUIStaticText
*
wFilter
;
irr
::
gui
::
IGUIScrollBar
*
scrFilter
;
...
...
@@ -702,18 +707,20 @@ extern Game* mainGame;
#define BUTTON_MARKERS_OK 323
#define COMBOBOX_SORTTYPE 324
#define WINDOW_
MANAGE_DECK
330
#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_
MANAGE
336
#define BUTTON_DELETE_DECK_
DM
336
#define BUTTON_MOVE_DECK 337
#define BUTTON_COPY_DECK 338
#define COMBOBOX_DBLFLIST 339
#define LISTBOX_CATEGORIES 340
#define LISTBOX_CATEGORY_DECKS 341
#define LISTBOX_CATEGORIES 339
#define LISTBOX_DECKS 340
#define BUTTON_DM_OK 341
#define BUTTON_DM_CANCEL 342
#define COMBOBOX_LFLIST 349
#define CHECKBOX_AUTO_SEARCH 360
#define CHECKBOX_ENABLE_SOUND 361
...
...
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