Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
ab6e84b9
Commit
ab6e84b9
authored
Oct 27, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
103869cc
e8b8599b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
6 deletions
+17
-6
gframe/event_handler.cpp
gframe/event_handler.cpp
+13
-4
gframe/game.cpp
gframe/game.cpp
+3
-1
gframe/game.h
gframe/game.h
+1
-0
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+0
-1
No files found.
gframe/event_handler.cpp
View file @
ab6e84b9
...
...
@@ -54,7 +54,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
mainGame
->
btnReplayStart
->
setVisible
(
false
);
mainGame
->
btnReplaySwap
->
setVisible
(
false
);
mainGame
->
btnReplayPause
->
setVisible
(
true
);
mainGame
->
btnReplayStep
->
setVisible
(
false
);
mainGame
->
btnReplayUndo
->
setVisible
(
false
);
...
...
@@ -66,7 +65,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
mainGame
->
btnReplayStart
->
setVisible
(
true
);
mainGame
->
btnReplaySwap
->
setVisible
(
true
);
mainGame
->
btnReplayPause
->
setVisible
(
false
);
mainGame
->
btnReplayStep
->
setVisible
(
true
);
mainGame
->
btnReplayUndo
->
setVisible
(
true
);
...
...
@@ -1011,6 +1009,9 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
ClearCardInfo
(
mcard
->
controler
);
}
}
if
(
id
==
TEXT_CARD_LIST_TIP
)
{
mainGame
->
stCardListTip
->
setVisible
(
true
);
}
break
;
}
case
irr
:
:
gui
::
EGET_ELEMENT_LEFT
:
{
...
...
@@ -1026,6 +1027,9 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
SetShowMark
(
mcard
,
false
);
mainGame
->
stCardListTip
->
setVisible
(
false
);
}
if
(
id
==
TEXT_CARD_LIST_TIP
)
{
mainGame
->
stCardListTip
->
setVisible
(
false
);
}
break
;
}
default:
...
...
@@ -2338,9 +2342,14 @@ void ClientField::ShowCardInfoInList(ClientCard* pcard, irr::gui::IGUIElement* e
irr
::
core
::
rect
<
s32
>
ePos
=
element
->
getRelativePosition
();
s32
x
=
(
ePos
.
UpperLeftCorner
.
X
+
ePos
.
LowerRightCorner
.
X
)
/
2
;
s32
y
=
ePos
.
LowerRightCorner
.
Y
;
mainGame
->
SetStaticText
(
mainGame
->
stCardListTip
,
16
0
,
mainGame
->
guiFont
,
str
.
c_str
());
mainGame
->
SetStaticText
(
mainGame
->
stCardListTip
,
32
0
,
mainGame
->
guiFont
,
str
.
c_str
());
irr
::
core
::
dimension2d
<
unsigned
int
>
dTip
=
mainGame
->
guiFont
->
getDimension
(
mainGame
->
stCardListTip
->
getText
())
+
irr
::
core
::
dimension2d
<
unsigned
int
>
(
10
,
10
);
mainGame
->
stCardListTip
->
setRelativePosition
(
recti
(
x
-
dTip
.
Width
/
2
,
y
-
10
,
x
+
dTip
.
Width
/
2
,
y
-
10
+
dTip
.
Height
));
s32
w
=
dTip
.
Width
/
2
;
if
(
x
-
w
<
10
)
x
=
w
+
10
;
if
(
x
+
w
>
670
)
x
=
670
-
w
;
mainGame
->
stCardListTip
->
setRelativePosition
(
recti
(
x
-
w
,
y
-
10
,
x
+
w
,
y
-
10
+
dTip
.
Height
));
mainGame
->
stCardListTip
->
setVisible
(
true
);
}
}
...
...
gframe/game.cpp
View file @
ab6e84b9
...
...
@@ -750,7 +750,7 @@ bool Game::Initialize() {
stTip
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
stTip
->
setVisible
(
false
);
//tip for cards in select / display list
stCardListTip
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
0
,
0
,
150
,
150
),
false
,
true
,
wCardSelect
,
-
1
,
true
);
stCardListTip
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
0
,
0
,
150
,
150
),
false
,
true
,
wCardSelect
,
TEXT_CARD_LIST_TIP
,
true
);
stCardListTip
->
setBackgroundColor
(
0xc0ffffff
);
stCardListTip
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
stCardListTip
->
setVisible
(
false
);
...
...
@@ -1954,6 +1954,7 @@ void Game::OnResize() {
s32
tabHelperLastY
=
elmTabHelperLast
->
getRelativePosition
().
LowerRightCorner
.
Y
;
if
(
tabHelperLastY
>
tabHelperPos
.
LowerRightCorner
.
Y
)
{
scrTabHelper
->
setMax
(
tabHelperLastY
-
tabHelperPos
.
LowerRightCorner
.
Y
+
5
);
scrTabHelper
->
setPos
(
0
);
scrTabHelper
->
setVisible
(
true
);
}
else
...
...
@@ -1965,6 +1966,7 @@ void Game::OnResize() {
s32
tabSystemLastY
=
elmTabSystemLast
->
getRelativePosition
().
LowerRightCorner
.
Y
;
if
(
tabSystemLastY
>
tabSystemPos
.
LowerRightCorner
.
Y
)
{
scrTabSystem
->
setMax
(
tabSystemLastY
-
tabSystemPos
.
LowerRightCorner
.
Y
+
5
);
scrTabSystem
->
setPos
(
0
);
scrTabSystem
->
setVisible
(
true
);
}
else
scrTabSystem
->
setVisible
(
false
);
...
...
gframe/game.h
View file @
ab6e84b9
...
...
@@ -634,6 +634,7 @@ extern Game* mainGame;
#define BUTTON_CARD_4 234
#define SCROLL_CARD_SELECT 235
#define BUTTON_CARD_SEL_OK 236
#define TEXT_CARD_LIST_TIP 237
#define BUTTON_CMD_ACTIVATE 240
#define BUTTON_CMD_SUMMON 241
#define BUTTON_CMD_SPSUMMON 242
...
...
gframe/menu_handler.cpp
View file @
ab6e84b9
...
...
@@ -228,7 +228,6 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
wReplay
->
setVisible
(
true
);
mainGame
->
wReplayControl
->
setVisible
(
true
);
mainGame
->
btnReplayStart
->
setVisible
(
false
);
mainGame
->
btnReplaySwap
->
setVisible
(
false
);
mainGame
->
btnReplayPause
->
setVisible
(
true
);
mainGame
->
btnReplayStep
->
setVisible
(
false
);
mainGame
->
btnReplayUndo
->
setVisible
(
false
);
...
...
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