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
dbd18810
Commit
dbd18810
authored
Oct 22, 2018
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
显示墓地取对象标签
parent
d340d812
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
2 deletions
+59
-2
Classes/gframe/client_field.h
Classes/gframe/client_field.h
+1
-0
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+47
-0
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+5
-0
Classes/gframe/game.h
Classes/gframe/game.h
+1
-0
mobile/assets/data/conf/strings.conf
mobile/assets/data/conf/strings.conf
+2
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/plus/DialogPlus.java
...src/main/java/cn/garymb/ygomobile/ui/plus/DialogPlus.java
+3
-2
No files found.
Classes/gframe/client_field.h
View file @
dbd18810
...
@@ -142,6 +142,7 @@ public:
...
@@ -142,6 +142,7 @@ public:
void
UpdateChainButtons
();
void
UpdateChainButtons
();
void
ShowCancelOrFinishButton
(
int
buttonOp
);
void
ShowCancelOrFinishButton
(
int
buttonOp
);
void
SetShowMark
(
ClientCard
*
pcard
,
bool
enable
);
void
SetShowMark
(
ClientCard
*
pcard
,
bool
enable
);
void
ShowCardInfoInList
(
ClientCard
*
pcard
,
irr
::
gui
::
IGUIElement
*
element
,
irr
::
gui
::
IGUIElement
*
parent
);
void
SetResponseSelectedCards
()
const
;
void
SetResponseSelectedCards
()
const
;
void
SetResponseSelectedOption
()
const
;
void
SetResponseSelectedOption
()
const
;
void
CancelOrFinish
();
void
CancelOrFinish
();
...
...
Classes/gframe/event_handler.cpp
View file @
dbd18810
...
@@ -989,6 +989,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -989,6 +989,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
id
>=
BUTTON_CARD_0
&&
id
<=
BUTTON_CARD_4
)
{
if
(
id
>=
BUTTON_CARD_0
&&
id
<=
BUTTON_CARD_4
)
{
int
pos
=
mainGame
->
scrCardList
->
getPos
()
/
10
;
int
pos
=
mainGame
->
scrCardList
->
getPos
()
/
10
;
ClientCard
*
mcard
=
selectable_cards
[
id
-
BUTTON_CARD_0
+
pos
];
ClientCard
*
mcard
=
selectable_cards
[
id
-
BUTTON_CARD_0
+
pos
];
SetShowMark
(
mcard
,
true
);
ShowCardInfoInList
(
mcard
,
mainGame
->
btnCardSelect
[
id
-
BUTTON_CARD_0
],
mainGame
->
wCardSelect
);
if
(
mcard
->
code
)
{
if
(
mcard
->
code
)
{
mainGame
->
ShowCardInfo
(
mcard
->
code
);
mainGame
->
ShowCardInfo
(
mcard
->
code
);
}
else
{
}
else
{
...
@@ -998,6 +1000,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -998,6 +1000,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
id
>=
BUTTON_DISPLAY_0
&&
id
<=
BUTTON_DISPLAY_4
)
{
if
(
id
>=
BUTTON_DISPLAY_0
&&
id
<=
BUTTON_DISPLAY_4
)
{
int
pos
=
mainGame
->
scrDisplayList
->
getPos
()
/
10
;
int
pos
=
mainGame
->
scrDisplayList
->
getPos
()
/
10
;
ClientCard
*
mcard
=
display_cards
[
id
-
BUTTON_DISPLAY_0
+
pos
];
ClientCard
*
mcard
=
display_cards
[
id
-
BUTTON_DISPLAY_0
+
pos
];
SetShowMark
(
mcard
,
true
);
ShowCardInfoInList
(
mcard
,
mainGame
->
btnCardDisplay
[
id
-
BUTTON_DISPLAY_0
],
mainGame
->
wCardDisplay
);
if
(
mcard
->
code
)
{
if
(
mcard
->
code
)
{
mainGame
->
ShowCardInfo
(
mcard
->
code
);
mainGame
->
ShowCardInfo
(
mcard
->
code
);
}
else
{
}
else
{
...
@@ -1006,6 +1010,21 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1006,6 +1010,21 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
}
break
;
break
;
}
}
case
irr
:
:
gui
::
EGET_ELEMENT_LEFT
:
{
if
(
id
>=
BUTTON_CARD_0
&&
id
<=
BUTTON_CARD_4
)
{
int
pos
=
mainGame
->
scrCardList
->
getPos
()
/
10
;
ClientCard
*
mcard
=
selectable_cards
[
id
-
BUTTON_CARD_0
+
pos
];
SetShowMark
(
mcard
,
false
);
mainGame
->
stCardListTip
->
setVisible
(
false
);
}
if
(
id
>=
BUTTON_DISPLAY_0
&&
id
<=
BUTTON_DISPLAY_4
)
{
int
pos
=
mainGame
->
scrDisplayList
->
getPos
()
/
10
;
ClientCard
*
mcard
=
display_cards
[
id
-
BUTTON_DISPLAY_0
+
pos
];
SetShowMark
(
mcard
,
false
);
mainGame
->
stCardListTip
->
setVisible
(
false
);
}
break
;
}
default:
default:
break
;
break
;
}
}
...
@@ -2220,6 +2239,34 @@ void ClientField::SetShowMark(ClientCard* pcard, bool enable) {
...
@@ -2220,6 +2239,34 @@ void ClientField::SetShowMark(ClientCard* pcard, bool enable) {
chit
->
chain_card
->
is_showchaintarget
=
enable
;
chit
->
chain_card
->
is_showchaintarget
=
enable
;
}
}
}
}
void
ClientField
::
ShowCardInfoInList
(
ClientCard
*
pcard
,
irr
::
gui
::
IGUIElement
*
element
,
irr
::
gui
::
IGUIElement
*
parent
)
{
std
::
wstring
str
(
L""
);
if
(
pcard
->
code
)
{
str
.
append
(
dataManager
.
GetName
(
pcard
->
code
));
}
for
(
size_t
i
=
0
;
i
<
chains
.
size
();
++
i
)
{
wchar_t
formatBuffer
[
2048
];
auto
chit
=
chains
[
i
];
if
(
pcard
==
chit
.
chain_card
)
{
myswprintf
(
formatBuffer
,
dataManager
.
GetSysString
(
216
),
i
+
1
);
str
.
append
(
L"
\n
"
).
append
(
formatBuffer
);
}
if
(
chit
.
target
.
find
(
pcard
)
!=
chit
.
target
.
end
())
{
myswprintf
(
formatBuffer
,
dataManager
.
GetSysString
(
217
),
i
+
1
,
dataManager
.
GetName
(
chit
.
chain_card
->
code
));
str
.
append
(
L"
\n
"
).
append
(
formatBuffer
);
}
}
if
(
str
.
length
()
>
0
)
{
parent
->
addChild
(
mainGame
->
stCardListTip
);
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
,
160
,
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
)
*
mainGame
->
xScale
,
y
-
10
*
mainGame
->
yScale
,
(
x
+
dTip
.
Width
/
2
)
*
mainGame
->
xScale
,
y
-
10
+
dTip
.
Height
));
mainGame
->
stCardListTip
->
setVisible
(
true
);
}
}
void
ClientField
::
SetResponseSelectedCards
()
const
{
void
ClientField
::
SetResponseSelectedCards
()
const
{
unsigned
char
respbuf
[
64
];
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
respbuf
[
0
]
=
selected_cards
.
size
();
...
...
Classes/gframe/game.cpp
View file @
dbd18810
...
@@ -905,6 +905,11 @@ bool Game::Initialize() {
...
@@ -905,6 +905,11 @@ bool Game::Initialize() {
stTip
->
setBackgroundColor
(
0xc011113d
);
stTip
->
setBackgroundColor
(
0xc011113d
);
stTip
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
stTip
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
stTip
->
setVisible
(
false
);
stTip
->
setVisible
(
false
);
//tip for cards in select / display list
stCardListTip
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
0
,
0
,
150
*
xScale
,
150
*
yScale
),
false
,
true
,
wCardSelect
,
-
1
,
true
);
stCardListTip
->
setBackgroundColor
(
0x6011113d
);
stCardListTip
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
stCardListTip
->
setVisible
(
false
);
device
->
setEventReceiver
(
&
menuHandler
);
device
->
setEventReceiver
(
&
menuHandler
);
LoadConfig
();
LoadConfig
();
env
->
getSkin
()
->
setFont
(
guiFont
);
env
->
getSkin
()
->
setFont
(
guiFont
);
...
...
Classes/gframe/game.h
View file @
dbd18810
...
@@ -225,6 +225,7 @@ public:
...
@@ -225,6 +225,7 @@ public:
//hint text
//hint text
irr
::
gui
::
IGUIStaticText
*
stHintMsg
;
irr
::
gui
::
IGUIStaticText
*
stHintMsg
;
irr
::
gui
::
IGUIStaticText
*
stTip
;
irr
::
gui
::
IGUIStaticText
*
stTip
;
irr
::
gui
::
IGUIStaticText
*
stCardListTip
;
//infos
//infos
irr
::
gui
::
IGUITabControl
*
wInfos
;
irr
::
gui
::
IGUITabControl
*
wInfos
;
irr
::
gui
::
IGUIStaticText
*
stName
;
irr
::
gui
::
IGUIStaticText
*
stName
;
...
...
mobile/assets/data/conf/strings.conf
View file @
dbd18810
...
@@ -68,6 +68,8 @@
...
@@ -68,6 +68,8 @@
!
system
213
已选择种族:
!
system
213
已选择种族:
!
system
214
已选择属性:
!
system
214
已选择属性:
!
system
215
已选择数字:
!
system
215
已选择数字:
!
system
216
在连锁%
d
发动
!
system
217
被连锁%
d
的[%
ls
]选择为对象
!
system
500
请选择要解放的卡
!
system
500
请选择要解放的卡
!
system
501
请选择要丢弃的手卡
!
system
501
请选择要丢弃的手卡
!
system
502
请选择要破坏的卡
!
system
502
请选择要破坏的卡
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/plus/DialogPlus.java
View file @
dbd18810
...
@@ -190,7 +190,8 @@ public class DialogPlus extends Dialog {
...
@@ -190,7 +190,8 @@ public class DialogPlus extends Dialog {
}
}
return
this
;
return
this
;
}
}
public
ProgressBar
getProgressBar2
(){
public
ProgressBar
getProgressBar2
()
{
return
mProgressBar2
;
return
mProgressBar2
;
}
}
...
@@ -402,4 +403,4 @@ public class DialogPlus extends Dialog {
...
@@ -402,4 +403,4 @@ public class DialogPlus extends Dialog {
return
false
;
return
false
;
}
}
}
}
}
}
\ No newline at end of file
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