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
YGOPRO-520DIY
ygopro
Commits
8f9fcbd6
Commit
8f9fcbd6
authored
Feb 20, 2025
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix namespace irr::gui
parent
6c53d02a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
20 deletions
+19
-20
gframe/config.h
gframe/config.h
+0
-1
gframe/event_handler.cpp
gframe/event_handler.cpp
+12
-12
gframe/game.cpp
gframe/game.cpp
+5
-5
gframe/game.h
gframe/game.h
+2
-2
No files found.
gframe/config.h
View file @
8f9fcbd6
...
...
@@ -78,7 +78,6 @@ using namespace core;
using
namespace
scene
;
using
namespace
video
;
using
namespace
io
;
using
namespace
gui
;
extern
const
unsigned
short
PRO_VERSION
;
extern
unsigned
int
enable_log
;
...
...
gframe/event_handler.cpp
View file @
8f9fcbd6
...
...
@@ -1718,7 +1718,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
irr
:
:
EET_KEY_INPUT_EVENT
:
{
switch
(
event
.
KeyInput
.
Key
)
{
case
irr
:
:
KEY_KEY_A
:
{
if
(
mainGame
->
gameConf
.
control_mode
==
0
&&
!
mainGame
->
HasFocus
(
EGUIET_EDIT_BOX
))
{
if
(
mainGame
->
gameConf
.
control_mode
==
0
&&
!
mainGame
->
HasFocus
(
irr
::
gui
::
EGUIET_EDIT_BOX
))
{
mainGame
->
always_chain
=
event
.
KeyInput
.
PressedDown
;
mainGame
->
ignore_chain
=
false
;
mainGame
->
chain_when_avail
=
false
;
...
...
@@ -1727,7 +1727,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
}
case
irr
:
:
KEY_KEY_S
:
{
if
(
mainGame
->
gameConf
.
control_mode
==
0
&&
!
mainGame
->
HasFocus
(
EGUIET_EDIT_BOX
))
{
if
(
mainGame
->
gameConf
.
control_mode
==
0
&&
!
mainGame
->
HasFocus
(
irr
::
gui
::
EGUIET_EDIT_BOX
))
{
mainGame
->
ignore_chain
=
event
.
KeyInput
.
PressedDown
;
mainGame
->
always_chain
=
false
;
mainGame
->
chain_when_avail
=
false
;
...
...
@@ -1736,7 +1736,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
}
case
irr
:
:
KEY_KEY_D
:
{
if
(
mainGame
->
gameConf
.
control_mode
==
0
&&
!
mainGame
->
HasFocus
(
EGUIET_EDIT_BOX
))
{
if
(
mainGame
->
gameConf
.
control_mode
==
0
&&
!
mainGame
->
HasFocus
(
irr
::
gui
::
EGUIET_EDIT_BOX
))
{
mainGame
->
chain_when_avail
=
event
.
KeyInput
.
PressedDown
;
mainGame
->
always_chain
=
false
;
mainGame
->
ignore_chain
=
false
;
...
...
@@ -1753,7 +1753,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
irr
:
:
KEY_F7
:
case
irr
:
:
KEY_F8
:
{
if
(
!
event
.
KeyInput
.
PressedDown
&&
!
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
player_type
!=
7
&&
mainGame
->
dInfo
.
isStarted
&&
!
mainGame
->
wCardDisplay
->
isVisible
()
&&
!
mainGame
->
HasFocus
(
EGUIET_EDIT_BOX
))
{
&&
!
mainGame
->
wCardDisplay
->
isVisible
()
&&
!
mainGame
->
HasFocus
(
irr
::
gui
::
EGUIET_EDIT_BOX
))
{
int
loc_id
=
0
;
display_cards
.
clear
();
switch
(
event
.
KeyInput
.
Key
)
{
...
...
@@ -1833,19 +1833,19 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
s32
id
=
event
.
GUIEvent
.
Caller
->
getID
();
switch
(
event
.
GUIEvent
.
EventType
)
{
case
irr
:
:
gui
::
EGET_ELEMENT_HOVERED
:
{
if
(
event
.
GUIEvent
.
Caller
->
getType
()
==
EGUIET_EDIT_BOX
)
{
mainGame
->
SetCursor
(
event
.
GUIEvent
.
Caller
->
isEnabled
()
?
ECI_IBEAM
:
ECI_NORMAL
);
if
(
event
.
GUIEvent
.
Caller
->
getType
()
==
irr
::
gui
::
EGUIET_EDIT_BOX
)
{
mainGame
->
SetCursor
(
event
.
GUIEvent
.
Caller
->
isEnabled
()
?
irr
::
gui
::
ECI_IBEAM
:
irr
::
gui
::
ECI_NORMAL
);
return
true
;
}
if
(
event
.
GUIEvent
.
Caller
==
mainGame
->
imgCard
&&
mainGame
->
is_building
&&
!
mainGame
->
is_siding
)
{
mainGame
->
SetCursor
(
ECI_HAND
);
mainGame
->
SetCursor
(
irr
::
gui
::
ECI_HAND
);
return
true
;
}
break
;
}
case
irr
:
:
gui
::
EGET_ELEMENT_LEFT
:
{
if
(
event
.
GUIEvent
.
Caller
->
getType
()
==
EGUIET_EDIT_BOX
||
event
.
GUIEvent
.
Caller
==
mainGame
->
imgCard
)
{
mainGame
->
SetCursor
(
ECI_NORMAL
);
if
(
event
.
GUIEvent
.
Caller
->
getType
()
==
irr
::
gui
::
EGUIET_EDIT_BOX
||
event
.
GUIEvent
.
Caller
==
mainGame
->
imgCard
)
{
mainGame
->
SetCursor
(
irr
::
gui
::
ECI_NORMAL
);
return
true
;
}
break
;
...
...
@@ -2045,7 +2045,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
switch
(
event
.
KeyInput
.
Key
)
{
case
irr
:
:
KEY_KEY_R
:
{
if
(
mainGame
->
gameConf
.
control_mode
==
0
&&
!
event
.
KeyInput
.
PressedDown
&&
!
mainGame
->
HasFocus
(
EGUIET_EDIT_BOX
))
{
&&
!
event
.
KeyInput
.
PressedDown
&&
!
mainGame
->
HasFocus
(
irr
::
gui
::
EGUIET_EDIT_BOX
))
{
mainGame
->
textFont
->
setTransparency
(
true
);
mainGame
->
guiFont
->
setTransparency
(
true
);
}
...
...
@@ -2054,7 +2054,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
}
case
irr
:
:
KEY_F9
:
{
if
(
mainGame
->
gameConf
.
control_mode
==
1
&&
!
event
.
KeyInput
.
PressedDown
&&
!
mainGame
->
HasFocus
(
EGUIET_EDIT_BOX
))
{
&&
!
event
.
KeyInput
.
PressedDown
&&
!
mainGame
->
HasFocus
(
irr
::
gui
::
EGUIET_EDIT_BOX
))
{
mainGame
->
textFont
->
setTransparency
(
true
);
mainGame
->
guiFont
->
setTransparency
(
true
);
}
...
...
@@ -2062,7 +2062,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
break
;
}
case
irr
:
:
KEY_ESCAPE
:
{
if
(
!
mainGame
->
HasFocus
(
EGUIET_EDIT_BOX
))
if
(
!
mainGame
->
HasFocus
(
irr
::
gui
::
EGUIET_EDIT_BOX
))
mainGame
->
device
->
minimizeWindow
();
return
true
;
break
;
...
...
gframe/game.cpp
View file @
8f9fcbd6
...
...
@@ -970,10 +970,10 @@ bool Game::Initialize() {
}
env
->
getSkin
()
->
setFont
(
guiFont
);
env
->
setFocus
(
wMainMenu
);
for
(
u32
i
=
0
;
i
<
EGDC_COUNT
;
++
i
)
{
SColor
col
=
env
->
getSkin
()
->
getColor
((
EGUI_DEFAULT_COLOR
)
i
);
for
(
u32
i
=
0
;
i
<
irr
::
gui
::
EGDC_COUNT
;
++
i
)
{
SColor
col
=
env
->
getSkin
()
->
getColor
((
irr
::
gui
::
EGUI_DEFAULT_COLOR
)
i
);
col
.
setAlpha
(
224
);
env
->
getSkin
()
->
setColor
((
EGUI_DEFAULT_COLOR
)
i
,
col
);
env
->
getSkin
()
->
setColor
((
irr
::
gui
::
EGUI_DEFAULT_COLOR
)
i
,
col
);
}
dimension2du
size
=
driver
->
getScreenSize
();
if
(
window_size
!=
size
)
{
...
...
@@ -2165,8 +2165,8 @@ void Game::FlashWindow() {
FlashWindowEx
(
&
fi
);
#endif
}
void
Game
::
SetCursor
(
ECURSOR_ICON
icon
)
{
ICursorControl
*
cursor
=
device
->
getCursorControl
();
void
Game
::
SetCursor
(
irr
::
gui
::
ECURSOR_ICON
icon
)
{
irr
::
gui
::
ICursorControl
*
cursor
=
device
->
getCursorControl
();
if
(
cursor
->
getActiveIcon
()
!=
icon
)
{
cursor
->
setActiveIcon
(
icon
);
}
...
...
gframe/game.h
View file @
8f9fcbd6
...
...
@@ -191,7 +191,7 @@ public:
int
ChatLocalPlayer
(
int
player
);
const
wchar_t
*
LocalName
(
int
local_player
);
bool
HasFocus
(
EGUI_ELEMENT_TYPE
type
)
const
{
bool
HasFocus
(
irr
::
gui
::
EGUI_ELEMENT_TYPE
type
)
const
{
irr
::
gui
::
IGUIElement
*
focus
=
env
->
getFocus
();
return
focus
&&
focus
->
hasType
(
type
);
}
...
...
@@ -220,7 +220,7 @@ public:
void
SetWindowsIcon
();
void
SetWindowsScale
(
float
scale
);
void
FlashWindow
();
void
SetCursor
(
ECURSOR_ICON
icon
);
void
SetCursor
(
irr
::
gui
::
ECURSOR_ICON
icon
);
template
<
typename
T
>
static
void
DrawShadowText
(
irr
::
gui
::
CGUITTFont
*
font
,
const
T
&
text
,
const
core
::
rect
<
s32
>&
position
,
const
core
::
rect
<
s32
>&
padding
,
video
::
SColor
color
=
0xffffffff
,
video
::
SColor
shadowcolor
=
0xff000000
,
bool
hcenter
=
false
,
bool
vcenter
=
false
,
const
core
::
rect
<
s32
>*
clip
=
nullptr
);
...
...
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