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
c9de4842
Commit
c9de4842
authored
Mar 21, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add DrawShadowText (part)
parent
3fd3da87
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
gframe/drawing.cpp
gframe/drawing.cpp
+18
-7
gframe/game.h
gframe/game.h
+1
-0
No files found.
gframe/drawing.cpp
View file @
c9de4842
...
...
@@ -375,6 +375,13 @@ void Game::DrawCard(ClientCard* pcard) {
driver
->
drawVertexPrimitiveList
(
matManager
.
vSymbol
,
4
,
matManager
.
iRectangle
,
2
);
}
}
void
Game
::
DrawShadowText
(
CGUITTFont
*
font
,
const
core
::
stringw
&
text
,
const
core
::
rect
<
s32
>&
position
,
const
core
::
rect
<
s32
>&
padding
,
video
::
SColor
color
,
video
::
SColor
shadowcolor
,
bool
hcenter
,
bool
vcenter
,
const
core
::
rect
<
s32
>*
clip
)
{
core
::
rect
<
s32
>
shadowposition
=
recti
(
position
.
UpperLeftCorner
.
X
-
padding
.
UpperLeftCorner
.
X
,
position
.
UpperLeftCorner
.
Y
-
padding
.
UpperLeftCorner
.
Y
,
position
.
LowerRightCorner
.
X
-
padding
.
LowerRightCorner
.
X
,
position
.
LowerRightCorner
.
Y
-
padding
.
LowerRightCorner
.
Y
);
font
->
draw
(
text
,
shadowposition
,
shadowcolor
,
hcenter
,
vcenter
,
clip
);
font
->
draw
(
text
,
position
,
color
,
hcenter
,
vcenter
,
clip
);
}
void
Game
::
DrawMisc
()
{
static
irr
::
core
::
vector3df
act_rot
(
0
,
0
,
0
);
int
rule
=
(
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
...
...
@@ -487,10 +494,12 @@ void Game::DrawMisc() {
driver
->
draw2DRectangle
(
Resize
(
795
-
dInfo
.
time_left
[
1
]
*
100
/
dInfo
.
time_limit
,
34
,
795
,
44
),
0xa0e0e0e0
,
0xa0e0e0e0
,
0xa0c0c0c0
,
0xa0c0c0c0
);
driver
->
draw2DRectangleOutline
(
Resize
(
695
,
34
,
795
,
44
),
0xffffffff
);
}
numFont
->
draw
(
dInfo
.
strLP
[
0
],
Resize
(
330
,
11
,
629
,
30
),
0xff000000
,
true
,
false
,
0
);
numFont
->
draw
(
dInfo
.
strLP
[
0
],
Resize
(
330
,
12
,
631
,
30
),
0xffffff00
,
true
,
false
,
0
);
numFont
->
draw
(
dInfo
.
strLP
[
1
],
Resize
(
691
,
11
,
990
,
30
),
0xff000000
,
true
,
false
,
0
);
numFont
->
draw
(
dInfo
.
strLP
[
1
],
Resize
(
691
,
12
,
992
,
30
),
0xffffff00
,
true
,
false
,
0
);
//numFont->draw(dInfo.strLP[0], Resize(330, 11, 629, 30), 0xff000000, true, false, 0);
//numFont->draw(dInfo.strLP[0], Resize(330, 12, 631, 30), 0xffffff00, true, false, 0);
//numFont->draw(dInfo.strLP[1], Resize(691, 11, 990, 30), 0xff000000, true, false, 0);
//numFont->draw(dInfo.strLP[1], Resize(691, 12, 992, 30), 0xffffff00, true, false, 0);
DrawShadowText
(
numFont
,
dInfo
.
strLP
[
0
],
Resize
(
330
,
12
,
631
,
30
),
Resize
(
0
,
1
,
2
,
0
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
dInfo
.
strLP
[
1
],
Resize
(
691
,
12
,
992
,
30
),
Resize
(
0
,
1
,
2
,
0
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
recti
p1size
=
Resize
(
335
,
31
,
629
,
50
);
recti
p2size
=
Resize
(
986
,
31
,
986
,
50
);
...
...
@@ -642,9 +651,11 @@ void Game::DrawStatus(ClientCard* pcard, int x1, int y1, int x2, int y2) {
adFont
->
draw
(
L"/"
,
Resize
(
x1
-
4
,
y1
,
x1
+
4
,
y1
+
20
),
0xff000000
,
true
,
false
,
0
);
adFont
->
draw
(
L"/"
,
Resize
(
x1
-
3
,
y1
+
1
,
x1
+
5
,
y1
+
21
),
0xffffffff
,
true
,
false
,
0
);
int
w
=
adFont
->
getDimension
(
pcard
->
atkstring
).
Width
;
adFont
->
draw
(
pcard
->
atkstring
,
recti
((
x1
-
5
)
*
xScale
-
w
,
(
y1
)
*
yScale
,
(
x1
-
5
)
*
xScale
,
(
y1
+
20
)
*
yScale
),
0xff000000
,
false
,
false
,
0
);
adFont
->
draw
(
pcard
->
atkstring
,
recti
((
x1
-
4
)
*
xScale
-
w
,
(
y1
+
1
)
*
yScale
,
(
x1
-
4
)
*
xScale
,
(
y1
+
21
)
*
yScale
),
pcard
->
attack
>
pcard
->
base_attack
?
0xffffff00
:
pcard
->
attack
<
pcard
->
base_attack
?
0xffff2090
:
0xffffffff
,
false
,
false
,
0
);
//adFont->draw(pcard->atkstring, Resize(x1 - 5 - w, y1, x1 - 5, y1 + 20), 0xff000000, false, false, 0);
//adFont->draw(pcard->atkstring, Resize(x1 - 4 - w, y1 + 1, x1 - 4, y1 + 21),
// pcard->attack > pcard->base_attack ? 0xffffff00 : pcard->attack < pcard->base_attack ? 0xffff2090 : 0xffffffff, false, false, 0);
DrawShadowText
(
adFont
,
pcard
->
atkstring
,
Resize
(
x1
-
4
,
y1
+
1
,
x1
-
4
,
y1
+
21
,
-
w
,
0
,
0
,
0
),
Resize
(
1
,
1
,
1
,
1
),
pcard
->
attack
>
pcard
->
base_attack
?
0xffffff00
:
pcard
->
attack
<
pcard
->
base_attack
?
0xffff2090
:
0xffffffff
,
0xff000000
,
false
,
false
,
0
);
if
(
pcard
->
type
&
TYPE_LINK
)
{
w
=
adFont
->
getDimension
(
pcard
->
linkstring
).
Width
;
adFont
->
draw
(
pcard
->
linkstring
,
Resize
(
x1
+
4
,
y1
,
x1
+
4
+
w
,
y1
+
20
),
0xff000000
,
false
,
false
,
0
);
...
...
gframe/game.h
View file @
c9de4842
...
...
@@ -112,6 +112,7 @@ public:
void
CheckMutual
(
ClientCard
*
pcard
,
int
mark
);
void
DrawCards
();
void
DrawCard
(
ClientCard
*
pcard
);
void
DrawShadowText
(
irr
::
gui
::
CGUITTFont
*
font
,
const
core
::
stringw
&
text
,
const
core
::
rect
<
s32
>&
position
,
const
core
::
rect
<
s32
>&
padding
,
video
::
SColor
color
,
video
::
SColor
shadowcolor
,
bool
hcenter
,
bool
vcenter
,
const
core
::
rect
<
s32
>*
clip
);
void
DrawMisc
();
void
DrawStatus
(
ClientCard
*
pcard
,
int
x1
,
int
y1
,
int
x2
,
int
y2
);
void
DrawGUI
();
...
...
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