Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_TakeScreenshotDebugToolbarAction.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_BaseContainerCustomTitleUIInfo
(
"m_Info"
)]
2
class
SCR_TakeScreenshotDebugToolbarAction
:
SCR_EditorToolbarAction
3
{
4
[
Attribute
(
"600"
)]
5
protected
int
m_iResolutionX
;
// save dimension
6
7
[
Attribute
(
"338"
)]
8
protected
int
m_iResolutionY
;
// save dimension
9
10
protected
ref
ImageWidget
m_wScreenshotDebug
;
11
12
//------------------------------------------------------------------------------------------------
13
override
void
OnInit
(SCR_ActionsToolbarEditorUIComponent toolbar)
14
{
15
if
(
DiagMenu
.GetBool(
SCR_DebugMenuID
.DEBUGUI_EDITOR_SAVE_PHOTO_SCREENSHOT_SHOW))
16
CreateDebug
();
17
}
18
19
//------------------------------------------------------------------------------------------------
20
override
void
OnExit
(SCR_ActionsToolbarEditorUIComponent toolbar)
21
{
22
DestroyDebug
();
23
}
24
25
//------------------------------------------------------------------------------------------------
26
override
bool
CanBeShown
(
SCR_EditableEntityComponent
hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities,
vector
cursorWorldPosition,
int
flags
)
27
{
28
return
m_wScreenshotDebug
&&
DiagMenu
.GetBool(
SCR_DebugMenuID
.DEBUGUI_EDITOR_SAVE_PHOTO_SCREENSHOT_SHOW);
29
}
30
31
//------------------------------------------------------------------------------------------------
32
override
bool
CanBePerformed
(
SCR_EditableEntityComponent
hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities,
vector
cursorWorldPosition,
int
flags
)
33
{
34
return
m_wScreenshotDebug
&&
DiagMenu
.GetBool(
SCR_DebugMenuID
.DEBUGUI_EDITOR_SAVE_PHOTO_SCREENSHOT_SHOW);
35
}
36
37
//------------------------------------------------------------------------------------------------
38
override
void
Perform
(
SCR_EditableEntityComponent
hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities,
vector
cursorWorldPosition,
int
flags
,
int
param = -1)
39
{
40
if
(!
m_wScreenshotDebug
)
41
return
;
42
43
CaptureImageDebug
();
44
}
45
46
//------------------------------------------------------------------------------------------------
48
void
CaptureImageDebug
()
49
{
50
SCR_PhotoSaveModeEditorUIComponent
.
CaptureImageDebug
(
m_iResolutionX
,
m_iResolutionY
,
m_wScreenshotDebug
);
51
}
52
53
//---------------------------------------------------------------------------------------------
54
protected
void
CreateDebug
()
55
{
56
if
(!
m_wScreenshotDebug
)
57
{
58
WorkspaceWidget
workspace =
GetGame
().GetWorkspace();
59
if
(!workspace)
60
return
;
61
62
m_wScreenshotDebug
=
ImageWidget
.Cast(workspace.CreateWidget(
WidgetType
.ImageWidgetTypeID,
WidgetFlags
.IGNORE_CURSOR,
Color
.White, 0));
63
m_wScreenshotDebug
.SetSize(
m_iResolutionX
,
m_iResolutionY
);
64
FrameSlot
.SetSizeToContent(
m_wScreenshotDebug
,
true
);
65
FrameSlot
.SetPos(
m_wScreenshotDebug
, 0, 0);
66
}
67
}
68
69
//---------------------------------------------------------------------------------------------
70
protected
void
DestroyDebug
()
71
{
72
if
(
m_wScreenshotDebug
)
73
m_wScreenshotDebug
.RemoveFromHierarchy();
74
}
75
}
flags
SCR_EAIThreatSectorFlags flags
Definition
AIControlComponentSerializer.c:16
SCR_DebugMenuID
SCR_DebugMenuID
This enum contains all IDs for DiagMenu entries added in script.
Definition
DebugMenuID.c:4
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_BaseContainerCustomTitleUIInfo
class SCR_ArsenalGameModeUIDataHolder SCR_BaseContainerCustomTitleUIInfo("m_UIInfo")
Definition
SCR_ArsenalManagerComponent.c:1752
Color
Definition
Color.c:13
DiagMenu
Diagnostic and developer menu system.
Definition
DiagMenu.c:18
FrameSlot
Definition
FrameSlot.c:13
ImageWidget
Definition
ImageWidget.c:13
SCR_EditableEntityComponent
Definition
SCR_EditableEntityComponent.c:14
SCR_EditorToolbarAction
Definition
SCR_EditorToolbarAction.c:4
SCR_PhotoSaveModeEditorUIComponent
Definition
SCR_PhotoSaveModeEditorUIComponent.c:2
SCR_PhotoSaveModeEditorUIComponent::CaptureImageDebug
static void CaptureImageDebug(int resolutionX, int resolutionY, notnull ImageWidget outputWidget)
Capture image of current camere view [DEBUG].
Definition
SCR_PhotoSaveModeEditorUIComponent.c:146
SCR_TakeScreenshotDebugToolbarAction
Definition
SCR_TakeScreenshotDebugToolbarAction.c:3
SCR_TakeScreenshotDebugToolbarAction::CaptureImageDebug
void CaptureImageDebug()
Capture image of current camere view.
Definition
SCR_TakeScreenshotDebugToolbarAction.c:48
SCR_TakeScreenshotDebugToolbarAction::DestroyDebug
void DestroyDebug()
Definition
SCR_TakeScreenshotDebugToolbarAction.c:70
SCR_TakeScreenshotDebugToolbarAction::m_iResolutionX
int m_iResolutionX
Definition
SCR_TakeScreenshotDebugToolbarAction.c:5
SCR_TakeScreenshotDebugToolbarAction::m_iResolutionY
int m_iResolutionY
Definition
SCR_TakeScreenshotDebugToolbarAction.c:8
SCR_TakeScreenshotDebugToolbarAction::CanBeShown
override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags)
Definition
SCR_TakeScreenshotDebugToolbarAction.c:26
SCR_TakeScreenshotDebugToolbarAction::OnInit
override void OnInit(SCR_ActionsToolbarEditorUIComponent toolbar)
Definition
SCR_TakeScreenshotDebugToolbarAction.c:13
SCR_TakeScreenshotDebugToolbarAction::OnExit
override void OnExit(SCR_ActionsToolbarEditorUIComponent toolbar)
Definition
SCR_TakeScreenshotDebugToolbarAction.c:20
SCR_TakeScreenshotDebugToolbarAction::m_wScreenshotDebug
ref ImageWidget m_wScreenshotDebug
Definition
SCR_TakeScreenshotDebugToolbarAction.c:10
SCR_TakeScreenshotDebugToolbarAction::CreateDebug
void CreateDebug()
Definition
SCR_TakeScreenshotDebugToolbarAction.c:54
SCR_TakeScreenshotDebugToolbarAction::CanBePerformed
override bool CanBePerformed(SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags)
Definition
SCR_TakeScreenshotDebugToolbarAction.c:32
SCR_TakeScreenshotDebugToolbarAction::Perform
override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags, int param=-1)
Definition
SCR_TakeScreenshotDebugToolbarAction.c:38
WidgetType
Definition
EnWidgets.c:13
WorkspaceWidget
Definition
WorkspaceWidget.c:16
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
WidgetFlags
WidgetFlags
Widget flags. See enf::Widget::SetFlags().
Definition
WidgetFlags.c:14
scripts
Game
Editor
Containers
Actions
ToolbarActions
SCR_TakeScreenshotDebugToolbarAction.c
Generated by
1.17.0