Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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-Cn-Ko-En
Commits
b000c488
Commit
b000c488
authored
Jun 30, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加按钮文字,调整布局
parent
8b5c689a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
20 deletions
+26
-20
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+20
-20
Classes/gframe/game.h
Classes/gframe/game.h
+6
-0
No files found.
Classes/gframe/game.cpp
View file @
b000c488
...
...
@@ -207,7 +207,7 @@ bool Game::Initialize() {
adFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
driver
,
dataManager
.
FileSystem
,
gameConf
.
numfont
,
(
int
)
12
*
yScale
,
isAntialias
,
false
);
lpcFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
driver
,
dataManager
.
FileSystem
,
gameConf
.
numfont
,
(
int
)
48
*
yScale
,
isAntialias
,
true
);
guiFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
driver
,
dataManager
.
FileSystem
,
gameConf
.
textfont
,
(
int
)
gameConf
.
textfontsize
*
yScale
,
isAntialias
,
true
);
titleFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
driver
,
dataManager
.
FileSystem
,
gameConf
.
textfont
,
(
int
)
3
0
*
yScale
,
isAntialias
,
true
);
titleFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
driver
,
dataManager
.
FileSystem
,
gameConf
.
textfont
,
(
int
)
3
2
*
yScale
,
isAntialias
,
true
);
textFont
=
guiFont
;
if
(
!
numFont
||
!
textFont
)
{
os
::
Printer
::
log
(
"add font fail "
);
...
...
@@ -226,43 +226,43 @@ bool Game::Initialize() {
wMainMenu
=
env
->
addWindow
(
rect
<
s32
>
(
450
*
xScale
,
40
*
yScale
,
900
*
xScale
,
600
*
yScale
),
false
,
strbuf
);
wMainMenu
->
getCloseButton
()
->
setVisible
(
false
);
wMainMenu
->
setDrawBackground
(
false
);
btnLanMode
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
15
*
xScale
,
30
*
yScale
,
4
15
*
xScale
,
106
*
yScale
),
wMainMenu
,
BUTTON_LAN_MODE
);
btnLanMode
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
15
*
xScale
,
30
*
yScale
,
4
00
*
xScale
,
106
*
yScale
),
wMainMenu
,
BUTTON_LAN_MODE
);
btnLanMode
->
setImageSize
(
core
::
dimension2di
(
400
*
yScale
,
76
*
yScale
));
btnLanMode
->
setDrawBorder
(
false
);
btnLanMode
->
setImage
(
imageManager
.
tTitleBar
);
btnLanMode
->
setText
(
dataManager
.
GetSysString
(
1200
)
);
btnLanMode
->
setOverrideFont
(
titleFont
);
env
->
addStaticText
(
strbuf
,
rect
<
s32
>
(
72
*
xScale
,
2
*
yScale
,
300
*
xScale
,
35
*
yScale
),
false
,
false
,
btnLanMode
);
btnSingleMode
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
15
*
xScale
,
110
*
yScale
,
4
15
*
xScale
,
186
*
yScale
),
wMainMenu
,
BUTTON_SINGLE_MODE
);
env
->
addStaticText
(
strbuf
,
rect
<
s32
>
(
62
*
xScale
,
2
*
yScale
,
280
*
xScale
,
35
*
yScale
),
false
,
false
,
btnLanMode
);
textLanMode
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1200
),
rect
<
s32
>
(
115
*
xScale
,
25
*
yScale
,
300
*
xScale
,
65
*
yScale
),
false
,
false
,
btnLanMode
);
textLanMode
->
setOverrideFont
(
titleFont
);
btnSingleMode
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
15
*
xScale
,
110
*
yScale
,
4
00
*
xScale
,
186
*
yScale
),
wMainMenu
,
BUTTON_SINGLE_MODE
);
btnSingleMode
->
setImageSize
(
core
::
dimension2di
(
400
*
yScale
,
76
*
yScale
));
btnSingleMode
->
setDrawBorder
(
false
);
btnSingleMode
->
setImage
(
imageManager
.
tTitleBar
);
btnSingleMode
->
setText
(
dataManager
.
GetSysString
(
1201
)
);
btn
SingleMode
->
setOverrideFont
(
titleFont
);
btnReplayMode
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
15
*
xScale
,
190
*
yScale
,
4
15
*
xScale
,
266
*
yScale
),
wMainMenu
,
BUTTON_REPLAY_MODE
);
textSingleMode
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1201
),
rect
<
s32
>
(
115
*
xScale
,
25
*
yScale
,
300
*
xScale
,
65
*
yScale
),
false
,
false
,
btnSingleMode
);
text
SingleMode
->
setOverrideFont
(
titleFont
);
btnReplayMode
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
15
*
xScale
,
190
*
yScale
,
4
00
*
xScale
,
266
*
yScale
),
wMainMenu
,
BUTTON_REPLAY_MODE
);
btnReplayMode
->
setImageSize
(
core
::
dimension2di
(
400
*
yScale
,
76
*
yScale
));
btnReplayMode
->
setDrawBorder
(
false
);
btnReplayMode
->
setImage
(
imageManager
.
tTitleBar
);
btnReplayMode
->
setText
(
dataManager
.
GetSysString
(
1202
)
);
btn
ReplayMode
->
setOverrideFont
(
titleFont
);
btnDeckEdit
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
15
*
xScale
,
270
*
yScale
,
4
15
*
xScale
,
346
*
yScale
),
wMainMenu
,
BUTTON_DECK_EDIT
);
textReplayMode
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1202
),
rect
<
s32
>
(
115
*
xScale
,
25
*
yScale
,
300
*
xScale
,
65
*
yScale
),
false
,
false
,
btnReplayMode
);
text
ReplayMode
->
setOverrideFont
(
titleFont
);
btnDeckEdit
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
15
*
xScale
,
270
*
yScale
,
4
00
*
xScale
,
346
*
yScale
),
wMainMenu
,
BUTTON_DECK_EDIT
);
btnDeckEdit
->
setImageSize
(
core
::
dimension2di
(
400
*
yScale
,
76
*
yScale
));
btnDeckEdit
->
setDrawBorder
(
false
);
btnDeckEdit
->
setImage
(
imageManager
.
tTitleBar
);
btnDeckEdit
->
setText
(
dataManager
.
GetSysString
(
1204
)
);
btn
DeckEdit
->
setOverrideFont
(
titleFont
);
btnSettings
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
15
*
xScale
,
350
*
yScale
,
4
15
*
xScale
,
426
*
yScale
),
wMainMenu
,
BUTTON_SETTINGS
);
textDeckEdit
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1204
),
rect
<
s32
>
(
115
*
xScale
,
25
*
yScale
,
300
*
xScale
,
65
*
yScale
),
false
,
false
,
btnDeckEdit
);
text
DeckEdit
->
setOverrideFont
(
titleFont
);
btnSettings
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
15
*
xScale
,
350
*
yScale
,
4
00
*
xScale
,
426
*
yScale
),
wMainMenu
,
BUTTON_SETTINGS
);
btnSettings
->
setImageSize
(
core
::
dimension2di
(
400
*
yScale
,
76
*
yScale
));
btnSettings
->
setDrawBorder
(
false
);
btnSettings
->
setImage
(
imageManager
.
tTitleBar
);
btnSettings
->
setText
(
dataManager
.
GetSysString
(
1273
)
);
btn
Settings
->
setOverrideFont
(
titleFont
);
btnModeExit
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
15
*
xScale
,
430
*
yScale
,
4
15
*
xScale
,
506
*
yScale
),
wMainMenu
,
BUTTON_MODE_EXIT
);
textSettings
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1273
),
rect
<
s32
>
(
115
*
xScale
,
25
*
yScale
,
300
*
xScale
,
65
*
yScale
),
false
,
false
,
btnSettings
);
text
Settings
->
setOverrideFont
(
titleFont
);
btnModeExit
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
(
15
*
xScale
,
430
*
yScale
,
4
00
*
xScale
,
506
*
yScale
),
wMainMenu
,
BUTTON_MODE_EXIT
);
btnModeExit
->
setImageSize
(
core
::
dimension2di
(
400
*
yScale
,
76
*
yScale
));
btnModeExit
->
setDrawBorder
(
false
);
btnModeExit
->
setImage
(
imageManager
.
tTitleBar
);
btnModeExit
->
setText
(
dataManager
.
GetSysString
(
1210
)
);
btn
ModeExit
->
setOverrideFont
(
titleFont
);
textModeExit
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1210
),
rect
<
s32
>
(
145
*
xScale
,
25
*
yScale
,
300
*
xScale
,
65
*
yScale
),
false
,
false
,
btnModeExit
);
text
ModeExit
->
setOverrideFont
(
titleFont
);
//lan mode
wLanWindow
=
env
->
addWindow
(
rect
<
s32
>
(
200
*
xScale
,
80
*
yScale
,
820
*
xScale
,
590
*
yScale
),
false
,
dataManager
.
GetSysString
(
1200
));
wLanWindow
->
getCloseButton
()
->
setVisible
(
false
);
...
...
Classes/gframe/game.h
View file @
b000c488
...
...
@@ -311,12 +311,18 @@ public:
//main menu
irr
::
gui
::
IGUIWindow
*
wMainMenu
;
irr
::
gui
::
CGUIImageButton
*
btnLanMode
;
irr
::
gui
::
IGUIStaticText
*
textLanMode
;
irr
::
gui
::
CGUIImageButton
*
btnSingleMode
;
irr
::
gui
::
IGUIStaticText
*
textSingleMode
;
irr
::
gui
::
CGUIImageButton
*
btnReplayMode
;
irr
::
gui
::
IGUIStaticText
*
textReplayMode
;
irr
::
gui
::
IGUIButton
*
btnTestMode
;
irr
::
gui
::
CGUIImageButton
*
btnDeckEdit
;
irr
::
gui
::
IGUIStaticText
*
textDeckEdit
;
irr
::
gui
::
CGUIImageButton
*
btnSettings
;
irr
::
gui
::
IGUIStaticText
*
textSettings
;
irr
::
gui
::
CGUIImageButton
*
btnModeExit
;
irr
::
gui
::
IGUIStaticText
*
textModeExit
;
//lan
irr
::
gui
::
IGUIWindow
*
wLanWindow
;
irr
::
gui
::
IGUIEditBox
*
ebNickName
;
...
...
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