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
68502bdc
Commit
68502bdc
authored
Mar 11, 2023
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweak
parent
3baacae7
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
170 deletions
+68
-170
Classes/gframe/deck_con.cpp
Classes/gframe/deck_con.cpp
+4
-4
Classes/gframe/drawing.cpp
Classes/gframe/drawing.cpp
+56
-155
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+8
-11
No files found.
Classes/gframe/deck_con.cpp
View file @
68502bdc
...
@@ -172,7 +172,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -172,7 +172,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
switch
(
id
)
{
switch
(
id
)
{
case
BUTTON_CLEAR_DECK
:
{
case
BUTTON_CLEAR_DECK
:
{
mainGame
->
gMutex
.
lock
();
mainGame
->
gMutex
.
lock
();
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
370
,
mainGame
->
text
Font
,
dataManager
.
GetSysString
(
1339
));
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
370
,
mainGame
->
gui
Font
,
dataManager
.
GetSysString
(
1339
));
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
gMutex
.
unlock
();
mainGame
->
gMutex
.
unlock
();
prev_operation
=
id
;
prev_operation
=
id
;
...
@@ -246,7 +246,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -246,7 +246,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
gMutex
.
lock
();
mainGame
->
gMutex
.
lock
();
wchar_t
textBuffer
[
256
];
wchar_t
textBuffer
[
256
];
myswprintf
(
textBuffer
,
L"%ls
\n
%ls"
,
mainGame
->
cbDBDecks
->
getItem
(
sel
),
dataManager
.
GetSysString
(
1337
));
myswprintf
(
textBuffer
,
L"%ls
\n
%ls"
,
mainGame
->
cbDBDecks
->
getItem
(
sel
),
dataManager
.
GetSysString
(
1337
));
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
370
*
mainGame
->
xScale
,
mainGame
->
text
Font
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
370
*
mainGame
->
xScale
,
mainGame
->
gui
Font
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
gMutex
.
unlock
();
mainGame
->
gMutex
.
unlock
();
prev_operation
=
id
;
prev_operation
=
id
;
...
@@ -883,7 +883,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -883,7 +883,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
}
}
if
(
is_modified
&&
!
readonly
&&
!
mainGame
->
chkIgnoreDeckChanges
->
isChecked
())
{
if
(
is_modified
&&
!
readonly
&&
!
mainGame
->
chkIgnoreDeckChanges
->
isChecked
())
{
mainGame
->
gMutex
.
lock
();
mainGame
->
gMutex
.
lock
();
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
370
*
mainGame
->
xScale
,
mainGame
->
text
Font
,
dataManager
.
GetSysString
(
1356
));
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
370
*
mainGame
->
xScale
,
mainGame
->
gui
Font
,
dataManager
.
GetSysString
(
1356
));
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
gMutex
.
unlock
();
mainGame
->
gMutex
.
unlock
();
prev_operation
=
id
;
prev_operation
=
id
;
...
@@ -1671,7 +1671,7 @@ void DeckBuilder::RefreshPackListScroll() {
...
@@ -1671,7 +1671,7 @@ void DeckBuilder::RefreshPackListScroll() {
}
}
}
else
{
}
else
{
mainGame
->
scrPackCards
->
setVisible
(
false
);
mainGame
->
scrPackCards
->
setVisible
(
false
);
mainGame
->
scrPackCards
->
setPos
(
0
);
mainGame
->
scrPackCards
->
setPos
(
0
);
}
}
}
}
void
DeckBuilder
::
ChangeCategory
(
int
catesel
)
{
void
DeckBuilder
::
ChangeCategory
(
int
catesel
)
{
...
...
Classes/gframe/drawing.cpp
View file @
68502bdc
This diff is collapsed.
Click to expand it.
Classes/gframe/game.cpp
View file @
68502bdc
...
@@ -249,7 +249,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
...
@@ -249,7 +249,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
device
->
setWindowCaption
(
L"[---]"
);
device
->
setWindowCaption
(
L"[---]"
);
device
->
setResizable
(
false
);
device
->
setResizable
(
false
);
gui
::
IGUISkin
*
newskin
=
CAndroidGUISkin
::
createAndroidSkin
(
gui
::
EGST_BURNING_SKIN
,
driver
,
env
,
xScale
,
yScale
);
gui
::
IGUISkin
*
newskin
=
CAndroidGUISkin
::
createAndroidSkin
(
gui
::
EGST_BURNING_SKIN
,
driver
,
env
,
xScale
,
yScale
);
newskin
->
setFont
(
text
Font
);
newskin
->
setFont
(
gui
Font
);
env
->
setSkin
(
newskin
);
env
->
setSkin
(
newskin
);
newskin
->
drop
();
newskin
->
drop
();
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
...
@@ -322,8 +322,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
...
@@ -322,8 +322,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
ChangeToIGUIImageButton
(
btnJoinCancel
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
ChangeToIGUIImageButton
(
btnJoinCancel
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
btnCreateHost
=
env
->
addButton
(
rect
<
s32
>
(
430
*
xScale
,
25
*
yScale
,
540
*
xScale
,
65
*
yScale
),
wLanWindow
,
BUTTON_CREATE_HOST
,
dataManager
.
GetSysString
(
1224
));
btnCreateHost
=
env
->
addButton
(
rect
<
s32
>
(
430
*
xScale
,
25
*
yScale
,
540
*
xScale
,
65
*
yScale
),
wLanWindow
,
BUTTON_CREATE_HOST
,
dataManager
.
GetSysString
(
1224
));
ChangeToIGUIImageButton
(
btnCreateHost
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
ChangeToIGUIImageButton
(
btnCreateHost
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
#endif
#ifdef _IRR_ANDROID_PLATFORM_
//create host
//create host
wCreateHost
=
env
->
addWindow
(
rect
<
s32
>
(
220
*
xScale
,
100
*
yScale
,
800
*
xScale
,
520
*
yScale
),
false
,
dataManager
.
GetSysString
(
1224
));
wCreateHost
=
env
->
addWindow
(
rect
<
s32
>
(
220
*
xScale
,
100
*
yScale
,
800
*
xScale
,
520
*
yScale
),
false
,
dataManager
.
GetSysString
(
1224
));
wCreateHost
->
getCloseButton
()
->
setVisible
(
false
);
wCreateHost
->
getCloseButton
()
->
setVisible
(
false
);
...
@@ -401,8 +400,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
...
@@ -401,8 +400,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
ChangeToIGUIImageButton
(
btnHostConfirm
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
ChangeToIGUIImageButton
(
btnHostConfirm
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
btnHostCancel
=
env
->
addButton
(
rect
<
s32
>
(
430
*
xScale
,
350
*
yScale
,
540
*
xScale
,
390
*
yScale
),
wCreateHost
,
BUTTON_HOST_CANCEL
,
dataManager
.
GetSysString
(
1212
));
btnHostCancel
=
env
->
addButton
(
rect
<
s32
>
(
430
*
xScale
,
350
*
yScale
,
540
*
xScale
,
390
*
yScale
),
wCreateHost
,
BUTTON_HOST_CANCEL
,
dataManager
.
GetSysString
(
1212
));
ChangeToIGUIImageButton
(
btnHostCancel
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
ChangeToIGUIImageButton
(
btnHostCancel
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
#endif
#ifdef _IRR_ANDROID_PLATFORM_
//host(single)
//host(single)
wHostPrepare
=
env
->
addWindow
(
rect
<
s32
>
(
220
*
xScale
,
100
*
yScale
,
800
*
xScale
,
520
*
yScale
),
false
,
dataManager
.
GetSysString
(
1250
));
wHostPrepare
=
env
->
addWindow
(
rect
<
s32
>
(
220
*
xScale
,
100
*
yScale
,
800
*
xScale
,
520
*
yScale
),
false
,
dataManager
.
GetSysString
(
1250
));
wHostPrepare
->
setDraggable
(
false
);
wHostPrepare
->
setDraggable
(
false
);
...
@@ -448,7 +446,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
...
@@ -448,7 +446,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
ChangeToIGUIImageButton
(
btnHostPrepStart
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
ChangeToIGUIImageButton
(
btnHostPrepStart
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
btnHostPrepCancel
=
env
->
addButton
(
rect
<
s32
>
(
440
*
xScale
,
350
*
yScale
,
550
*
xScale
,
390
*
yScale
),
wHostPrepare
,
BUTTON_HP_CANCEL
,
dataManager
.
GetSysString
(
1210
));
btnHostPrepCancel
=
env
->
addButton
(
rect
<
s32
>
(
440
*
xScale
,
350
*
yScale
,
550
*
xScale
,
390
*
yScale
),
wHostPrepare
,
BUTTON_HP_CANCEL
,
dataManager
.
GetSysString
(
1210
));
ChangeToIGUIImageButton
(
btnHostPrepCancel
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
ChangeToIGUIImageButton
(
btnHostPrepCancel
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
#endif
//img always use *yScale to keep proportion
//img always use *yScale to keep proportion
wCardImg
=
env
->
addImage
(
rect
<
s32
>
(
1
*
yScale
,
1
*
yScale
,
(
1
+
CARD_IMG_WIDTH
+
20
)
*
yScale
,
(
1
+
CARD_IMG_HEIGHT
+
18
)
*
yScale
),
0
,
-
1
,
0
,
true
);
wCardImg
=
env
->
addImage
(
rect
<
s32
>
(
1
*
yScale
,
1
*
yScale
,
(
1
+
CARD_IMG_WIDTH
+
20
)
*
yScale
,
(
1
+
CARD_IMG_HEIGHT
+
18
)
*
yScale
),
0
,
-
1
,
0
,
true
);
wCardImg
->
setImage
(
imageManager
.
tDialog_S
);
wCardImg
->
setImage
(
imageManager
.
tDialog_S
);
...
@@ -458,7 +456,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
...
@@ -458,7 +456,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
imgCard
->
setScaleImage
(
true
);
imgCard
->
setScaleImage
(
true
);
imgCard
->
setUseAlphaChannel
(
true
);
imgCard
->
setUseAlphaChannel
(
true
);
#ifdef _IRR_ANDROID_PLATFORM_
//phase
//phase
wPhase
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
480
*
xScale
,
305
*
yScale
,
895
*
xScale
,
335
*
yScale
));
wPhase
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
480
*
xScale
,
305
*
yScale
,
895
*
xScale
,
335
*
yScale
));
wPhase
->
setVisible
(
false
);
wPhase
->
setVisible
(
false
);
...
@@ -476,7 +474,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
...
@@ -476,7 +474,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
btnEP
=
env
->
addButton
(
rect
<
s32
>
(
320
*
xScale
,
0
*
yScale
,
370
*
xScale
,
30
*
yScale
),
wPhase
,
BUTTON_EP
,
L"
\xff25\xff30
"
);
btnEP
=
env
->
addButton
(
rect
<
s32
>
(
320
*
xScale
,
0
*
yScale
,
370
*
xScale
,
30
*
yScale
),
wPhase
,
BUTTON_EP
,
L"
\xff25\xff30
"
);
ChangeToIGUIImageButton
(
btnEP
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
ChangeToIGUIImageButton
(
btnEP
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
btnEP
->
setVisible
(
false
);
btnEP
->
setVisible
(
false
);
#endif
//tab(changed)
//tab(changed)
wInfos
=
env
->
addWindow
(
rect
<
s32
>
(
1
*
xScale
,
275
*
yScale
,
260
*
xScale
,
639
*
yScale
),
false
,
L""
);
wInfos
=
env
->
addWindow
(
rect
<
s32
>
(
1
*
xScale
,
275
*
yScale
,
260
*
xScale
,
639
*
yScale
),
false
,
L""
);
wInfos
->
getCloseButton
()
->
setVisible
(
false
);
wInfos
->
getCloseButton
()
->
setVisible
(
false
);
...
@@ -493,8 +491,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
...
@@ -493,8 +491,7 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
stSetName
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
10
*
xScale
,
83
*
yScale
,
260
*
xScale
,
106
*
yScale
),
false
,
true
,
wInfos
,
-
1
,
false
);
stSetName
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
10
*
xScale
,
83
*
yScale
,
260
*
xScale
,
106
*
yScale
),
false
,
true
,
wInfos
,
-
1
,
false
);
stSetName
->
setOverrideColor
(
SColor
(
255
,
255
,
152
,
42
));
//255, 0, 0, 255
stSetName
->
setOverrideColor
(
SColor
(
255
,
255
,
152
,
42
));
//255, 0, 0, 255
stText
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
10
*
xScale
,
106
*
yScale
,
260
*
xScale
,
345
*
yScale
),
false
,
true
,
wInfos
,
-
1
,
false
);
stText
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
10
*
xScale
,
106
*
yScale
,
260
*
xScale
,
345
*
yScale
),
false
,
true
,
wInfos
,
-
1
,
false
);
#ifdef _IRR_ANDROID_PLATFORM_
scrCardText
=
env
->
addScrollBar
(
false
,
rect
<
s32
>
(
248
*
xScale
,
106
*
yScale
,
258
*
xScale
,
639
*
yScale
),
wInfos
,
SCROLL_CARDTEXT
);
scrCardText
=
env
->
addScrollBar
(
false
,
rect
<
s32
>
(
238
*
xScale
,
106
*
yScale
,
258
*
xScale
,
639
*
yScale
),
wInfos
,
SCROLL_CARDTEXT
);
#endif
#endif
scrCardText
->
setLargeStep
(
1
);
scrCardText
->
setLargeStep
(
1
);
scrCardText
->
setSmallStep
(
1
);
scrCardText
->
setSmallStep
(
1
);
...
@@ -1735,7 +1732,7 @@ void Game::LoadConfig() {
...
@@ -1735,7 +1732,7 @@ void Game::LoadConfig() {
gameConf
.
_init
=
TRUE
;
gameConf
.
_init
=
TRUE
;
gameConf
.
antialias
=
1
;
gameConf
.
antialias
=
1
;
gameConf
.
serverport
=
7911
;
gameConf
.
serverport
=
7911
;
gameConf
.
textfontsize
=
16
;
gameConf
.
textfontsize
=
25
;
gameConf
.
nickname
[
0
]
=
0
;
gameConf
.
nickname
[
0
]
=
0
;
gameConf
.
gamename
[
0
]
=
0
;
gameConf
.
gamename
[
0
]
=
0
;
BufferIO
::
DecodeUTF8
(
android
::
getLastCategory
(
appMain
).
c_str
(),
wstr
);;
BufferIO
::
DecodeUTF8
(
android
::
getLastCategory
(
appMain
).
c_str
(),
wstr
);;
...
...
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