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
aafa4987
Commit
aafa4987
authored
Jun 08, 2021
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "更改messagebox为wMessage"
This reverts commit
c32f16b9
.
parent
2aa3ac7b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
19 deletions
+5
-19
Classes/gframe/duelclient.cpp
Classes/gframe/duelclient.cpp
+4
-10
Classes/gframe/menu_handler.cpp
Classes/gframe/menu_handler.cpp
+1
-9
No files found.
Classes/gframe/duelclient.cpp
View file @
aafa4987
...
...
@@ -115,7 +115,6 @@ void DuelClient::ClientRead(bufferevent* bev, void* ctx) {
}
}
void
DuelClient
::
ClientEvent
(
bufferevent
*
bev
,
short
events
,
void
*
ctx
)
{
wchar_t
textBuffer
[
256
];
if
(
events
&
BEV_EVENT_CONNECTED
)
{
bool
create_game
=
(
size_t
)
ctx
!=
0
;
CTOS_PlayerInfo
cspi
;
...
...
@@ -194,17 +193,13 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
mainGame
->
wChat
->
setVisible
(
false
);
mainGame
->
soundManager
->
PlaySoundEffect
(
SoundManager
::
SFX
::
INFO
);
if
(
events
&
BEV_EVENT_EOF
)
myswprintf
(
textBuffer
,
L"%ls
\n
%ls"
,
event_string
,
dataManager
.
GetSysString
(
1401
));
else
myswprintf
(
textBuffer
,
L"%ls
\n
%ls"
,
event_string
,
dataManager
.
GetSysString
(
1402
));
mainGame
->
SetStaticText
(
mainGame
->
stMessage
,
370
*
mainGame
->
xScale
,
mainGame
->
textFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1401
));
else
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1402
));
mainGame
->
gMutex
.
unlock
();
}
else
{
mainGame
->
gMutex
.
lock
();
mainGame
->
soundManager
->
PlaySoundEffect
(
SoundManager
::
SFX
::
INFO
);
myswprintf
(
textBuffer
,
L"%ls
\n
%ls"
,
event_string
,
dataManager
.
GetSysString
(
1502
));
mainGame
->
SetStaticText
(
mainGame
->
stMessage
,
370
*
mainGame
->
xScale
,
mainGame
->
textFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1502
));
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
...
...
@@ -317,8 +312,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
}
}
mainGame
->
soundManager
->
PlaySoundEffect
(
SoundManager
::
SFX
::
INFO
);
mainGame
->
SetStaticText
(
mainGame
->
stMessage
,
370
*
mainGame
->
xScale
,
mainGame
->
textFont
,
msgbuf
);
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
env
->
addMessageBox
(
L""
,
msgbuf
);
mainGame
->
cbCategorySelect
->
setEnabled
(
true
);
mainGame
->
cbDeckSelect
->
setEnabled
(
true
);
mainGame
->
gMutex
.
unlock
();
...
...
Classes/gframe/menu_handler.cpp
View file @
aafa4987
...
...
@@ -42,7 +42,6 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
}
#endif
switch
(
event
.
EventType
)
{
wchar_t
textBuffer
[
256
];
case
irr
:
:
EET_GUI_EVENT
:
{
irr
::
gui
::
IGUIElement
*
caller
=
event
.
GUIEvent
.
Caller
;
s32
id
=
caller
->
getID
();
...
...
@@ -61,11 +60,6 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
else
mainGame
->
soundManager
->
PlaySoundEffect
(
SoundManager
::
SFX
::
BUTTON
);
switch
(
id
)
{
case
BUTTON_MSG_OK
:
{
mainGame
->
soundManager
->
PlaySoundEffect
(
SoundManager
::
SFX
::
BUTTON
);
mainGame
->
HideElement
(
mainGame
->
wMessage
);
break
;
}
case
BUTTON_MODE_EXIT
:
{
mainGame
->
soundManager
->
StopBGM
();
mainGame
->
SaveConfig
();
...
...
@@ -104,9 +98,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
if
(
status
!=
0
)
{
mainGame
->
gMutex
.
lock
();
mainGame
->
soundManager
->
PlaySoundEffect
(
SoundManager
::
SFX
::
INFO
);
myswprintf
(
textBuffer
,
L"%ls
\n
%ls"
,
dataManager
.
GetSysString
(
1412
));
mainGame
->
SetStaticText
(
mainGame
->
stMessage
,
370
*
mainGame
->
xScale
,
mainGame
->
textFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1412
));
mainGame
->
gMutex
.
unlock
();
break
;
}
else
{
...
...
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