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
YGOPRO-520DIY
ygopro
Commits
b4fb656f
Commit
b4fb656f
authored
May 07, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix & revert guifont
parent
bf8648af
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
gframe/drawing.cpp
gframe/drawing.cpp
+4
-4
gframe/event_handler.cpp
gframe/event_handler.cpp
+2
-2
gframe/game.cpp
gframe/game.cpp
+5
-5
No files found.
gframe/drawing.cpp
View file @
b4fb656f
...
@@ -898,7 +898,7 @@ void Game::DrawSpec() {
...
@@ -898,7 +898,7 @@ void Game::DrawSpec() {
DrawShadowText
(
lpcFont
,
lstr
,
ResizeElem
(
650
-
pos
.
Width
/
2
,
290
,
950
,
370
),
Resize
(
-
1
,
-
1
,
0
,
0
),
0xffffffff
);
DrawShadowText
(
lpcFont
,
lstr
,
ResizeElem
(
650
-
pos
.
Width
/
2
,
290
,
950
,
370
),
Resize
(
-
1
,
-
1
,
0
,
0
),
0xffffffff
);
if
(
dInfo
.
vic_string
&&
(
showcardcode
==
1
||
showcardcode
==
2
))
{
if
(
dInfo
.
vic_string
&&
(
showcardcode
==
1
||
showcardcode
==
2
))
{
driver
->
draw2DRectangle
(
0xa0000000
,
ResizeElem
(
540
,
320
,
800
,
340
));
driver
->
draw2DRectangle
(
0xa0000000
,
ResizeElem
(
540
,
320
,
800
,
340
));
DrawShadowText
(
text
Font
,
dInfo
.
vic_string
,
ResizeElem
(
500
,
320
,
840
,
340
),
Resize
(
-
2
,
-
1
,
0
,
0
),
0xffffffff
,
0xff000000
,
true
,
true
,
0
);
DrawShadowText
(
gui
Font
,
dInfo
.
vic_string
,
ResizeElem
(
500
,
320
,
840
,
340
),
Resize
(
-
2
,
-
1
,
0
,
0
),
0xffffffff
,
0xff000000
,
true
,
true
,
0
);
}
}
}
else
if
(
showcardp
<
showcarddif
+
10
)
{
}
else
if
(
showcardp
<
showcarddif
+
10
)
{
int
alpha
=
((
showcarddif
+
10
-
showcardp
)
*
25
)
<<
24
;
int
alpha
=
((
showcarddif
+
10
-
showcardp
)
*
25
)
<<
24
;
...
@@ -937,7 +937,7 @@ void Game::DrawSpec() {
...
@@ -937,7 +937,7 @@ void Game::DrawSpec() {
continue
;
continue
;
if
(
!
showChat
&&
i
>
2
)
if
(
!
showChat
&&
i
>
2
)
continue
;
continue
;
int
w
=
text
Font
->
getDimension
(
chatMsg
[
i
].
c_str
()).
Width
;
int
w
=
gui
Font
->
getDimension
(
chatMsg
[
i
].
c_str
()).
Width
;
recti
rectloc
(
mainGame
->
wChat
->
getRelativePosition
().
UpperLeftCorner
.
X
,
mainGame
->
window_size
.
Height
-
45
,
mainGame
->
wChat
->
getRelativePosition
().
UpperLeftCorner
.
X
+
2
+
w
,
mainGame
->
window_size
.
Height
-
25
);
recti
rectloc
(
mainGame
->
wChat
->
getRelativePosition
().
UpperLeftCorner
.
X
,
mainGame
->
window_size
.
Height
-
45
,
mainGame
->
wChat
->
getRelativePosition
().
UpperLeftCorner
.
X
+
2
+
w
,
mainGame
->
window_size
.
Height
-
25
);
rectloc
-=
position2di
(
0
,
i
*
20
);
rectloc
-=
position2di
(
0
,
i
*
20
);
...
@@ -946,8 +946,8 @@ void Game::DrawSpec() {
...
@@ -946,8 +946,8 @@ void Game::DrawSpec() {
recti
shadowloc
=
msgloc
+
position2di
(
1
,
1
);
recti
shadowloc
=
msgloc
+
position2di
(
1
,
1
);
driver
->
draw2DRectangle
(
rectloc
,
0xa0000000
,
0xa0000000
,
0xa0000000
,
0xa0000000
);
driver
->
draw2DRectangle
(
rectloc
,
0xa0000000
,
0xa0000000
,
0xa0000000
,
0xa0000000
);
text
Font
->
draw
(
chatMsg
[
i
].
c_str
(),
msgloc
,
0xff000000
,
false
,
false
);
gui
Font
->
draw
(
chatMsg
[
i
].
c_str
(),
msgloc
,
0xff000000
,
false
,
false
);
text
Font
->
draw
(
chatMsg
[
i
].
c_str
(),
shadowloc
,
chatColor
[
chatType
[
i
]],
false
,
false
);
gui
Font
->
draw
(
chatMsg
[
i
].
c_str
(),
shadowloc
,
chatColor
[
chatType
[
i
]],
false
,
false
);
}
}
}
}
}
}
...
...
gframe/event_handler.cpp
View file @
b4fb656f
...
@@ -1436,7 +1436,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1436,7 +1436,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
should_show_tip
=
true
;
should_show_tip
=
true
;
myswprintf
(
formatBuffer
,
dataManager
.
GetSysString
(
1700
),
mainGame
->
btnCancelOrFinish
->
getText
());
myswprintf
(
formatBuffer
,
dataManager
.
GetSysString
(
1700
),
mainGame
->
btnCancelOrFinish
->
getText
());
mainGame
->
stTip
->
setText
(
formatBuffer
);
mainGame
->
stTip
->
setText
(
formatBuffer
);
irr
::
core
::
dimension2d
<
unsigned
int
>
dtip
=
mainGame
->
text
Font
->
getDimension
(
formatBuffer
)
+
irr
::
core
::
dimension2d
<
unsigned
int
>
(
10
,
10
);
irr
::
core
::
dimension2d
<
unsigned
int
>
dtip
=
mainGame
->
gui
Font
->
getDimension
(
formatBuffer
)
+
irr
::
core
::
dimension2d
<
unsigned
int
>
(
10
,
10
);
mainGame
->
stTip
->
setRelativePosition
(
mainGame
->
Resize
(
x
-
10
-
dtip
.
Width
,
y
-
10
-
dtip
.
Height
,
x
-
10
,
y
-
10
));
mainGame
->
stTip
->
setRelativePosition
(
mainGame
->
Resize
(
x
-
10
-
dtip
.
Width
,
y
-
10
-
dtip
.
Height
,
x
-
10
,
y
-
10
));
}
}
mainGame
->
stTip
->
setVisible
(
should_show_tip
);
mainGame
->
stTip
->
setVisible
(
should_show_tip
);
...
@@ -1560,7 +1560,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1560,7 +1560,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
str
.
append
(
formatBuffer
);
str
.
append
(
formatBuffer
);
}
}
should_show_tip
=
true
;
should_show_tip
=
true
;
irr
::
core
::
dimension2d
<
unsigned
int
>
dtip
=
mainGame
->
text
Font
->
getDimension
(
str
.
c_str
())
+
irr
::
core
::
dimension2d
<
unsigned
int
>
(
10
,
10
);
irr
::
core
::
dimension2d
<
unsigned
int
>
dtip
=
mainGame
->
gui
Font
->
getDimension
(
str
.
c_str
())
+
irr
::
core
::
dimension2d
<
unsigned
int
>
(
10
,
10
);
mainGame
->
stTip
->
setRelativePosition
(
recti
(
mousepos
.
X
-
10
-
dtip
.
Width
,
mousepos
.
Y
-
10
-
dtip
.
Height
,
mousepos
.
X
-
10
,
mousepos
.
Y
-
10
));
mainGame
->
stTip
->
setRelativePosition
(
recti
(
mousepos
.
X
-
10
-
dtip
.
Width
,
mousepos
.
Y
-
10
-
dtip
.
Height
,
mousepos
.
X
-
10
,
mousepos
.
Y
-
10
));
mainGame
->
stTip
->
setText
(
str
.
c_str
());
mainGame
->
stTip
->
setText
(
str
.
c_str
());
}
}
...
...
gframe/game.cpp
View file @
b4fb656f
...
@@ -1308,7 +1308,7 @@ void Game::ShowCardInfo(int code, bool resize) {
...
@@ -1308,7 +1308,7 @@ void Game::ShowCardInfo(int code, bool resize) {
showingcode
=
code
;
showingcode
=
code
;
showingtext
=
dataManager
.
GetText
(
code
);
showingtext
=
dataManager
.
GetText
(
code
);
const
auto
&
tsize
=
stText
->
getRelativePosition
();
const
auto
&
tsize
=
stText
->
getRelativePosition
();
InitStaticText
(
stText
,
tsize
.
getWidth
(),
tsize
.
getHeight
(),
text
Font
,
showingtext
);
InitStaticText
(
stText
,
tsize
.
getWidth
(),
tsize
.
getHeight
(),
gui
Font
,
showingtext
);
}
}
void
Game
::
AddChatMsg
(
wchar_t
*
msg
,
int
player
)
{
void
Game
::
AddChatMsg
(
wchar_t
*
msg
,
int
player
)
{
for
(
int
i
=
7
;
i
>
0
;
--
i
)
{
for
(
int
i
=
7
;
i
>
0
;
--
i
)
{
...
@@ -1501,18 +1501,18 @@ void Game::OnResize() {
...
@@ -1501,18 +1501,18 @@ 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_guiFont = guiFont;
irr
::
gui
::
CGUITTFont
*
old_textFont
=
textFont
;
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
);
//
guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize * yScale);
env
->
getSkin
()
->
setFont
(
guiFont
);
//
env->getSkin()->setFont(guiFont);
textFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
gameConf
.
textfontsize
*
yScale
);
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
();
old_guiFont
->
drop
();
//
old_guiFont->drop();
old_textFont
->
drop
();
old_textFont
->
drop
();
wMainMenu
->
setRelativePosition
(
ResizeWin
(
370
,
200
,
650
,
415
));
wMainMenu
->
setRelativePosition
(
ResizeWin
(
370
,
200
,
650
,
415
));
...
...
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