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
abe0cd7e
Commit
abe0cd7e
authored
Aug 02, 2022
by
fallenstardust
Committed by
GitHub
Aug 02, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #64 from mercury233/patch-select-pos
fix wPosSelect, update ChangeToIGUIImageWindow
parents
9747657f
8f12fe7f
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
34 deletions
+39
-34
Classes/gframe/drawing.cpp
Classes/gframe/drawing.cpp
+1
-1
Classes/gframe/duelclient.cpp
Classes/gframe/duelclient.cpp
+9
-4
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+28
-28
Classes/gframe/game.h
Classes/gframe/game.h
+1
-1
No files found.
Classes/gframe/drawing.cpp
View file @
abe0cd7e
...
...
@@ -1111,7 +1111,7 @@ void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) {
FadingUnit
fu
;
fu
.
fadingSize
=
win
->
getRelativePosition
();
for
(
auto
fit
=
fadingList
.
begin
();
fit
!=
fadingList
.
end
();
++
fit
)
if
(
win
==
fit
->
guiFading
&&
win
!=
wOptions
&&
win
!=
wANNumber
)
// the size of wOptions is always setted by ClientField::ShowSelectOption before showing it
if
(
win
==
fit
->
guiFading
&&
win
!=
wOptions
&&
win
!=
wANNumber
&&
win
!=
wPosSelect
)
// the size of those windows are always setted before showing them
fu
.
fadingSize
=
fit
->
fadingSize
;
irr
::
core
::
position2di
center
=
fu
.
fadingSize
.
getCenter
();
fu
.
fadingDiff
.
X
=
fu
.
fadingSize
.
getWidth
()
/
10
;
...
...
Classes/gframe/duelclient.cpp
View file @
abe0cd7e
...
...
@@ -1824,14 +1824,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
SetResponseI
(
positions
);
return
true
;
}
int
count
=
0
,
filter
=
0x1
,
startpos
;
int
count
=
0
,
filter
=
0x1
,
startpos
=
30
;
while
(
filter
!=
0x10
)
{
if
(
positions
&
filter
)
count
++
;
filter
<<=
1
;
}
if
(
count
==
4
)
startpos
=
10
;
else
if
(
count
==
3
)
startpos
=
82
;
else
startpos
=
50
;
if
(
positions
&
0x1
)
{
mainGame
->
imageLoading
.
insert
(
std
::
make_pair
(
mainGame
->
btnPSAU
,
code
));
mainGame
->
btnPSAU
->
setRelativePosition
(
rect
<
s32
>
(
startpos
*
mainGame
->
xScale
,
20
*
mainGame
->
yScale
,
(
startpos
+
140
)
*
mainGame
->
xScale
,
160
*
mainGame
->
yScale
));
...
...
@@ -1854,6 +1851,14 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
btnPSDD
->
setVisible
(
true
);
startpos
+=
150
;
}
else
mainGame
->
btnPSDD
->
setVisible
(
false
);
recti
pos
=
mainGame
->
wPosSelect
->
getRelativePosition
();
s32
oldcenter
=
pos
.
getCenter
().
X
;
pos
.
LowerRightCorner
.
X
=
pos
.
UpperLeftCorner
.
X
+
count
*
150
*
mainGame
->
xScale
+
50
*
mainGame
->
xScale
;
s32
newwidth
=
pos
.
getWidth
();
pos
.
UpperLeftCorner
.
X
=
oldcenter
-
newwidth
/
2
;
pos
.
LowerRightCorner
.
X
=
oldcenter
+
newwidth
/
2
;
mainGame
->
wPosSelect
->
setRelativePosition
(
pos
);
mainGame
->
bgPosSelect
->
setRelativePosition
(
rect
<
s32
>
(
0
,
0
,
pos
.
getWidth
(),
pos
.
getHeight
()));
mainGame
->
gMutex
.
lock
();
mainGame
->
PopupElement
(
mainGame
->
wPosSelect
);
mainGame
->
gMutex
.
unlock
();
...
...
Classes/gframe/game.cpp
View file @
abe0cd7e
This diff is collapsed.
Click to expand it.
Classes/gframe/game.h
View file @
abe0cd7e
...
...
@@ -183,7 +183,7 @@ public:
void
CloseGameWindow
();
void
CloseDuelWindow
();
void
OnGameClose
();
void
ChangeToIGUIImageWindow
(
irr
::
gui
::
IGUIWindow
*
window
,
irr
::
gui
::
IGUIImage
*
bgwindow
,
irr
::
video
::
ITexture
*
image
);
void
ChangeToIGUIImageWindow
(
irr
::
gui
::
IGUIWindow
*
window
,
irr
::
gui
::
IGUIImage
*
*
pWindowBackground
,
irr
::
video
::
ITexture
*
image
);
void
ChangeToIGUIImageButton
(
irr
::
gui
::
IGUIButton
*
button
,
irr
::
video
::
ITexture
*
image
,
irr
::
video
::
ITexture
*
pressedImage
,
irr
::
gui
::
CGUITTFont
*
font
=
0
);
int
LocalPlayer
(
int
player
);
...
...
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