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
c6ed42f7
Commit
c6ed42f7
authored
May 06, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add screenshot
parent
bdbbdb0c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
gframe/event_handler.cpp
gframe/event_handler.cpp
+7
-0
gframe/game.cpp
gframe/game.cpp
+11
-0
gframe/game.h
gframe/game.h
+1
-0
No files found.
gframe/event_handler.cpp
View file @
c6ed42f7
...
...
@@ -1889,6 +1889,13 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return
true
;
break
;
}
case
irr
:
:
KEY_KEY_X
:
case
irr
:
:
KEY_F12
:
{
if
(
!
event
.
KeyInput
.
PressedDown
&&
!
mainGame
->
HasFocus
(
EGUIET_EDIT_BOX
))
mainGame
->
takeScreenshot
();
return
true
;
break
;
}
default:
break
;
}
break
;
...
...
gframe/game.cpp
View file @
c6ed42f7
...
...
@@ -1422,6 +1422,17 @@ void Game::FlashWindow() {
FlashWindowEx
(
&
fi
);
#endif
}
void
Game
::
takeScreenshot
()
{
irr
::
video
::
IImage
*
const
image
=
driver
->
createScreenShot
();
if
(
image
)
{
irr
::
c8
filename
[
64
];
snprintf
(
filename
,
64
,
"screenshots/ygopro_%u.png"
,
device
->
getTimer
()
->
getRealTime
());
if
(
!
driver
->
writeImageToFile
(
image
,
filename
))
device
->
getLogger
()
->
log
(
L"Failed to take screenshot."
,
irr
::
ELL_WARNING
);
image
->
drop
();
}
else
device
->
getLogger
()
->
log
(
L"Failed to take screenshot."
,
irr
::
ELL_WARNING
);
}
void
Game
::
SetCursor
(
ECURSOR_ICON
icon
)
{
ICursorControl
*
cursor
=
mainGame
->
device
->
getCursorControl
();
if
(
cursor
->
getActiveIcon
()
!=
icon
)
{
...
...
gframe/game.h
View file @
c6ed42f7
...
...
@@ -146,6 +146,7 @@ public:
void
SetWindowsIcon
();
void
FlashWindow
();
void
takeScreenshot
();
void
SetCursor
(
ECURSOR_ICON
icon
);
Mutex
gMutex
;
...
...
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