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
REIKAI
ygopro
Commits
36f884fe
Commit
36f884fe
authored
Dec 14, 2019
by
mercury233
Committed by
GitHub
Dec 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update announce number (#2242)
parent
e7bac45b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
6 deletions
+81
-6
gframe/drawing.cpp
gframe/drawing.cpp
+1
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+32
-0
gframe/event_handler.cpp
gframe/event_handler.cpp
+25
-0
gframe/game.cpp
gframe/game.cpp
+7
-2
gframe/game.h
gframe/game.h
+16
-3
No files found.
gframe/drawing.cpp
View file @
36f884fe
...
@@ -959,7 +959,7 @@ void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) {
...
@@ -959,7 +959,7 @@ void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) {
FadingUnit
fu
;
FadingUnit
fu
;
fu
.
fadingSize
=
win
->
getRelativePosition
();
fu
.
fadingSize
=
win
->
getRelativePosition
();
for
(
auto
fit
=
fadingList
.
begin
();
fit
!=
fadingList
.
end
();
++
fit
)
for
(
auto
fit
=
fadingList
.
begin
();
fit
!=
fadingList
.
end
();
++
fit
)
if
(
win
==
fit
->
guiFading
&&
win
!=
wOptions
)
// the size of wOptions is always setted by ClientField::ShowSelectOption before showing it
if
(
win
==
fit
->
guiFading
&&
win
!=
wOptions
&&
win
!=
wANNumber
)
// the size of wOptions is always setted by ClientField::ShowSelectOption before showing it
fu
.
fadingSize
=
fit
->
fadingSize
;
fu
.
fadingSize
=
fit
->
fadingSize
;
irr
::
core
::
position2di
center
=
fu
.
fadingSize
.
getCenter
();
irr
::
core
::
position2di
center
=
fu
.
fadingSize
.
getCenter
();
fu
.
fadingDiff
.
X
=
fu
.
fadingSize
.
getWidth
()
/
10
;
fu
.
fadingDiff
.
X
=
fu
.
fadingSize
.
getWidth
()
/
10
;
...
...
gframe/duelclient.cpp
View file @
36f884fe
...
@@ -3494,12 +3494,44 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3494,12 +3494,44 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
gMutex
.
lock
();
mainGame
->
gMutex
.
lock
();
mainGame
->
cbANNumber
->
clear
();
mainGame
->
cbANNumber
->
clear
();
bool
quickmode
=
count
<=
12
;
if
(
quickmode
)
{
for
(
int
i
=
0
;
i
<
12
;
++
i
)
{
mainGame
->
btnANNumber
[
i
]
->
setEnabled
(
false
);
mainGame
->
btnANNumber
[
i
]
->
setPressed
(
false
);
mainGame
->
btnANNumber
[
i
]
->
setVisible
(
true
);
}
}
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
int
value
=
BufferIO
::
ReadInt32
(
pbuf
);
int
value
=
BufferIO
::
ReadInt32
(
pbuf
);
myswprintf
(
textBuffer
,
L" % d"
,
value
);
myswprintf
(
textBuffer
,
L" % d"
,
value
);
mainGame
->
cbANNumber
->
addItem
(
textBuffer
,
value
);
mainGame
->
cbANNumber
->
addItem
(
textBuffer
,
value
);
if
(
quickmode
)
{
if
((
value
>
12
||
value
<=
0
))
{
quickmode
=
false
;
}
else
{
mainGame
->
btnANNumber
[
value
-
1
]
->
setEnabled
(
true
);
}
}
}
}
mainGame
->
cbANNumber
->
setSelected
(
0
);
mainGame
->
cbANNumber
->
setSelected
(
0
);
if
(
quickmode
)
{
mainGame
->
cbANNumber
->
setVisible
(
false
);
mainGame
->
btnANNumberOK
->
setRelativePosition
(
rect
<
s32
>
(
20
,
195
,
210
,
230
));
mainGame
->
btnANNumberOK
->
setEnabled
(
false
);
recti
pos
=
mainGame
->
wANNumber
->
getRelativePosition
();
pos
.
LowerRightCorner
.
Y
=
pos
.
UpperLeftCorner
.
Y
+
250
;
mainGame
->
wANNumber
->
setRelativePosition
(
pos
);
}
else
{
for
(
int
i
=
0
;
i
<
12
;
++
i
)
{
mainGame
->
btnANNumber
[
i
]
->
setVisible
(
false
);
}
mainGame
->
cbANNumber
->
setVisible
(
true
);
mainGame
->
btnANNumberOK
->
setRelativePosition
(
rect
<
s32
>
(
80
,
60
,
150
,
85
));
recti
pos
=
mainGame
->
wANNumber
->
getRelativePosition
();
pos
.
LowerRightCorner
.
Y
=
pos
.
UpperLeftCorner
.
Y
+
95
;
mainGame
->
wANNumber
->
setRelativePosition
(
pos
);
}
if
(
select_hint
)
if
(
select_hint
)
myswprintf
(
textBuffer
,
L"%ls"
,
dataManager
.
GetDesc
(
select_hint
));
myswprintf
(
textBuffer
,
L"%ls"
,
dataManager
.
GetDesc
(
select_hint
));
else
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
565
));
else
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
565
));
...
...
gframe/event_handler.cpp
View file @
36f884fe
...
@@ -320,6 +320,31 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -320,6 +320,31 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
SetResponseSelectedOption
();
SetResponseSelectedOption
();
break
;
break
;
}
}
case
BUTTON_ANNUMBER_1
:
case
BUTTON_ANNUMBER_2
:
case
BUTTON_ANNUMBER_3
:
case
BUTTON_ANNUMBER_4
:
case
BUTTON_ANNUMBER_5
:
case
BUTTON_ANNUMBER_6
:
case
BUTTON_ANNUMBER_7
:
case
BUTTON_ANNUMBER_8
:
case
BUTTON_ANNUMBER_9
:
case
BUTTON_ANNUMBER_10
:
case
BUTTON_ANNUMBER_11
:
case
BUTTON_ANNUMBER_12
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
for
(
int
i
=
0
;
i
<
mainGame
->
cbANNumber
->
getItemCount
();
++
i
)
{
if
(
id
-
BUTTON_ANNUMBER_1
+
1
==
mainGame
->
cbANNumber
->
getItemData
(
i
))
{
mainGame
->
cbANNumber
->
setSelected
(
i
);
break
;
}
}
for
(
int
i
=
0
;
i
<
12
;
++
i
)
{
mainGame
->
btnANNumber
[
i
]
->
setPressed
(
event
.
GUIEvent
.
Caller
==
mainGame
->
btnANNumber
[
i
]);
}
mainGame
->
btnANNumberOK
->
setEnabled
(
true
);
break
;
}
case
BUTTON_ANNUMBER_OK
:
{
case
BUTTON_ANNUMBER_OK
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
DuelClient
::
SetResponseI
(
mainGame
->
cbANNumber
->
getSelected
());
DuelClient
::
SetResponseI
(
mainGame
->
cbANNumber
->
getSelected
());
...
...
gframe/game.cpp
View file @
36f884fe
...
@@ -452,11 +452,16 @@ bool Game::Initialize() {
...
@@ -452,11 +452,16 @@ bool Game::Initialize() {
scrDisplayList
=
env
->
addScrollBar
(
true
,
rect
<
s32
>
(
30
,
235
,
650
,
255
),
wCardDisplay
,
SCROLL_CARD_DISPLAY
);
scrDisplayList
=
env
->
addScrollBar
(
true
,
rect
<
s32
>
(
30
,
235
,
650
,
255
),
wCardDisplay
,
SCROLL_CARD_DISPLAY
);
btnDisplayOK
=
env
->
addButton
(
rect
<
s32
>
(
300
,
265
,
380
,
290
),
wCardDisplay
,
BUTTON_CARD_DISP_OK
,
dataManager
.
GetSysString
(
1211
));
btnDisplayOK
=
env
->
addButton
(
rect
<
s32
>
(
300
,
265
,
380
,
290
),
wCardDisplay
,
BUTTON_CARD_DISP_OK
,
dataManager
.
GetSysString
(
1211
));
//announce number
//announce number
wANNumber
=
env
->
addWindow
(
rect
<
s32
>
(
550
,
200
,
780
,
295
),
false
,
L""
);
wANNumber
=
env
->
addWindow
(
rect
<
s32
>
(
550
,
180
,
780
,
430
),
false
,
L""
);
wANNumber
->
getCloseButton
()
->
setVisible
(
false
);
wANNumber
->
getCloseButton
()
->
setVisible
(
false
);
wANNumber
->
setVisible
(
false
);
wANNumber
->
setVisible
(
false
);
cbANNumber
=
env
->
addComboBox
(
rect
<
s32
>
(
40
,
30
,
190
,
50
),
wANNumber
,
-
1
);
cbANNumber
=
env
->
addComboBox
(
rect
<
s32
>
(
40
,
30
,
190
,
50
),
wANNumber
,
-
1
);
cbANNumber
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
cbANNumber
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
for
(
int
i
=
0
;
i
<
12
;
++
i
)
{
myswprintf
(
strbuf
,
L"%d"
,
i
+
1
);
btnANNumber
[
i
]
=
env
->
addButton
(
rect
<
s32
>
(
20
+
50
*
(
i
%
4
),
40
+
50
*
(
i
/
4
),
60
+
50
*
(
i
%
4
),
80
+
50
*
(
i
/
4
)),
wANNumber
,
BUTTON_ANNUMBER_1
+
i
,
strbuf
);
btnANNumber
[
i
]
->
setIsPushButton
(
true
);
}
btnANNumberOK
=
env
->
addButton
(
rect
<
s32
>
(
80
,
60
,
150
,
85
),
wANNumber
,
BUTTON_ANNUMBER_OK
,
dataManager
.
GetSysString
(
1211
));
btnANNumberOK
=
env
->
addButton
(
rect
<
s32
>
(
80
,
60
,
150
,
85
),
wANNumber
,
BUTTON_ANNUMBER_OK
,
dataManager
.
GetSysString
(
1211
));
//announce card
//announce card
wANCard
=
env
->
addWindow
(
rect
<
s32
>
(
510
,
120
,
820
,
420
),
false
,
L""
);
wANCard
=
env
->
addWindow
(
rect
<
s32
>
(
510
,
120
,
820
,
420
),
false
,
L""
);
...
@@ -1600,7 +1605,7 @@ void Game::OnResize() {
...
@@ -1600,7 +1605,7 @@ void Game::OnResize() {
wOptions
->
setRelativePosition
(
ResizeWin
(
490
,
200
,
840
,
340
));
wOptions
->
setRelativePosition
(
ResizeWin
(
490
,
200
,
840
,
340
));
wPosSelect
->
setRelativePosition
(
ResizeWin
(
340
,
200
,
935
,
410
));
wPosSelect
->
setRelativePosition
(
ResizeWin
(
340
,
200
,
935
,
410
));
wCardSelect
->
setRelativePosition
(
ResizeWin
(
320
,
100
,
1000
,
400
));
wCardSelect
->
setRelativePosition
(
ResizeWin
(
320
,
100
,
1000
,
400
));
wANNumber
->
setRelativePosition
(
ResizeWin
(
550
,
200
,
780
,
295
));
wANNumber
->
setRelativePosition
(
ResizeWin
(
550
,
180
,
780
,
430
));
wANCard
->
setRelativePosition
(
ResizeWin
(
510
,
120
,
820
,
420
));
wANCard
->
setRelativePosition
(
ResizeWin
(
510
,
120
,
820
,
420
));
wANAttribute
->
setRelativePosition
(
ResizeWin
(
500
,
200
,
830
,
285
));
wANAttribute
->
setRelativePosition
(
ResizeWin
(
500
,
200
,
830
,
285
));
wANRace
->
setRelativePosition
(
ResizeWin
(
480
,
200
,
850
,
410
));
wANRace
->
setRelativePosition
(
ResizeWin
(
480
,
200
,
850
,
410
));
...
...
gframe/game.h
View file @
36f884fe
...
@@ -415,6 +415,7 @@ public:
...
@@ -415,6 +415,7 @@ public:
//announce number
//announce number
irr
::
gui
::
IGUIWindow
*
wANNumber
;
irr
::
gui
::
IGUIWindow
*
wANNumber
;
irr
::
gui
::
IGUIComboBox
*
cbANNumber
;
irr
::
gui
::
IGUIComboBox
*
cbANNumber
;
irr
::
gui
::
IGUIButton
*
btnANNumber
[
12
];
irr
::
gui
::
IGUIButton
*
btnANNumberOK
;
irr
::
gui
::
IGUIButton
*
btnANNumberOK
;
//announce card
//announce card
irr
::
gui
::
IGUIWindow
*
wANCard
;
irr
::
gui
::
IGUIWindow
*
wANCard
;
...
@@ -650,9 +651,18 @@ extern Game* mainGame;
...
@@ -650,9 +651,18 @@ extern Game* mainGame;
#define BUTTON_CHAIN_WHENAVAIL 266
#define BUTTON_CHAIN_WHENAVAIL 266
#define BUTTON_CANCEL_OR_FINISH 267
#define BUTTON_CANCEL_OR_FINISH 267
#define BUTTON_PHASE 268
#define BUTTON_PHASE 268
#define BUTTON_CLEAR_LOG 270
#define BUTTON_ANNUMBER_1 270
#define LISTBOX_LOG 271
#define BUTTON_ANNUMBER_2 271
#define SCROLL_CARDTEXT 280
#define BUTTON_ANNUMBER_3 272
#define BUTTON_ANNUMBER_4 273
#define BUTTON_ANNUMBER_5 274
#define BUTTON_ANNUMBER_6 275
#define BUTTON_ANNUMBER_7 276
#define BUTTON_ANNUMBER_8 277
#define BUTTON_ANNUMBER_9 278
#define BUTTON_ANNUMBER_10 279
#define BUTTON_ANNUMBER_11 280
#define BUTTON_ANNUMBER_12 281
#define BUTTON_DISPLAY_0 290
#define BUTTON_DISPLAY_0 290
#define BUTTON_DISPLAY_1 291
#define BUTTON_DISPLAY_1 291
#define BUTTON_DISPLAY_2 292
#define BUTTON_DISPLAY_2 292
...
@@ -687,6 +697,9 @@ extern Game* mainGame;
...
@@ -687,6 +697,9 @@ extern Game* mainGame;
#define BUTTON_MARKS_FILTER 322
#define BUTTON_MARKS_FILTER 322
#define BUTTON_MARKERS_OK 323
#define BUTTON_MARKERS_OK 323
#define COMBOBOX_SORTTYPE 324
#define COMBOBOX_SORTTYPE 324
#define BUTTON_CLEAR_LOG 350
#define LISTBOX_LOG 351
#define SCROLL_CARDTEXT 352
#define CHECKBOX_AUTO_SEARCH 360
#define CHECKBOX_AUTO_SEARCH 360
#define CHECKBOX_ENABLE_SOUND 361
#define CHECKBOX_ENABLE_SOUND 361
#define CHECKBOX_ENABLE_MUSIC 362
#define CHECKBOX_ENABLE_MUSIC 362
...
...
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