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
ccb0a1be
Commit
ccb0a1be
authored
Mar 12, 2023
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
放大点击菜单按钮
textfontsize允许读写设置 缩小效果文字滚动条
parent
68502bdc
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
38 deletions
+39
-38
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+13
-13
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+26
-25
No files found.
Classes/gframe/event_handler.cpp
View file @
ccb0a1be
...
@@ -2098,7 +2098,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
...
@@ -2098,7 +2098,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
break
;
break
;
}
}
u32
pos
=
mainGame
->
scrCardText
->
getPos
();
u32
pos
=
mainGame
->
scrCardText
->
getPos
();
mainGame
->
SetStaticText
(
mainGame
->
stText
,
mainGame
->
stText
->
getRelativePosition
().
getWidth
()
-
25
,
mainGame
->
gui
Font
,
mainGame
->
showingtext
,
pos
);
mainGame
->
SetStaticText
(
mainGame
->
stText
,
mainGame
->
stText
->
getRelativePosition
().
getWidth
()
-
15
,
mainGame
->
text
Font
,
mainGame
->
showingtext
,
pos
);
return
true
;
return
true
;
break
;
break
;
}
}
...
@@ -2287,7 +2287,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
...
@@ -2287,7 +2287,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
if
(
pos
<
0
)
pos
=
0
;
if
(
pos
<
0
)
pos
=
0
;
if
(
pos
>
max
)
pos
=
max
;
if
(
pos
>
max
)
pos
=
max
;
mainGame
->
scrCardText
->
setPos
(
pos
);
mainGame
->
scrCardText
->
setPos
(
pos
);
mainGame
->
SetStaticText
(
mainGame
->
stText
,
mainGame
->
stText
->
getRelativePosition
().
getWidth
()
-
25
,
mainGame
->
gui
Font
,
mainGame
->
showingtext
,
pos
);
mainGame
->
SetStaticText
(
mainGame
->
stText
,
mainGame
->
stText
->
getRelativePosition
().
getWidth
()
-
15
,
mainGame
->
text
Font
,
mainGame
->
showingtext
,
pos
);
}
}
if
(
is_dragging_lstLog
)
{
if
(
is_dragging_lstLog
)
{
if
(
!
mainGame
->
lstLog
->
getVerticalScrollBar
()
->
isVisible
())
{
if
(
!
mainGame
->
lstLog
->
getVerticalScrollBar
()
->
isVisible
())
{
...
@@ -2578,28 +2578,28 @@ void ClientField::ShowMenu(int flag, int x, int y) {
...
@@ -2578,28 +2578,28 @@ void ClientField::ShowMenu(int flag, int x, int y) {
mainGame
->
btnActivate
->
setVisible
(
true
);
mainGame
->
btnActivate
->
setVisible
(
true
);
mainGame
->
btnActivate
->
setRelativePosition
(
position2di
(
0
,
height
));
mainGame
->
btnActivate
->
setRelativePosition
(
position2di
(
0
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
5
0
*
mainGame
->
yScale
;
height
+=
6
0
*
mainGame
->
yScale
;
#endif
#endif
}
else
mainGame
->
btnActivate
->
setVisible
(
false
);
}
else
mainGame
->
btnActivate
->
setVisible
(
false
);
if
(
flag
&
COMMAND_SUMMON
)
{
if
(
flag
&
COMMAND_SUMMON
)
{
mainGame
->
btnSummon
->
setVisible
(
true
);
mainGame
->
btnSummon
->
setVisible
(
true
);
mainGame
->
btnSummon
->
setRelativePosition
(
position2di
(
0
,
height
));
mainGame
->
btnSummon
->
setRelativePosition
(
position2di
(
0
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
5
0
*
mainGame
->
yScale
;
height
+=
6
0
*
mainGame
->
yScale
;
#endif
#endif
}
else
mainGame
->
btnSummon
->
setVisible
(
false
);
}
else
mainGame
->
btnSummon
->
setVisible
(
false
);
if
(
flag
&
COMMAND_SPSUMMON
)
{
if
(
flag
&
COMMAND_SPSUMMON
)
{
mainGame
->
btnSPSummon
->
setVisible
(
true
);
mainGame
->
btnSPSummon
->
setVisible
(
true
);
mainGame
->
btnSPSummon
->
setRelativePosition
(
position2di
(
0
,
height
));
mainGame
->
btnSPSummon
->
setRelativePosition
(
position2di
(
0
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
5
0
*
mainGame
->
yScale
;
height
+=
6
0
*
mainGame
->
yScale
;
#endif
#endif
}
else
mainGame
->
btnSPSummon
->
setVisible
(
false
);
}
else
mainGame
->
btnSPSummon
->
setVisible
(
false
);
if
(
flag
&
COMMAND_MSET
)
{
if
(
flag
&
COMMAND_MSET
)
{
mainGame
->
btnMSet
->
setVisible
(
true
);
mainGame
->
btnMSet
->
setVisible
(
true
);
mainGame
->
btnMSet
->
setRelativePosition
(
position2di
(
0
,
height
));
mainGame
->
btnMSet
->
setRelativePosition
(
position2di
(
0
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
5
0
*
mainGame
->
yScale
;
height
+=
6
0
*
mainGame
->
yScale
;
#endif
#endif
}
else
mainGame
->
btnMSet
->
setVisible
(
false
);
}
else
mainGame
->
btnMSet
->
setVisible
(
false
);
if
(
flag
&
COMMAND_SSET
)
{
if
(
flag
&
COMMAND_SSET
)
{
...
@@ -2610,7 +2610,7 @@ void ClientField::ShowMenu(int flag, int x, int y) {
...
@@ -2610,7 +2610,7 @@ void ClientField::ShowMenu(int flag, int x, int y) {
mainGame
->
btnSSet
->
setVisible
(
true
);
mainGame
->
btnSSet
->
setVisible
(
true
);
mainGame
->
btnSSet
->
setRelativePosition
(
position2di
(
0
,
height
));
mainGame
->
btnSSet
->
setRelativePosition
(
position2di
(
0
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
5
0
*
mainGame
->
yScale
;
height
+=
6
0
*
mainGame
->
yScale
;
#endif
#endif
}
else
mainGame
->
btnSSet
->
setVisible
(
false
);
}
else
mainGame
->
btnSSet
->
setVisible
(
false
);
if
(
flag
&
COMMAND_REPOS
)
{
if
(
flag
&
COMMAND_REPOS
)
{
...
@@ -2623,40 +2623,40 @@ void ClientField::ShowMenu(int flag, int x, int y) {
...
@@ -2623,40 +2623,40 @@ void ClientField::ShowMenu(int flag, int x, int y) {
mainGame
->
btnRepos
->
setVisible
(
true
);
mainGame
->
btnRepos
->
setVisible
(
true
);
mainGame
->
btnRepos
->
setRelativePosition
(
position2di
(
0
,
height
));
mainGame
->
btnRepos
->
setRelativePosition
(
position2di
(
0
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
5
0
*
mainGame
->
yScale
;
height
+=
6
0
*
mainGame
->
yScale
;
#endif
#endif
}
else
mainGame
->
btnRepos
->
setVisible
(
false
);
}
else
mainGame
->
btnRepos
->
setVisible
(
false
);
if
(
flag
&
COMMAND_ATTACK
)
{
if
(
flag
&
COMMAND_ATTACK
)
{
mainGame
->
btnAttack
->
setVisible
(
true
);
mainGame
->
btnAttack
->
setVisible
(
true
);
mainGame
->
btnAttack
->
setRelativePosition
(
position2di
(
0
,
height
));
mainGame
->
btnAttack
->
setRelativePosition
(
position2di
(
0
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
5
0
*
mainGame
->
yScale
;
height
+=
6
0
*
mainGame
->
yScale
;
#endif
#endif
}
else
mainGame
->
btnAttack
->
setVisible
(
false
);
}
else
mainGame
->
btnAttack
->
setVisible
(
false
);
if
(
flag
&
COMMAND_LIST
)
{
if
(
flag
&
COMMAND_LIST
)
{
mainGame
->
btnShowList
->
setVisible
(
true
);
mainGame
->
btnShowList
->
setVisible
(
true
);
mainGame
->
btnShowList
->
setRelativePosition
(
position2di
(
0
,
height
));
mainGame
->
btnShowList
->
setRelativePosition
(
position2di
(
0
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
5
0
*
mainGame
->
yScale
;
height
+=
6
0
*
mainGame
->
yScale
;
#endif
#endif
}
else
mainGame
->
btnShowList
->
setVisible
(
false
);
}
else
mainGame
->
btnShowList
->
setVisible
(
false
);
if
(
flag
&
COMMAND_OPERATION
)
{
if
(
flag
&
COMMAND_OPERATION
)
{
mainGame
->
btnOperation
->
setVisible
(
true
);
mainGame
->
btnOperation
->
setVisible
(
true
);
mainGame
->
btnOperation
->
setRelativePosition
(
position2di
(
0
,
height
));
mainGame
->
btnOperation
->
setRelativePosition
(
position2di
(
0
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
5
0
*
mainGame
->
yScale
;
height
+=
6
0
*
mainGame
->
yScale
;
#endif
#endif
}
else
mainGame
->
btnOperation
->
setVisible
(
false
);
}
else
mainGame
->
btnOperation
->
setVisible
(
false
);
if
(
flag
&
COMMAND_RESET
)
{
if
(
flag
&
COMMAND_RESET
)
{
mainGame
->
btnReset
->
setVisible
(
true
);
mainGame
->
btnReset
->
setVisible
(
true
);
mainGame
->
btnReset
->
setRelativePosition
(
position2di
(
0
,
height
));
mainGame
->
btnReset
->
setRelativePosition
(
position2di
(
0
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
5
0
*
mainGame
->
yScale
;
height
+=
6
0
*
mainGame
->
yScale
;
#endif
#endif
}
else
mainGame
->
btnReset
->
setVisible
(
false
);
}
else
mainGame
->
btnReset
->
setVisible
(
false
);
panel
=
mainGame
->
wCmdMenu
;
panel
=
mainGame
->
wCmdMenu
;
mainGame
->
wCmdMenu
->
setVisible
(
true
);
mainGame
->
wCmdMenu
->
setVisible
(
true
);
mainGame
->
wCmdMenu
->
setRelativePosition
(
irr
::
core
::
recti
(
x
-
10
*
mainGame
->
xScale
,
y
-
30
*
mainGame
->
yScale
-
height
,
x
+
100
*
mainGame
->
xScale
,
y
-
2
0
*
mainGame
->
yScale
));
mainGame
->
wCmdMenu
->
setRelativePosition
(
irr
::
core
::
recti
(
x
-
20
*
mainGame
->
xScale
,
y
-
30
*
mainGame
->
yScale
-
height
,
x
+
130
*
mainGame
->
xScale
,
y
-
3
0
*
mainGame
->
yScale
));
}
}
void
ClientField
::
HideMenu
()
{
void
ClientField
::
HideMenu
()
{
mainGame
->
wCmdMenu
->
setVisible
(
false
);
mainGame
->
wCmdMenu
->
setVisible
(
false
);
...
...
Classes/gframe/game.cpp
View file @
ccb0a1be
This diff is collapsed.
Click to expand it.
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