Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
nanahira
ygopro
Commits
818c847b
Commit
818c847b
authored
Mar 22, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'resize' into test
parents
466b7970
b7a06066
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
4 deletions
+18
-4
gframe/deck_con.cpp
gframe/deck_con.cpp
+2
-0
gframe/event_handler.cpp
gframe/event_handler.cpp
+3
-0
gframe/game.cpp
gframe/game.cpp
+10
-3
gframe/game.h
gframe/game.h
+2
-1
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+1
-0
No files found.
gframe/deck_con.cpp
View file @
818c847b
...
...
@@ -102,6 +102,7 @@ void DeckBuilder::Terminate() {
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
mainGame
->
wACMessage
->
setVisible
(
false
);
mainGame
->
ClearTextures
();
mainGame
->
showingcode
=
0
;
mainGame
->
scrFilter
->
setVisible
(
false
);
int
sel
=
mainGame
->
cbDBDecks
->
getSelected
();
if
(
sel
>=
0
)
...
...
@@ -235,6 +236,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
}
mainGame
->
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
mainGame
->
showingcode
=
0
;
char
deckbuf
[
1024
];
char
*
pdeck
=
deckbuf
;
BufferIO
::
WriteInt32
(
pdeck
,
deckManager
.
current_deck
.
main
.
size
()
+
deckManager
.
current_deck
.
extra
.
size
());
...
...
gframe/event_handler.cpp
View file @
818c847b
...
...
@@ -967,6 +967,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
ShowCardInfo
(
mcard
->
code
);
}
else
{
mainGame
->
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
mainGame
->
showingcode
=
0
;
mainGame
->
stName
->
setText
(
L""
);
mainGame
->
stInfo
->
setText
(
L""
);
mainGame
->
stDataInfo
->
setText
(
L""
);
...
...
@@ -982,6 +983,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
ShowCardInfo
(
mcard
->
code
);
}
else
{
mainGame
->
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
mainGame
->
showingcode
=
0
;
mainGame
->
stName
->
setText
(
L""
);
mainGame
->
stInfo
->
setText
(
L""
);
mainGame
->
stDataInfo
->
setText
(
L""
);
...
...
@@ -1548,6 +1550,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
else
{
should_show_tip
=
false
;
mainGame
->
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
mainGame
->
showingcode
=
0
;
mainGame
->
stName
->
setText
(
L""
);
mainGame
->
stInfo
->
setText
(
L""
);
mainGame
->
stDataInfo
->
setText
(
L""
);
...
...
gframe/game.cpp
View file @
818c847b
...
...
@@ -229,6 +229,8 @@ bool Game::Initialize() {
wCardImg
->
setVisible
(
false
);
imgCard
=
env
->
addImage
(
rect
<
s32
>
(
10
,
9
,
10
+
CARD_IMG_WIDTH
,
9
+
CARD_IMG_HEIGHT
),
wCardImg
);
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
showingcode
=
0
;
imgCard
->
setScaleImage
(
true
);
imgCard
->
setUseAlphaChannel
(
true
);
//phase
wPhase
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
480
,
310
,
855
,
330
));
...
...
@@ -1245,7 +1247,9 @@ void Game::SaveConfig() {
fprintf
(
fp
,
"music_mode = %d
\n
"
,
(
chkMusicMode
->
isChecked
()
?
1
:
0
));
fclose
(
fp
);
}
void
Game
::
ShowCardInfo
(
int
code
)
{
void
Game
::
ShowCardInfo
(
int
code
,
bool
resize
)
{
if
(
showingcode
==
code
&&
!
resize
)
return
;
CardData
cd
;
wchar_t
formatBuffer
[
256
];
if
(
!
dataManager
.
GetData
(
code
,
&
cd
))
...
...
@@ -1317,6 +1321,7 @@ void Game::ShowCardInfo(int code) {
stText
->
setRelativePosition
(
rect
<
s32
>
(
15
,
60
+
offset
,
287
*
xScale
,
324
*
yScale
));
scrCardText
->
setRelativePosition
(
rect
<
s32
>
(
287
*
xScale
-
20
,
60
+
offset
,
287
*
xScale
,
324
*
yScale
));
}
showingcode
=
code
;
showingtext
=
dataManager
.
GetText
(
code
);
const
auto
&
tsize
=
stText
->
getRelativePosition
();
InitStaticText
(
stText
,
tsize
.
getWidth
(),
tsize
.
getHeight
(),
textFont
,
showingtext
);
...
...
@@ -1389,6 +1394,8 @@ void Game::AddDebugMsg(char* msg)
void
Game
::
ClearTextures
()
{
matManager
.
mCard
.
setTexture
(
0
,
0
);
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
scrCardText
->
setVisible
(
false
);
imgCard
->
setScaleImage
(
true
);
btnPSAU
->
setImage
();
btnPSDU
->
setImage
();
for
(
int
i
=
0
;
i
<=
4
;
++
i
)
{
...
...
@@ -1563,8 +1570,8 @@ void Game::OnResize() {
stName
->
setRelativePosition
(
recti
(
10
,
10
,
287
*
xScale
,
32
));
lstLog
->
setRelativePosition
(
Resize
(
10
,
10
,
290
,
290
));
//const auto& tsize = stText->getRelativePosition();
//if(showingcard
)
// ShowCardInfo(showingcard
, true);
if
(
showingcode
)
ShowCardInfo
(
showingcode
,
true
);
btnClearLog
->
setRelativePosition
(
Resize
(
160
,
300
,
260
,
325
));
wPhase
->
setRelativePosition
(
Resize
(
480
,
310
,
855
,
330
));
...
...
gframe/game.h
View file @
818c847b
...
...
@@ -133,7 +133,7 @@ public:
void
DrawDeckBd
();
void
LoadConfig
();
void
SaveConfig
();
void
ShowCardInfo
(
int
code
);
void
ShowCardInfo
(
int
code
,
bool
resize
=
false
);
void
AddChatMsg
(
wchar_t
*
msg
,
int
player
);
void
AddDebugMsg
(
char
*
msgbuf
);
void
ClearTextures
();
...
...
@@ -183,6 +183,7 @@ public:
int
waitFrame
;
int
signalFrame
;
int
actionParam
;
int
showingcode
;
const
wchar_t
*
showingtext
;
int
showcard
;
int
showcardcode
;
...
...
gframe/menu_handler.cpp
View file @
818c847b
...
...
@@ -231,6 +231,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
break
;
}
mainGame
->
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
mainGame
->
showingcode
=
0
;
mainGame
->
wCardImg
->
setVisible
(
true
);
mainGame
->
wInfos
->
setVisible
(
true
);
mainGame
->
wReplay
->
setVisible
(
true
);
...
...
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