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
51d2d6f4
Commit
51d2d6f4
authored
Dec 23, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加resize_X_Y方法
微调布局
parent
f0b94b77
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
Classes/gframe/drawing.cpp
Classes/gframe/drawing.cpp
+9
-9
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+8
-0
Classes/gframe/game.h
Classes/gframe/game.h
+1
-0
No files found.
Classes/gframe/drawing.cpp
View file @
51d2d6f4
...
...
@@ -1608,7 +1608,7 @@ void Game::DrawDeckBd() {
// 主卡组区域背景渐变色与白色边框
int
mainsize
=
deckManager
.
current_deck
.
main
.
size
();
driver
->
draw2DRectangle
(
Resize
(
310
,
13
7
,
410
,
157
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangle
(
Resize
(
310
,
13
6
,
410
,
157
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
136
,
410
,
157
));
// 显示“主卡组”的文字
...
...
@@ -1636,14 +1636,14 @@ void Game::DrawDeckBd() {
auto
it
=
deckBuilder
.
filterList
->
credit_limits
.
find
(
L"genesys"
);
if
(
it
!=
deckBuilder
.
filterList
->
credit_limits
.
end
())
{
// Genesys计分板背景
driver
->
draw2DRectangle
(
Resize
(
420
,
13
7
,
628
,
157
),
0xff000000
,
0xff000000
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangle
(
Resize
(
420
,
13
6
,
628
,
157
),
0xff000000
,
0xff000000
,
0x40000000
,
0x40000000
);
// Genesys计分板外框
driver
->
draw2DRectangleOutline
(
Resize
(
420
,
136
,
628
,
157
));
// 显示“限”的文字图标
driver
->
draw2DImage
(
imageManager
.
tGSC
,
Resize
Win
(
425
,
136
,
445
,
157
),
irr
::
core
::
recti
(
0
,
0
,
64
,
64
),
0
,
0
,
true
);
driver
->
draw2DImage
(
imageManager
.
tGSC
,
Resize
_X_Y
(
425
,
137
,
445
,
156
),
irr
::
core
::
recti
(
0
,
0
,
64
,
64
),
0
,
0
,
true
);
int
intValue
=
static_cast
<
int
>
(
it
->
second
);
//获取被选定的genesys禁卡表的上限值,并显示在界面上
DrawShadowText
(
guiFont
,
std
::
to_wstring
(
intValue
),
Resize
Win
(
450
,
136
,
470
,
156
),
Resize
(
0
,
1
,
2
,
0
),
0xffffffff
,
0xff000000
,
true
,
true
);
DrawShadowText
(
guiFont
,
std
::
to_wstring
(
intValue
),
Resize
_X_Y
(
450
,
137
,
470
,
156
),
Resize
(
0
,
1
,
2
,
0
),
0xffffffff
,
0xff000000
,
true
,
true
);
//遍历genesys禁卡表的卡片点数表,统计当前卡组点数合计值
int
totalCredits
=
0
;
...
...
@@ -1699,18 +1699,18 @@ void Game::DrawDeckBd() {
}
}
irr
::
video
::
SColor
color
=
0xffffffff
;
// 设置默认数字颜色值为白色
driver
->
draw2DImage
(
imageManager
.
tGSC
,
Resize
Win
(
480
,
136
,
500
,
157
),
irr
::
core
::
recti
(
64
,
0
,
128
,
64
),
0
,
0
,
true
);
driver
->
draw2DImage
(
imageManager
.
tGSC
,
Resize
_X_Y
(
480
,
137
,
500
,
156
),
irr
::
core
::
recti
(
64
,
0
,
128
,
64
),
0
,
0
,
true
);
color
=
totalCredits
>
intValue
?
0xffff0000
:
0xffffffff
;
// 如果点数总和超过上限则设置数字颜色为红色,否则为白色
DrawShadowText
(
guiFont
,
std
::
to_wstring
(
totalCredits
),
Resize
Win
(
505
,
136
,
525
,
156
),
Resize
(
0
,
1
,
2
,
0
),
color
,
0xff000000
,
true
,
true
);
DrawShadowText
(
guiFont
,
std
::
to_wstring
(
totalCredits
),
Resize
_X_Y
(
505
,
137
,
525
,
156
),
Resize
(
0
,
1
,
2
,
0
),
color
,
0xff000000
,
true
,
true
);
// 显示剩余点数
driver
->
draw2DImage
(
imageManager
.
tGSC
,
Resize
Win
(
535
,
136
,
555
,
157
),
irr
::
core
::
recti
(
128
,
0
,
192
,
64
),
0
,
0
,
true
);
driver
->
draw2DImage
(
imageManager
.
tGSC
,
Resize
_X_Y
(
535
,
137
,
555
,
156
),
irr
::
core
::
recti
(
128
,
0
,
192
,
64
),
0
,
0
,
true
);
int
remaining
=
intValue
-
totalCredits
;
color
=
remaining
<
0
?
0xffff0000
:
0xffffffff
;
// 剩余点数小于0则设置数字颜色为红色,否则为白色
DrawShadowText
(
guiFont
,
std
::
to_wstring
(
remaining
),
Resize
Win
(
560
,
136
,
580
,
156
),
Resize
(
0
,
1
,
2
,
0
),
color
,
0xff000000
,
true
,
true
);
DrawShadowText
(
guiFont
,
std
::
to_wstring
(
remaining
),
Resize
_X_Y
(
560
,
137
,
580
,
156
),
Resize
(
0
,
1
,
2
,
0
),
color
,
0xff000000
,
true
,
true
);
// Genesys标志
driver
->
draw2DImage
(
imageManager
.
tGSC
,
Resize
(
590
,
13
6
,
623
,
156
),
irr
::
core
::
recti
(
192
,
0
,
448
,
64
),
0
,
0
,
true
);
driver
->
draw2DImage
(
imageManager
.
tGSC
,
Resize
(
590
,
13
7
,
623
,
156
),
irr
::
core
::
recti
(
192
,
0
,
448
,
64
),
0
,
0
,
true
);
}
// 主卡组内容区背景与边框
...
...
Classes/gframe/game.cpp
View file @
51d2d6f4
...
...
@@ -2557,6 +2557,14 @@ irr::core::recti Game::Resize_Y(irr::s32 x, irr::s32 y, irr::s32 x2, irr::s32 y2
y2
=
y2
*
yScale
;
return
irr
::
core
::
recti
(
x
,
y
,
x2
,
y2
);
}
irr
::
core
::
recti
Game
::
Resize_X_Y
(
irr
::
s32
x
,
irr
::
s32
y
,
irr
::
s32
x2
,
irr
::
s32
y2
)
{
irr
::
s32
w
=
x2
-
x
;
x
=
x
*
xScale
;
y
=
y
*
yScale
;
x2
=
x
+
w
*
yScale
;
y2
=
y2
*
yScale
;
return
irr
::
core
::
recti
(
x
,
y
,
x2
,
y2
);
}
irr
::
core
::
vector2di
Game
::
Resize_Y
(
irr
::
s32
x
,
irr
::
s32
y
)
{
x
=
x
*
yScale
;
y
=
y
*
yScale
;
...
...
Classes/gframe/game.h
View file @
51d2d6f4
...
...
@@ -251,6 +251,7 @@ public:
irr
::
core
::
recti
ResizePhaseHint
(
irr
::
s32
x
,
irr
::
s32
y
,
irr
::
s32
x2
,
irr
::
s32
y2
,
irr
::
s32
width
);
irr
::
core
::
recti
ResizeWin
(
irr
::
s32
x
,
irr
::
s32
y
,
irr
::
s32
x2
,
irr
::
s32
y2
);
irr
::
core
::
recti
Resize_Y
(
irr
::
s32
x
,
irr
::
s32
y
,
irr
::
s32
x2
,
irr
::
s32
y2
);
irr
::
core
::
recti
Resize_X_Y
(
irr
::
s32
x
,
irr
::
s32
y
,
irr
::
s32
x2
,
irr
::
s32
y2
);
irr
::
core
::
vector2di
Resize_Y
(
irr
::
s32
x
,
irr
::
s32
y
);
template
<
typename
T
>
static
std
::
vector
<
T
>
TokenizeString
(
T
input
,
const
T
&
token
);
...
...
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