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
97dd3221
Commit
97dd3221
authored
Dec 26, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加图标活动文字用于显示点数和限制数字
parent
a83f02ad
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
22 deletions
+19
-22
Classes/gframe/drawing.cpp
Classes/gframe/drawing.cpp
+13
-22
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+2
-0
Classes/gframe/game.h
Classes/gframe/game.h
+2
-0
Classes/gframe/image_manager.cpp
Classes/gframe/image_manager.cpp
+1
-0
Classes/gframe/image_manager.h
Classes/gframe/image_manager.h
+1
-0
mobile/assets/data/textures/icon_lim.png
mobile/assets/data/textures/icon_lim.png
+0
-0
No files found.
Classes/gframe/drawing.cpp
View file @
97dd3221
...
@@ -1527,40 +1527,31 @@ void Game::DrawThumb(code_pointer cp, irr::core::vector2di pos, const LFList* lf
...
@@ -1527,40 +1527,31 @@ void Game::DrawThumb(code_pointer cp, irr::core::vector2di pos, const LFList* lf
if
(
lfit
!=
lflist
->
content
.
end
())
{
if
(
lfit
!=
lflist
->
content
.
end
())
{
switch
(
lfit
->
second
)
{
switch
(
lfit
->
second
)
{
case
0
:
case
0
:
driver
->
draw2DImage
(
imageManager
.
tLim
,
limitloc
,
irr
::
core
::
recti
(
0
,
0
,
64
,
64
),
0
,
0
,
true
);
driver
->
draw2DImage
(
imageManager
.
tLim
it
,
limitloc
,
irr
::
core
::
recti
(
0
,
0
,
64
,
64
),
0
,
0
,
true
);
break
;
break
;
case
1
:
case
1
:
driver
->
draw2DImage
(
imageManager
.
tLim
,
limitloc
,
irr
::
core
::
recti
(
64
,
0
,
128
,
64
),
0
,
0
,
true
);
driver
->
draw2DImage
(
imageManager
.
tLimit
,
limitloc
,
irr
::
core
::
recti
(
64
,
0
,
128
,
64
),
0
,
0
,
true
);
break
;
icFont
->
drawUstring
(
L"1"
,
limitloc
,
0xffffff00
,
true
,
true
);
break
;
case
2
:
case
2
:
driver
->
draw2DImage
(
imageManager
.
tLim
,
limitloc
,
irr
::
core
::
recti
(
0
,
64
,
64
,
128
),
0
,
0
,
true
);
driver
->
draw2DImage
(
imageManager
.
tLimit
,
limitloc
,
irr
::
core
::
recti
(
64
,
0
,
128
,
64
),
0
,
0
,
true
);
icFont
->
drawUstring
(
L"2"
,
limitloc
,
0xffffff00
,
true
,
true
);
break
;
break
;
}
}
}
}
auto
current_limitloc
=
limitloc
;
auto
credit_max_display
=
CARD_THUMB_WIDTH
/
20
;
auto
credit_max_display
=
CARD_THUMB_WIDTH
/
20
;
auto
next_limitloc
=
[
&
]()
{
auto
this_limitloc
=
current_limitloc
;
auto
width
=
current_limitloc
.
getWidth
();
current_limitloc
.
UpperLeftCorner
.
X
+=
width
;
current_limitloc
.
LowerRightCorner
.
X
+=
width
;
--
credit_max_display
;
return
this_limitloc
;
};
auto
lfcredit
=
lflist
->
credits
.
find
(
lcode
);
auto
lfcredit
=
lflist
->
credits
.
find
(
lcode
);
if
(
lfcredit
!=
lflist
->
credits
.
end
())
{
if
(
lfcredit
!=
lflist
->
credits
.
end
())
{
for
(
auto
&
credit_entry
:
lfcredit
->
second
)
{
for
(
auto
&
credit_entry
:
lfcredit
->
second
)
{
if
(
credit_max_display
<=
0
)
if
(
credit_max_display
<=
0
)
break
;
break
;
auto
value
=
credit_entry
.
second
;
auto
value
=
credit_entry
.
second
;
if
(
value
>
0
&&
value
<=
100
)
{
driver
->
draw2DImage
(
imageManager
.
tLimit
,
limitloc
,
irr
::
core
::
recti
(
0
,
64
,
64
,
128
),
0
,
0
,
true
);
auto
cvalue
=
value
-
1
;
// 1-100 => 0-99
if
(
value
>
-
10
||
value
<
100
)
{
// pick the first and second digit
adFont
->
drawUstring
(
std
::
to_wstring
(
static_cast
<
int
>
(
value
)),
limitloc
,
0xff00ffff
,
true
,
true
);
auto
digit1
=
cvalue
/
10
;
}
else
{
auto
digit2
=
cvalue
%
10
;
miniFont
->
drawUstring
(
std
::
to_wstring
(
static_cast
<
int
>
(
value
)),
limitloc
,
0xff00ffff
,
true
,
true
);
auto
credit_texture_offset_x
=
digit2
*
64
;
auto
credit_texture_offset_y
=
digit1
*
64
;
driver
->
draw2DImage
(
imageManager
.
tLimCredit
,
next_limitloc
(),
irr
::
core
::
recti
(
credit_texture_offset_x
,
credit_texture_offset_y
,
credit_texture_offset_x
+
64
,
credit_texture_offset_y
+
64
),
0
,
0
,
true
);
}
}
}
}
}
}
...
...
Classes/gframe/game.cpp
View file @
97dd3221
...
@@ -350,6 +350,8 @@ bool Game::Initialize(ANDROID_APP app, irr::android::InitOptions *options) {
...
@@ -350,6 +350,8 @@ bool Game::Initialize(ANDROID_APP app, irr::android::InitOptions *options) {
guiFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
18
*
yScale
,
isAntialias
,
true
);
guiFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
18
*
yScale
,
isAntialias
,
true
);
titleFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
32
*
yScale
,
isAntialias
,
true
);
titleFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
32
*
yScale
,
isAntialias
,
true
);
textFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
(
int
)
gameConf
.
textfontsize
*
yScale
,
isAntialias
,
true
);
textFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
(
int
)
gameConf
.
textfontsize
*
yScale
,
isAntialias
,
true
);
miniFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
10
*
yScale
,
isAntialias
,
true
);
icFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
14
*
yScale
,
isAntialias
,
true
);
// 检查字体创建是否成功
// 检查字体创建是否成功
if
(
!
numFont
||
!
guiFont
)
{
if
(
!
numFont
||
!
guiFont
)
{
ALOGW
(
"cc game: add font fail "
);
ALOGW
(
"cc game: add font fail "
);
...
...
Classes/gframe/game.h
View file @
97dd3221
...
@@ -330,6 +330,8 @@ public:
...
@@ -330,6 +330,8 @@ public:
irr
::
gui
::
CGUITTFont
*
adFont
;
irr
::
gui
::
CGUITTFont
*
adFont
;
irr
::
gui
::
CGUITTFont
*
lpcFont
;
irr
::
gui
::
CGUITTFont
*
lpcFont
;
irr
::
gui
::
CGUITTFont
*
titleFont
;
irr
::
gui
::
CGUITTFont
*
titleFont
;
irr
::
gui
::
CGUITTFont
*
miniFont
;
irr
::
gui
::
CGUITTFont
*
icFont
;
std
::
map
<
irr
::
gui
::
CGUIImageButton
*
,
int
>
imageLoading
;
std
::
map
<
irr
::
gui
::
CGUIImageButton
*
,
int
>
imageLoading
;
//card image
//card image
irr
::
gui
::
IGUIStaticText
*
wCardImg
;
irr
::
gui
::
IGUIStaticText
*
wCardImg
;
...
...
Classes/gframe/image_manager.cpp
View file @
97dd3221
...
@@ -36,6 +36,7 @@ bool ImageManager::Initial(const path dir) {
...
@@ -36,6 +36,7 @@ bool ImageManager::Initial(const path dir) {
tChainTarget
=
driver
->
getTexture
((
dir
+
path
(
"/textures/chaintarget.png"
)).
c_str
());
tChainTarget
=
driver
->
getTexture
((
dir
+
path
(
"/textures/chaintarget.png"
)).
c_str
());
tLim
=
driver
->
getTexture
((
dir
+
path
(
"/textures/lim.png"
)).
c_str
());
tLim
=
driver
->
getTexture
((
dir
+
path
(
"/textures/lim.png"
)).
c_str
());
tLimCredit
=
driver
->
getTexture
((
dir
+
path
(
"/textures/lim_credit.png"
)).
c_str
());
tLimCredit
=
driver
->
getTexture
((
dir
+
path
(
"/textures/lim_credit.png"
)).
c_str
());
tLimit
=
driver
->
getTexture
((
dir
+
path
(
"/textures/icon_lim.png"
)).
c_str
());
tOT
=
driver
->
getTexture
((
dir
+
path
(
"/textures/ot.png"
)).
c_str
());
tOT
=
driver
->
getTexture
((
dir
+
path
(
"/textures/ot.png"
)).
c_str
());
tHand
[
0
]
=
driver
->
getTexture
((
dir
+
path
(
"/textures/f1.jpg"
)).
c_str
());
tHand
[
0
]
=
driver
->
getTexture
((
dir
+
path
(
"/textures/f1.jpg"
)).
c_str
());
tHand
[
1
]
=
driver
->
getTexture
((
dir
+
path
(
"/textures/f2.jpg"
)).
c_str
());
tHand
[
1
]
=
driver
->
getTexture
((
dir
+
path
(
"/textures/f2.jpg"
)).
c_str
());
...
...
Classes/gframe/image_manager.h
View file @
97dd3221
...
@@ -48,6 +48,7 @@ public:
...
@@ -48,6 +48,7 @@ public:
irr
::
video
::
ITexture
*
tChainTarget
;
irr
::
video
::
ITexture
*
tChainTarget
;
irr
::
video
::
ITexture
*
tLim
;
irr
::
video
::
ITexture
*
tLim
;
irr
::
video
::
ITexture
*
tLimCredit
;
irr
::
video
::
ITexture
*
tLimCredit
;
irr
::
video
::
ITexture
*
tLimit
;
irr
::
video
::
ITexture
*
tOT
;
irr
::
video
::
ITexture
*
tOT
;
irr
::
video
::
ITexture
*
tHand
[
3
];
irr
::
video
::
ITexture
*
tHand
[
3
];
irr
::
video
::
ITexture
*
tBackGround
;
irr
::
video
::
ITexture
*
tBackGround
;
...
...
mobile/assets/data/textures/icon_lim.png
0 → 100644
View file @
97dd3221
7.78 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