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
fa1112b9
Commit
fa1112b9
authored
May 07, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resize more font (need more adjust)
parent
b4c7a328
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
20 deletions
+27
-20
gframe/game.cpp
gframe/game.cpp
+27
-20
No files found.
gframe/game.cpp
View file @
fa1112b9
...
@@ -74,7 +74,7 @@ bool Game::Initialize() {
...
@@ -74,7 +74,7 @@ bool Game::Initialize() {
adFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
12
);
adFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
12
);
lpcFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
48
);
lpcFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
48
);
guiFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
gameConf
.
textfontsize
);
guiFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
gameConf
.
textfontsize
);
textFont
=
guiFont
;
textFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
gameConf
.
textfontsize
)
;
smgr
=
device
->
getSceneManager
();
smgr
=
device
->
getSceneManager
();
device
->
setWindowCaption
(
L"YGOPro"
);
device
->
setWindowCaption
(
L"YGOPro"
);
device
->
setResizable
(
true
);
device
->
setResizable
(
true
);
...
@@ -1253,7 +1253,7 @@ void Game::ShowCardInfo(int code, bool resize) {
...
@@ -1253,7 +1253,7 @@ void Game::ShowCardInfo(int code, bool resize) {
sc
=
aptr
->
second
.
setcode
;
sc
=
aptr
->
second
.
setcode
;
}
}
if
(
sc
)
{
if
(
sc
)
{
offset
=
23
;
offset
=
23
*
yScale
;
myswprintf
(
formatBuffer
,
L"%ls%ls"
,
dataManager
.
GetSysString
(
1329
),
dataManager
.
FormatSetName
(
sc
));
myswprintf
(
formatBuffer
,
L"%ls%ls"
,
dataManager
.
GetSysString
(
1329
),
dataManager
.
FormatSetName
(
sc
));
stSetName
->
setText
(
formatBuffer
);
stSetName
->
setText
(
formatBuffer
);
}
else
}
else
...
@@ -1294,15 +1294,15 @@ void Game::ShowCardInfo(int code, bool resize) {
...
@@ -1294,15 +1294,15 @@ void Game::ShowCardInfo(int code, bool resize) {
wcscat
(
formatBuffer
,
scaleBuffer
);
wcscat
(
formatBuffer
,
scaleBuffer
);
}
}
stDataInfo
->
setText
(
formatBuffer
);
stDataInfo
->
setText
(
formatBuffer
);
stSetName
->
setRelativePosition
(
rect
<
s32
>
(
15
,
83
,
296
*
xScale
,
106
));
stSetName
->
setRelativePosition
(
rect
<
s32
>
(
15
,
83
*
yScale
,
296
*
xScale
,
83
*
yScale
+
offset
));
stText
->
setRelativePosition
(
rect
<
s32
>
(
15
,
83
+
offset
,
287
*
xScale
,
324
*
yScale
));
stText
->
setRelativePosition
(
rect
<
s32
>
(
15
,
83
*
yScale
+
offset
,
287
*
xScale
,
324
*
yScale
));
scrCardText
->
setRelativePosition
(
rect
<
s32
>
(
287
*
xScale
-
20
,
83
+
offset
,
287
*
xScale
,
324
*
yScale
));
scrCardText
->
setRelativePosition
(
rect
<
s32
>
(
287
*
xScale
-
20
,
83
+
offset
,
287
*
xScale
,
324
*
yScale
));
}
else
{
}
else
{
myswprintf
(
formatBuffer
,
L"[%ls]"
,
dataManager
.
FormatType
(
cd
.
type
));
myswprintf
(
formatBuffer
,
L"[%ls]"
,
dataManager
.
FormatType
(
cd
.
type
));
stInfo
->
setText
(
formatBuffer
);
stInfo
->
setText
(
formatBuffer
);
stDataInfo
->
setText
(
L""
);
stDataInfo
->
setText
(
L""
);
stSetName
->
setRelativePosition
(
rect
<
s32
>
(
15
,
60
,
296
*
xScale
,
83
));
stSetName
->
setRelativePosition
(
rect
<
s32
>
(
15
,
60
*
yScale
,
296
*
xScale
,
60
*
yScale
+
offset
));
stText
->
setRelativePosition
(
rect
<
s32
>
(
15
,
60
+
offset
,
287
*
xScale
,
324
*
yScale
));
stText
->
setRelativePosition
(
rect
<
s32
>
(
15
,
60
*
yScale
+
offset
,
287
*
xScale
,
324
*
yScale
));
scrCardText
->
setRelativePosition
(
rect
<
s32
>
(
287
*
xScale
-
20
,
60
+
offset
,
287
*
xScale
,
324
*
yScale
));
scrCardText
->
setRelativePosition
(
rect
<
s32
>
(
287
*
xScale
-
20
,
60
+
offset
,
287
*
xScale
,
324
*
yScale
));
}
}
showingcode
=
code
;
showingcode
=
code
;
...
@@ -1501,14 +1501,19 @@ void Game::OnResize() {
...
@@ -1501,14 +1501,19 @@ void Game::OnResize() {
irr
::
gui
::
CGUITTFont
*
old_numFont
=
numFont
;
irr
::
gui
::
CGUITTFont
*
old_numFont
=
numFont
;
irr
::
gui
::
CGUITTFont
*
old_adFont
=
adFont
;
irr
::
gui
::
CGUITTFont
*
old_adFont
=
adFont
;
irr
::
gui
::
CGUITTFont
*
old_lpcFont
=
lpcFont
;
irr
::
gui
::
CGUITTFont
*
old_lpcFont
=
lpcFont
;
irr
::
gui
::
CGUITTFont
*
old_guiFont
=
guiFont
;
irr
::
gui
::
CGUITTFont
*
old_textFont
=
textFont
;
numFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
(
yScale
>
0.5
?
16
*
yScale
:
8
));
numFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
(
yScale
>
0.5
?
16
*
yScale
:
8
));
adFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
(
yScale
>
0.75
?
12
*
yScale
:
9
));
adFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
(
yScale
>
0.75
?
12
*
yScale
:
9
));
lpcFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
48
*
yScale
);
lpcFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
48
*
yScale
);
guiFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
gameConf
.
textfontsize
*
yScale
);
env
->
getSkin
()
->
setFont
(
guiFont
);
textFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
gameConf
.
textfontsize
*
yScale
);
old_numFont
->
drop
();
old_numFont
->
drop
();
old_adFont
->
drop
();
old_adFont
->
drop
();
old_lpcFont
->
drop
();
old_lpcFont
->
drop
();
//guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize * yScale
);
old_guiFont
->
drop
(
);
//env->getSkin()->setFont(guiFont
);
old_textFont
->
drop
(
);
wMainMenu
->
setRelativePosition
(
ResizeWin
(
370
,
200
,
650
,
415
));
wMainMenu
->
setRelativePosition
(
ResizeWin
(
370
,
200
,
650
,
415
));
wDeckEdit
->
setRelativePosition
(
Resize
(
309
,
5
,
605
,
130
));
wDeckEdit
->
setRelativePosition
(
Resize
(
309
,
5
,
605
,
130
));
...
@@ -1543,17 +1548,17 @@ void Game::OnResize() {
...
@@ -1543,17 +1548,17 @@ void Game::OnResize() {
wCategories
->
setRelativePosition
(
ResizeWin
(
450
,
60
,
1000
,
270
));
wCategories
->
setRelativePosition
(
ResizeWin
(
450
,
60
,
1000
,
270
));
wLinkMarks
->
setRelativePosition
(
ResizeWin
(
700
,
30
,
820
,
150
));
wLinkMarks
->
setRelativePosition
(
ResizeWin
(
700
,
30
,
820
,
150
));
stBanlist
->
setRelativePosition
(
Resize
Win
(
10
,
9
,
100
,
29
));
stBanlist
->
setRelativePosition
(
Resize
(
10
,
9
,
100
,
29
));
stDeck
->
setRelativePosition
(
Resize
Win
(
10
,
39
,
100
,
59
));
stDeck
->
setRelativePosition
(
Resize
(
10
,
39
,
100
,
59
));
stCategory
->
setRelativePosition
(
Resize
Win
(
10
,
2
+
25
/
6
,
70
,
22
+
25
/
6
));
stCategory
->
setRelativePosition
(
Resize
(
10
,
2
+
25
/
6
,
70
,
22
+
25
/
6
));
stLimit
->
setRelativePosition
(
Resize
Win
(
205
,
2
+
25
/
6
,
280
,
22
+
25
/
6
));
stLimit
->
setRelativePosition
(
Resize
(
205
,
2
+
25
/
6
,
280
,
22
+
25
/
6
));
stAttribute
->
setRelativePosition
(
Resize
Win
(
10
,
22
+
50
/
6
,
70
,
42
+
50
/
6
));
stAttribute
->
setRelativePosition
(
Resize
(
10
,
22
+
50
/
6
,
70
,
42
+
50
/
6
));
stRace
->
setRelativePosition
(
Resize
Win
(
10
,
42
+
75
/
6
,
70
,
62
+
75
/
6
));
stRace
->
setRelativePosition
(
Resize
(
10
,
42
+
75
/
6
,
70
,
62
+
75
/
6
));
stAttack
->
setRelativePosition
(
Resize
Win
(
205
,
22
+
50
/
6
,
280
,
42
+
50
/
6
));
stAttack
->
setRelativePosition
(
Resize
(
205
,
22
+
50
/
6
,
280
,
42
+
50
/
6
));
stDefense
->
setRelativePosition
(
Resize
Win
(
205
,
42
+
75
/
6
,
280
,
62
+
75
/
6
));
stDefense
->
setRelativePosition
(
Resize
(
205
,
42
+
75
/
6
,
280
,
62
+
75
/
6
));
stStar
->
setRelativePosition
(
Resize
Win
(
10
,
62
+
100
/
6
,
70
,
82
+
100
/
6
));
stStar
->
setRelativePosition
(
Resize
(
10
,
62
+
100
/
6
,
70
,
82
+
100
/
6
));
stSearch
->
setRelativePosition
(
Resize
Win
(
205
,
62
+
100
/
6
,
280
,
82
+
100
/
6
));
stSearch
->
setRelativePosition
(
Resize
(
205
,
62
+
100
/
6
,
280
,
82
+
100
/
6
));
stScale
->
setRelativePosition
(
Resize
Win
(
100
,
62
+
100
/
6
,
160
,
82
+
100
/
6
));
stScale
->
setRelativePosition
(
Resize
(
100
,
62
+
100
/
6
,
160
,
82
+
100
/
6
));
btnSideOK
->
setRelativePosition
(
Resize
(
510
,
40
,
820
,
80
));
btnSideOK
->
setRelativePosition
(
Resize
(
510
,
40
,
820
,
80
));
btnSideShuffle
->
setRelativePosition
(
Resize
(
310
,
100
,
370
,
130
));
btnSideShuffle
->
setRelativePosition
(
Resize
(
310
,
100
,
370
,
130
));
btnSideSort
->
setRelativePosition
(
Resize
(
375
,
100
,
435
,
130
));
btnSideSort
->
setRelativePosition
(
Resize
(
375
,
100
,
435
,
130
));
...
@@ -1605,7 +1610,9 @@ void Game::OnResize() {
...
@@ -1605,7 +1610,9 @@ void Game::OnResize() {
wCardImg
->
setRelativePosition
(
ResizeCard
(
1
,
1
,
20
,
18
));
wCardImg
->
setRelativePosition
(
ResizeCard
(
1
,
1
,
20
,
18
));
imgCard
->
setRelativePosition
(
ResizeCard
(
10
,
9
,
0
,
0
));
imgCard
->
setRelativePosition
(
ResizeCard
(
10
,
9
,
0
,
0
));
wInfos
->
setRelativePosition
(
Resize
(
1
,
275
,
301
,
639
));
wInfos
->
setRelativePosition
(
Resize
(
1
,
275
,
301
,
639
));
stName
->
setRelativePosition
(
recti
(
10
,
10
,
287
*
xScale
,
32
));
stName
->
setRelativePosition
(
recti
(
10
,
10
,
300
*
xScale
-
13
,
10
+
22
*
yScale
));
stInfo
->
setRelativePosition
(
recti
(
15
,
37
*
yScale
,
300
*
xScale
-
13
,
60
*
yScale
));
stDataInfo
->
setRelativePosition
(
recti
(
15
,
60
*
yScale
,
300
*
xScale
-
13
,
83
*
yScale
));
lstLog
->
setRelativePosition
(
Resize
(
10
,
10
,
290
,
290
));
lstLog
->
setRelativePosition
(
Resize
(
10
,
10
,
290
,
290
));
//const auto& tsize = stText->getRelativePosition();
//const auto& tsize = stText->getRelativePosition();
if
(
showingcode
)
if
(
showingcode
)
...
...
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