Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
85467daa
Commit
85467daa
authored
Aug 01, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对话框添加背景,微调布局
parent
11b0741c
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
92 additions
and
35 deletions
+92
-35
Classes/gframe/client_field.cpp
Classes/gframe/client_field.cpp
+4
-1
Classes/gframe/duelclient.cpp
Classes/gframe/duelclient.cpp
+9
-9
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+2
-2
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+60
-22
Classes/gframe/game.h
Classes/gframe/game.h
+10
-0
Classes/gframe/image_manager.cpp
Classes/gframe/image_manager.cpp
+3
-1
Classes/gframe/image_manager.h
Classes/gframe/image_manager.h
+4
-0
mobile/assets/data/textures/extra/sDialog_L.png
mobile/assets/data/textures/extra/sDialog_L.png
+0
-0
No files found.
Classes/gframe/client_field.cpp
View file @
85467daa
...
...
@@ -638,12 +638,13 @@ 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
+
7
0
*
(
scrollbar
?
5
:
count
)
*
mainGame
->
yScale
;
int
newheight
=
50
+
6
0
*
(
scrollbar
?
5
:
count
)
*
mainGame
->
yScale
;
int
oldheight
=
pos
.
LowerRightCorner
.
Y
-
pos
.
UpperLeftCorner
.
Y
;
pos
.
UpperLeftCorner
.
Y
=
pos
.
UpperLeftCorner
.
Y
+
(
oldheight
-
newheight
)
/
2
;
pos
.
LowerRightCorner
.
X
=
pos
.
UpperLeftCorner
.
X
+
(
scrollbar
?
405
:
390
)
*
mainGame
->
xScale
;
pos
.
LowerRightCorner
.
Y
=
pos
.
UpperLeftCorner
.
Y
+
newheight
;
mainGame
->
wOptions
->
setRelativePosition
(
pos
);
mainGame
->
bgOptions
->
setRelativePosition
(
rect
<
s32
>
(
0
,
0
,
(
scrollbar
?
405
:
390
)
*
mainGame
->
xScale
,
pos
.
LowerRightCorner
.
Y
-
pos
.
UpperLeftCorner
.
Y
));
}
else
{
mainGame
->
SetStaticText
(
mainGame
->
stOptions
,
370
*
mainGame
->
xScale
,
mainGame
->
guiFont
,
(
wchar_t
*
)
dataManager
.
GetDesc
(
select_options
[
0
]));
...
...
@@ -651,11 +652,13 @@ void ClientField::ShowSelectOption(int select_hint) {
mainGame
->
btnOptionp
->
setVisible
(
false
);
mainGame
->
btnOptionn
->
setVisible
(
count
>
1
);
mainGame
->
btnOptionOK
->
setVisible
(
true
);
mainGame
->
scrOption
->
setVisible
(
false
);
for
(
int
i
=
0
;
i
<
5
;
i
++
)
mainGame
->
btnOption
[
i
]
->
setVisible
(
false
);
recti
pos
=
mainGame
->
wOptions
->
getRelativePosition
();
pos
.
LowerRightCorner
.
Y
=
pos
.
UpperLeftCorner
.
Y
+
180
*
mainGame
->
yScale
;
mainGame
->
wOptions
->
setRelativePosition
(
pos
);
mainGame
->
bgOptions
->
setRelativePosition
(
rect
<
s32
>
(
0
,
0
,
390
*
mainGame
->
xScale
,
pos
.
LowerRightCorner
.
Y
-
pos
.
UpperLeftCorner
.
Y
));
}
if
(
select_hint
)
myswprintf
(
textBuffer
,
L"%ls"
,
dataManager
.
GetDesc
(
select_hint
));
...
...
Classes/gframe/duelclient.cpp
View file @
85467daa
...
...
@@ -1795,28 +1795,28 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
if
(
count
==
4
)
startpos
=
10
;
else
if
(
count
==
3
)
startpos
=
82
;
else
startpos
=
155
;
else
startpos
=
50
;
if
(
positions
&
0x1
)
{
mainGame
->
imageLoading
.
insert
(
std
::
make_pair
(
mainGame
->
btnPSAU
,
code
));
mainGame
->
btnPSAU
->
setRelativePosition
(
rect
<
s32
>
(
startpos
*
mainGame
->
xScale
,
45
*
mainGame
->
yScale
,
(
startpos
+
140
)
*
mainGame
->
xScale
,
185
*
mainGame
->
yScale
));
mainGame
->
btnPSAU
->
setRelativePosition
(
rect
<
s32
>
(
startpos
*
mainGame
->
xScale
,
20
*
mainGame
->
yScale
,
(
startpos
+
140
)
*
mainGame
->
xScale
,
160
*
mainGame
->
yScale
));
mainGame
->
btnPSAU
->
setVisible
(
true
);
startpos
+=
1
45
;
startpos
+=
1
50
;
}
else
mainGame
->
btnPSAU
->
setVisible
(
false
);
if
(
positions
&
0x2
)
{
mainGame
->
btnPSAD
->
setRelativePosition
(
rect
<
s32
>
(
startpos
*
mainGame
->
xScale
,
45
*
mainGame
->
yScale
,
(
startpos
+
140
)
*
mainGame
->
xScale
,
185
*
mainGame
->
yScale
));
mainGame
->
btnPSAD
->
setRelativePosition
(
rect
<
s32
>
(
startpos
*
mainGame
->
xScale
,
20
*
mainGame
->
yScale
,
(
startpos
+
140
)
*
mainGame
->
xScale
,
160
*
mainGame
->
yScale
));
mainGame
->
btnPSAD
->
setVisible
(
true
);
startpos
+=
1
45
;
startpos
+=
1
50
;
}
else
mainGame
->
btnPSAD
->
setVisible
(
false
);
if
(
positions
&
0x4
)
{
mainGame
->
imageLoading
.
insert
(
std
::
make_pair
(
mainGame
->
btnPSDU
,
code
));
mainGame
->
btnPSDU
->
setRelativePosition
(
rect
<
s32
>
(
startpos
*
mainGame
->
xScale
,
45
*
mainGame
->
yScale
,
(
startpos
+
140
)
*
mainGame
->
xScale
,
185
*
mainGame
->
yScale
));
mainGame
->
btnPSDU
->
setRelativePosition
(
rect
<
s32
>
(
startpos
*
mainGame
->
xScale
,
20
*
mainGame
->
yScale
,
(
startpos
+
140
)
*
mainGame
->
xScale
,
160
*
mainGame
->
yScale
));
mainGame
->
btnPSDU
->
setVisible
(
true
);
startpos
+=
1
45
;
startpos
+=
1
50
;
}
else
mainGame
->
btnPSDU
->
setVisible
(
false
);
if
(
positions
&
0x8
)
{
mainGame
->
btnPSDD
->
setRelativePosition
(
rect
<
s32
>
(
startpos
*
mainGame
->
xScale
,
45
*
mainGame
->
yScale
,
(
startpos
+
140
)
*
mainGame
->
xScale
,
185
*
mainGame
->
yScale
));
mainGame
->
btnPSDD
->
setRelativePosition
(
rect
<
s32
>
(
startpos
*
mainGame
->
xScale
,
20
*
mainGame
->
yScale
,
(
startpos
+
140
)
*
mainGame
->
xScale
,
160
*
mainGame
->
yScale
));
mainGame
->
btnPSDD
->
setVisible
(
true
);
startpos
+=
1
45
;
startpos
+=
1
50
;
}
else
mainGame
->
btnPSDD
->
setVisible
(
false
);
mainGame
->
gMutex
.
lock
();
mainGame
->
PopupElement
(
mainGame
->
wPosSelect
);
...
...
Classes/gframe/event_handler.cpp
View file @
85467daa
...
...
@@ -353,7 +353,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
btnOptionn
->
setVisible
(
true
);
if
(
selected_option
==
0
)
mainGame
->
btnOptionp
->
setVisible
(
false
);
mainGame
->
SetStaticText
(
mainGame
->
stOptions
,
3
1
0
*
mainGame
->
xScale
,
mainGame
->
textFont
,
dataManager
.
GetDesc
(
select_options
[
selected_option
]));
mainGame
->
SetStaticText
(
mainGame
->
stOptions
,
3
5
0
*
mainGame
->
xScale
,
mainGame
->
textFont
,
dataManager
.
GetDesc
(
select_options
[
selected_option
]));
break
;
}
case
BUTTON_OPTION_NEXT
:
{
...
...
@@ -362,7 +362,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
btnOptionp
->
setVisible
(
true
);
if
(
selected_option
==
select_options
.
size
()
-
1
)
mainGame
->
btnOptionn
->
setVisible
(
false
);
mainGame
->
SetStaticText
(
mainGame
->
stOptions
,
3
1
0
*
mainGame
->
xScale
,
mainGame
->
textFont
,
dataManager
.
GetDesc
(
select_options
[
selected_option
]));
mainGame
->
SetStaticText
(
mainGame
->
stOptions
,
3
5
0
*
mainGame
->
xScale
,
mainGame
->
textFont
,
dataManager
.
GetDesc
(
select_options
[
selected_option
]));
break
;
}
case
BUTTON_OPTION_0
:
...
...
Classes/gframe/game.cpp
View file @
85467daa
This diff is collapsed.
Click to expand it.
Classes/gframe/game.h
View file @
85467daa
...
...
@@ -169,6 +169,7 @@ public:
void
CloseGameButtons
();
void
CloseGameWindow
();
void
CloseDuelWindow
();
void
AddIGUIImageBUtton
(
irr
::
gui
::
IGUIButton
*
button
);
int
LocalPlayer
(
int
player
);
const
wchar_t
*
LocalName
(
int
local_player
);
...
...
@@ -399,10 +400,12 @@ public:
irr
::
gui
::
CGUIImageButton
*
btnHand
[
3
];
//
irr
::
gui
::
IGUIWindow
*
wFTSelect
;
irr
::
gui
::
IGUIImage
*
bgFTSelect
;
irr
::
gui
::
IGUIButton
*
btnFirst
;
irr
::
gui
::
IGUIButton
*
btnSecond
;
//message
irr
::
gui
::
IGUIWindow
*
wMessage
;
irr
::
gui
::
IGUIImage
*
bgMessage
;
irr
::
gui
::
IGUIStaticText
*
stMessage
;
irr
::
gui
::
IGUIButton
*
btnMsgOK
;
//auto close message
...
...
@@ -410,16 +413,19 @@ public:
irr
::
gui
::
IGUIStaticText
*
stACMessage
;
//yes/no
irr
::
gui
::
IGUIWindow
*
wQuery
;
irr
::
gui
::
IGUIImage
*
bgQuery
;
irr
::
gui
::
IGUIStaticText
*
stQMessage
;
irr
::
gui
::
IGUIButton
*
btnYes
;
irr
::
gui
::
IGUIButton
*
btnNo
;
//surrender yes/no
irr
::
gui
::
IGUIWindow
*
wSurrender
;
irr
::
gui
::
IGUIImage
*
bgSurrender
;
irr
::
gui
::
IGUIStaticText
*
stSurrenderMessage
;
irr
::
gui
::
IGUIButton
*
btnSurrenderYes
;
irr
::
gui
::
IGUIButton
*
btnSurrenderNo
;
//options
irr
::
gui
::
IGUIWindow
*
wOptions
;
irr
::
gui
::
IGUIImage
*
bgOptions
;
irr
::
gui
::
IGUIStaticText
*
stOptions
;
irr
::
gui
::
IGUIButton
*
btnOptionp
;
irr
::
gui
::
IGUIButton
*
btnOptionn
;
...
...
@@ -428,18 +434,21 @@ public:
irr
::
gui
::
IGUIScrollBar
*
scrOption
;
//pos selection
irr
::
gui
::
IGUIWindow
*
wPosSelect
;
irr
::
gui
::
IGUIImage
*
bgPosSelect
;
irr
::
gui
::
CGUIImageButton
*
btnPSAU
;
irr
::
gui
::
CGUIImageButton
*
btnPSAD
;
irr
::
gui
::
CGUIImageButton
*
btnPSDU
;
irr
::
gui
::
CGUIImageButton
*
btnPSDD
;
//card selection
irr
::
gui
::
IGUIWindow
*
wCardSelect
;
irr
::
gui
::
IGUIImage
*
bgCardSelect
;
irr
::
gui
::
CGUIImageButton
*
btnCardSelect
[
5
];
irr
::
gui
::
IGUIStaticText
*
stCardPos
[
5
];
irr
::
gui
::
IGUIScrollBar
*
scrCardList
;
irr
::
gui
::
IGUIButton
*
btnSelectOK
;
//card display
irr
::
gui
::
IGUIWindow
*
wCardDisplay
;
irr
::
gui
::
IGUIImage
*
bgCardDisplay
;
irr
::
gui
::
CGUIImageButton
*
btnCardDisplay
[
5
];
irr
::
gui
::
IGUIStaticText
*
stDisplayPos
[
5
];
irr
::
gui
::
IGUIScrollBar
*
scrDisplayList
;
...
...
@@ -561,6 +570,7 @@ public:
irr
::
gui
::
IGUIComboBox
*
cbSortType
;
//replay save
irr
::
gui
::
IGUIWindow
*
wReplaySave
;
irr
::
gui
::
IGUIImage
*
bgReplaySave
;
irr
::
gui
::
IGUIEditBox
*
ebRSName
;
irr
::
gui
::
IGUIButton
*
btnRSYes
;
irr
::
gui
::
IGUIButton
*
btnRSNo
;
...
...
Classes/gframe/image_manager.cpp
View file @
85467daa
...
...
@@ -43,6 +43,8 @@ bool ImageManager::Initial(const path dir) {
tShut
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/tshut.png"
)).
c_str
());
tTitleBar
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/stitlebar.png"
)).
c_str
());
tWindow
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/sWindow.png"
)).
c_str
());
tDialog_S
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/sDialog_S.png"
)).
c_str
());
tDialog_L
=
driver
->
getTexture
((
dir
+
path
(
"/textures/extra/sDialog_L.png"
)).
c_str
());
if
(
!
tBackGround_menu
)
tBackGround_menu
=
tBackGround
;
tBackGround_deck
=
driver
->
getTexture
((
dir
+
path
(
"/textures/bg_deck.jpg"
)).
c_str
());
...
...
Classes/gframe/image_manager.h
View file @
85467daa
...
...
@@ -65,6 +65,10 @@ public:
irr
::
video
::
ITexture
*
tShut
;
irr
::
video
::
ITexture
*
tTitleBar
;
irr
::
video
::
ITexture
*
tWindow
;
irr
::
video
::
ITexture
*
tDialog_L
;
irr
::
video
::
ITexture
*
tDialog_S
;
irr
::
video
::
ITexture
*
tButton_L
;
irr
::
video
::
ITexture
*
tButton_S
;
std
::
list
<
std
::
string
>
support_types
;
};
...
...
mobile/assets/data/textures/extra/sDialog_L.png
0 → 100644
View file @
85467daa
22.4 KB
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