Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
0c348be8
Commit
0c348be8
authored
Apr 15, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into server
parents
ac8a4e16
1278a580
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
41 deletions
+51
-41
gframe/client_field.cpp
gframe/client_field.cpp
+12
-6
gframe/deck_con.cpp
gframe/deck_con.cpp
+14
-5
gframe/event_handler.cpp
gframe/event_handler.cpp
+14
-25
gframe/game.cpp
gframe/game.cpp
+6
-2
gframe/game.h
gframe/game.h
+2
-0
script
script
+1
-1
strings.conf
strings.conf
+2
-2
No files found.
gframe/client_field.cpp
View file @
0c348be8
...
...
@@ -605,18 +605,23 @@ void ClientField::ShowSelectOption(int select_hint) {
selected_option
=
0
;
wchar_t
textBuffer
[
256
];
int
count
=
select_options
.
size
();
bool
quickmode
=
(
count
<=
5
)
;
bool
quickmode
=
true
;
mainGame
->
gMutex
.
Lock
();
for
(
int
i
=
0
;
(
i
<
count
)
&&
quickmode
;
i
++
)
{
const
wchar_t
*
option
=
dataManager
.
GetDesc
(
select_options
[
i
]);
irr
::
core
::
dimension2d
<
unsigned
int
>
dtxt
=
mainGame
->
guiFont
->
getDimension
(
option
);
if
(
dtxt
.
Width
>
310
)
{
for
(
auto
option
:
select_options
)
{
if
(
mainGame
->
guiFont
->
getDimension
(
dataManager
.
GetDesc
(
option
)).
Width
>
310
)
{
quickmode
=
false
;
break
;
}
}
for
(
int
i
=
0
;
(
i
<
count
)
&&
(
i
<
5
)
&&
quickmode
;
i
++
)
{
const
wchar_t
*
option
=
dataManager
.
GetDesc
(
select_options
[
i
]);
mainGame
->
btnOption
[
i
]
->
setText
(
option
);
}
if
(
quickmode
)
{
bool
scrollbar
=
count
>
5
;
mainGame
->
scrOption
->
setVisible
(
scrollbar
);
mainGame
->
scrOption
->
setPos
(
0
);
mainGame
->
scrOption
->
setMax
(
scrollbar
?
(
count
-
5
)
:
1
);
mainGame
->
stOptions
->
setVisible
(
false
);
mainGame
->
btnOptionp
->
setVisible
(
false
);
mainGame
->
btnOptionn
->
setVisible
(
false
);
...
...
@@ -624,9 +629,10 @@ void ClientField::ShowSelectOption(int select_hint) {
for
(
int
i
=
0
;
i
<
5
;
i
++
)
mainGame
->
btnOption
[
i
]
->
setVisible
(
i
<
count
);
recti
pos
=
mainGame
->
wOptions
->
getRelativePosition
();
int
newheight
=
30
+
40
*
count
;
int
newheight
=
30
+
40
*
(
scrollbar
?
5
:
count
)
;
int
oldheight
=
pos
.
LowerRightCorner
.
Y
-
pos
.
UpperLeftCorner
.
Y
;
pos
.
UpperLeftCorner
.
Y
=
pos
.
UpperLeftCorner
.
Y
+
(
oldheight
-
newheight
)
/
2
;
pos
.
LowerRightCorner
.
X
=
pos
.
UpperLeftCorner
.
X
+
(
scrollbar
?
375
:
350
);
pos
.
LowerRightCorner
.
Y
=
pos
.
UpperLeftCorner
.
Y
+
newheight
;
mainGame
->
wOptions
->
setRelativePosition
(
pos
);
}
else
{
...
...
gframe/deck_con.cpp
View file @
0c348be8
...
...
@@ -225,11 +225,14 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
mainGame
->
gMutex
.
Lock
();
mainGame
->
wDeckCode
->
setText
(
dataManager
.
GetSysString
(
1387
));
wchar_t
deck_code
[
2048
];
char
deck_code_utf8
[
1024
];
deckManager
.
SaveDeckToCode
(
deckManager
.
current_deck
,
deck_code_utf8
);
BufferIO
::
DecodeUTF8
(
deck_code_utf8
,
deck_code
);
mainGame
->
ebDeckCode
->
setText
(
deck_code
);
if
(
deckManager
.
current_deck
.
main
.
size
()
>
0
||
deckManager
.
current_deck
.
extra
.
size
()
>
0
||
deckManager
.
current_deck
.
side
.
size
()
>
0
)
{
wchar_t
deck_code
[
2048
];
char
deck_code_utf8
[
1024
];
deckManager
.
SaveDeckToCode
(
deckManager
.
current_deck
,
deck_code_utf8
);
BufferIO
::
DecodeUTF8
(
deck_code_utf8
,
deck_code
);
mainGame
->
ebDeckCode
->
setText
(
deck_code
);
}
else
mainGame
->
ebDeckCode
->
setText
(
L""
);
mainGame
->
PopupElement
(
mainGame
->
wDeckCode
);
mainGame
->
gMutex
.
Unlock
();
prev_operation
=
id
;
...
...
@@ -412,6 +415,12 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
}
case
irr
:
:
gui
::
EGET_SCROLL_BAR_CHANGED
:
{
switch
(
id
)
{
case
SCROLL_FILTER
:
{
GetHoveredCard
();
break
;
}
}
break
;
}
case
irr
:
:
gui
::
EGET_EDITBOX_ENTER
:
{
...
...
gframe/event_handler.cpp
View file @
0c348be8
...
...
@@ -302,33 +302,14 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
SetStaticText
(
mainGame
->
stOptions
,
310
,
mainGame
->
guiFont
,
dataManager
.
GetDesc
(
select_options
[
selected_option
]));
break
;
}
case
BUTTON_OPTION_0
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
selected_option
=
0
;
SetResponseSelectedOption
();
break
;
}
case
BUTTON_OPTION_1
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
selected_option
=
1
;
SetResponseSelectedOption
();
break
;
}
case
BUTTON_OPTION_2
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
selected_option
=
2
;
SetResponseSelectedOption
();
break
;
}
case
BUTTON_OPTION_3
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
selected_option
=
3
;
SetResponseSelectedOption
();
break
;
}
case
BUTTON_OPTION_0
:
case
BUTTON_OPTION_1
:
case
BUTTON_OPTION_2
:
case
BUTTON_OPTION_3
:
case
BUTTON_OPTION_4
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
selected_option
=
4
;
int
step
=
mainGame
->
scrOption
->
isVisible
()
?
mainGame
->
scrOption
->
getPos
()
:
0
;
selected_option
=
id
-
BUTTON_OPTION_0
+
step
;
SetResponseSelectedOption
();
break
;
}
...
...
@@ -857,6 +838,14 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
case
irr
:
:
gui
::
EGET_SCROLL_BAR_CHANGED
:
{
switch
(
id
)
{
case
SCROLL_OPTION_SELECT
:
{
int
step
=
mainGame
->
scrOption
->
isVisible
()
?
mainGame
->
scrOption
->
getPos
()
:
0
;
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
const
wchar_t
*
option
=
dataManager
.
GetDesc
(
select_options
[
i
+
step
]);
mainGame
->
btnOption
[
i
]
->
setText
(
option
);
}
break
;
}
case
SCROLL_CARD_SELECT
:
{
int
pos
=
mainGame
->
scrCardList
->
getPos
()
/
10
;
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
...
...
gframe/game.cpp
View file @
0c348be8
...
...
@@ -475,6 +475,10 @@ bool Game::Initialize() {
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
btnOption
[
i
]
=
env
->
addButton
(
rect
<
s32
>
(
10
,
30
+
40
*
i
,
340
,
60
+
40
*
i
),
wOptions
,
BUTTON_OPTION_0
+
i
,
L""
);
}
scrOption
=
env
->
addScrollBar
(
false
,
rect
<
s32
>
(
350
,
30
,
365
,
220
),
wOptions
,
SCROLL_OPTION_SELECT
);
scrOption
->
setLargeStep
(
1
);
scrOption
->
setSmallStep
(
1
);
scrOption
->
setMin
(
0
);
//pos select
wPosSelect
=
env
->
addWindow
(
rect
<
s32
>
(
340
,
200
,
935
,
410
),
false
,
dataManager
.
GetSysString
(
561
));
wPosSelect
->
getCloseButton
()
->
setVisible
(
false
);
...
...
@@ -594,7 +598,7 @@ bool Game::Initialize() {
btnSideReload
=
env
->
addButton
(
rect
<
s32
>
(
440
,
100
,
500
,
130
),
0
,
BUTTON_SIDE_RELOAD
,
dataManager
.
GetSysString
(
1309
));
btnSideReload
->
setVisible
(
false
);
btnRenameDeck
=
env
->
addButton
(
rect
<
s32
>
(
170
,
99
,
220
,
120
),
wDeckEdit
,
BUTTON_RENAME_DECK
,
dataManager
.
GetSysString
(
1362
));
btnDeckCode
=
env
->
addButton
(
rect
<
s32
>
(
225
,
5
,
290
,
3
0
),
wDeckEdit
,
BUTTON_DECK_CODE
,
dataManager
.
GetSysString
(
1387
));
btnDeckCode
=
env
->
addButton
(
rect
<
s32
>
(
5
,
65
,
75
,
9
0
),
wDeckEdit
,
BUTTON_DECK_CODE
,
dataManager
.
GetSysString
(
1387
));
//
scrFilter
=
env
->
addScrollBar
(
false
,
recti
(
999
,
161
,
1019
,
629
),
0
,
SCROLL_FILTER
);
scrFilter
->
setLargeStep
(
10
);
...
...
@@ -1975,7 +1979,7 @@ void Game::OnResize() {
btnSideReload
->
setRelativePosition
(
Resize
(
440
,
100
,
500
,
130
));
btnDeleteDeck
->
setRelativePosition
(
Resize
(
225
,
95
,
290
,
120
));
btnRenameDeck
->
setRelativePosition
(
Resize
(
170
,
99
,
220
,
120
));
btnDeckCode
->
setRelativePosition
(
Resize
(
225
,
5
,
290
,
3
0
));
btnDeckCode
->
setRelativePosition
(
Resize
(
5
,
65
,
75
,
9
0
));
wLanWindow
->
setRelativePosition
(
ResizeWin
(
220
,
100
,
800
,
520
));
wCreateHost
->
setRelativePosition
(
ResizeWin
(
320
,
100
,
700
,
520
));
...
...
gframe/game.h
View file @
0c348be8
...
...
@@ -438,6 +438,7 @@ public:
irr
::
gui
::
IGUIButton
*
btnOptionn
;
irr
::
gui
::
IGUIButton
*
btnOptionOK
;
irr
::
gui
::
IGUIButton
*
btnOption
[
5
];
irr
::
gui
::
IGUIScrollBar
*
scrOption
;
//pos selection
irr
::
gui
::
IGUIWindow
*
wPosSelect
;
irr
::
gui
::
CGUIImageButton
*
btnPSAU
;
...
...
@@ -665,6 +666,7 @@ extern HostInfo game_info;
#define BUTTON_OPTION_2 225
#define BUTTON_OPTION_3 226
#define BUTTON_OPTION_4 227
#define SCROLL_OPTION_SELECT 228
#define BUTTON_CARD_0 230
#define BUTTON_CARD_1 231
#define BUTTON_CARD_2 232
...
...
script
@
6e605714
Subproject commit
3b2030eeaff8558f81a8c635451b5be95ccacb3
3
Subproject commit
6e6057147932c871ec1b9d3fb94e1b6278f0fb8
3
strings.conf
View file @
0c348be8
...
...
@@ -423,7 +423,7 @@
!
system
1385
列表为空,可能未安装合适的人机
!
system
1386
使用正则表达式搜索卡片
!
system
1387
卡组代码
!
system
1388
卡组代码(
Ctrl
+
A
全选,
Ctrl
+
C
复制,
Ctrl
+
V
粘贴)
!
system
1388
Ctrl
+
A
全选,
Ctrl
+
C
复制,
Ctrl
+
V
粘贴
!
system
1389
卡组代码无效。
!
system
1390
等待行动中...
!
system
1391
等待行动中....
...
...
@@ -740,7 +740,7 @@
!
setname
0
x73
超量 エクシーズ
!
setname
0
x1073
混沌超量
CX
(カオスエクシーズ)
!
setname
0
x2073
超量龙 エクシーズ・ドラゴン
!
setname
0
x74
水精鱗
!
setname
0
x74
水精
鳞 水精
鱗
!
setname
0
x75
深渊 アビス
!
setname
0
x76
纹章兽 紋章獣
!
setname
0
x77
海皇
...
...
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