Arma Reforger Script API
|
Map cursor behavior and mode setup. More...
Public Member Functions | |
SCR_MapCursorInfo | GetCursorInfo () |
Get cursor data class. | |
EMapCursorState | GetCursorState () |
Get cursor state. | |
void | SetWheelZoomMultiplier (float value) |
Sets zoom strength multiplier for mouse wheel zoom. | |
void | ForceCenterCursor () |
Force cursor to screen center Only use when necessarry as some methods rely on current cursor position. | |
bool | HandleDraw (bool active) |
Handle draw state. | |
bool | HandleSubMenu (bool active) |
Handle sub menu state. | |
bool | HandleDialog (bool active) |
Handle dialog state. | |
void | ToggleFastTravelDestinationSelection (bool enable) |
bool | HandleContextualMenu (bool doClose=false) |
Handle contextual menu. | |
override void | OnMapOpen (MapConfiguration config) |
SCR_MapEntity event. | |
override void | OnMapClose (MapConfiguration config) |
SCR_MapEntity event. | |
override void | Update (float timeSlice) |
Update method for frame operations. | |
void | SCR_MapCursorModule () |
Public Member Functions inherited from SCR_MapModuleBase | |
bool | IsConfigDisabled () |
Whether this module is disabled in config. | |
void | SetActive (bool active, bool isCleanup=false) |
Enable open/close events. | |
void | Init () |
Init method for cases where all modules and components should be loaded already so constructor cannot be used, called once after creation. | |
void | Update (float timeSlice) |
Update method for frame operations. | |
void | SCR_MapModuleBase () |
Dont use arguments in the contructor for this class or its children. | |
Static Public Member Functions | |
static array< Widget > | GetMapWidgetsUnderCursor () |
Get widgets under cursor. | |
Public Attributes | |
EMapCursorSelectType | m_eMultiSelType |
Static Public Attributes | |
static const EMapCursorState | CUSTOM_CURSOR_LOCKED = EMapCursorState.CS_DISABLE |
static const EMapCursorState | STATE_PAN_RESTRICTED = EMapCursorState.CS_DRAG | EMapCursorState.CS_MODIFIER | EMapCursorState.CS_CONTEXTUAL_MENU | EMapCursorState.CS_DIALOG |
static const EMapCursorState | STATE_ZOOM_RESTRICTED = EMapCursorState.CS_DRAG | EMapCursorState.CS_MODIFIER | EMapCursorState.CS_CONTEXTUAL_MENU |
static const EMapCursorState | STATE_HOVER_RESTRICTED |
static const EMapCursorState | STATE_SELECT_RESTRICTED = EMapCursorState.CS_MULTI_SELECTION | EMapCursorState.CS_CONTEXTUAL_MENU | EMapCursorState.CS_DRAG | EMapCursorState.CS_DRAW |
static const EMapCursorState | STATE_MULTISELECT_RESTRICTED = EMapCursorState.CS_DRAG | EMapCursorState.CS_DRAW | EMapCursorState.CS_CONTEXTUAL_MENU | EMapCursorState.CS_MODIFIER |
static const EMapCursorState | STATE_DRAG_RESTRICTED = EMapCursorState.CS_CONTEXTUAL_MENU | EMapCursorState.CS_MULTI_SELECTION | EMapCursorState.CS_ROTATE |
static const EMapCursorState | STATE_ROTATE_RESTRICTED = EMapCursorState.CS_PAN | EMapCursorState.CS_ZOOM | EMapCursorState.CS_CONTEXTUAL_MENU |
static const EMapCursorState | STATE_DRAW_RESTRICTED = EMapCursorState.CS_PAN | EMapCursorState.CS_ZOOM | EMapCursorState.CS_CONTEXTUAL_MENU | EMapCursorState.CS_DIALOG |
static const EMapCursorState | STATE_SUBMENU_RESTRICTED = EMapCursorState.CS_CONTEXTUAL_MENU | EMapCursorState.CS_DIALOG |
static const EMapCursorState | STATE_CTXMENU_RESTRICTED = EMapCursorState.CS_DRAG | EMapCursorState.CS_DRAW | EMapCursorState.CS_ROTATE |
static const EMapCursorState | STATE_RESET_RESTRICTED = EMapCursorState.CS_DRAG | EMapCursorState.CS_DRAW | EMapCursorState.CS_ROTATE |
static const EMapCursorState | STATE_POPUP_RESTRICTED = EMapCursorState.CS_PAN | EMapCursorState.CS_DRAW | EMapCursorState.CS_ROTATE |
Protected Member Functions | |
void | SetCursorState (EMapCursorState state) |
Set cursor state. | |
void | UnsetCursorState (EMapCursorState state) |
Unset cursor state. | |
void | SetCursorType (EMapCursorState type) |
Sets cursor type - visual style. | |
void | SetCrosshairGridVisible (bool state) |
Set visibility of a custom crosshair grid lines. | |
void | OnInputDeviceIsGamepad (bool isGamepad) |
Sets active device - KB+M or controller. | |
void | HandleMove () |
Handle move state. | |
void | HandlePan (float timeSlice) |
Handle pan. | |
void | HandleZoom () |
Handle zoom. | |
void | HandleHover (float timeSlice) |
Handle hover state displaying details over target. | |
void | HandleSelect () |
Handle select state. | |
void | HandleMultiSelect (bool activate) |
Handle multi select - rectangular selection. | |
void | HandleDrag (bool startDrag) |
Handle drag state. | |
void | HandleRotateTool (bool startRotate) |
Handle rotate map tool. | |
void | GetCursorSelection (out array< MapItem > mapItems) |
Acquires array of map items for multi selection based on selection mode. | |
void | GetCursorPosition (out int x, out int y) |
Actual cursor position screen (DPI Unscaled) | |
void | TestEdgePan (inout float x, inout float y, int screenX, int screenY) |
Window edge pan. | |
void | OnInputPanDrag (float value, EActionTrigger reason) |
Digital pan input for activating drag mode. | |
void | OnInputPanH (float value, EActionTrigger reason) |
Digital pan KBM. | |
void | OnInputPanV (float value, EActionTrigger reason) |
Digital pan vertical. | |
void | OnInputPanHGamepad (float value, EActionTrigger reason) |
Analog pan horizontal. | |
void | OnInputPanVGamepad (float value, EActionTrigger reason) |
Analog pan vertical. | |
void | CalculatePan (float direction, EMapPanMode panMode, float multiPlier) |
Process pan. | |
void | OnInputGamepadCursorH (float value, EActionTrigger reason) |
Cursor motion horizontal. | |
void | OnInputGamepadCursorV (float value, EActionTrigger reason) |
Cursor motion vertical. | |
void | OnInputZoom (float value, EActionTrigger reason) |
Digital zoom. | |
void | OnInputZoomWheelUp (float value, EActionTrigger reason) |
Digital zoom mouse wheel. | |
void | OnInputZoomWheelDown (float value, EActionTrigger reason) |
Digital zoom mouse wheel. | |
void | OnInputDrag (float value, EActionTrigger reason) |
Digital drag. | |
void | OnInputDragToggle (float value, EActionTrigger reason) |
Digital drag toggle. | |
void | OnInputModifier (float value, EActionTrigger reason) |
Digital modifier key. | |
void | OnInputModifClick (float value, EActionTrigger reason) |
Digital click. | |
void | OnInputMultiSel (float value, EActionTrigger reason) |
Digital multiselect mouse. | |
void | OnInputMultiSelGamepad (float value, EActionTrigger reason) |
Digital multiselect gamepad. | |
void | OnPauseMenuOpened () |
PauseMenuUI event. | |
void | OnPauseMenuClosed () |
PauseMenuUI event. | |
SCR_CursorVisualState | GetCursorStateCfg () |
Get cursor visual state config. | |
void | UpdateCrosshairUI () |
Update crosshair UI. | |
void | InitWidgets (Widget root) |
Initialize widgets. | |
void | InitInputs () |
Initialize inputs. | |
void | CleanupInputs () |
Cleanup inputs. | |
void | OnMapOpen (MapConfiguration config) |
SCR_MapEntity event. | |
void | OnMapClose (MapConfiguration config) |
SCR_MapEntity event. | |
Static Protected Member Functions | |
static void | TraceMapWidgets () |
Trace widgets under cursor. | |
Static Protected Attributes | |
static bool | m_bRecentlyTraced |
static ref array< Widget > | s_aTracedWidgets = {} |
const int | CURSOR_CAPTURE_OFFSET = 10 |
const int | GUILDING_LINE_WIDTH = 16 |
const float | PAN_DEFAULT_COUNTDOWN = 0.1 |
const float | SINGLE_SELECTION_RANGE = 50.0 |
const float | CIRCLE_SELECTION_RANGE = 500.0 |
const float | FREE_CURSOR_RESET = 3.0 |
Map cursor behavior and mode setup.
void SCR_MapCursorModule.SCR_MapCursorModule | ( | ) |
|
protected |
Process pan.
direction | determines direction of digital inputs for the horizontal/vertical axis |
panMode | is mode of panning |
multiPlier | is configurable speed adjustment |
|
protected |
Cleanup inputs.
void SCR_MapCursorModule.ForceCenterCursor | ( | ) |
Force cursor to screen center Only use when necessarry as some methods rely on current cursor position.
SCR_MapCursorInfo SCR_MapCursorModule.GetCursorInfo | ( | ) |
Get cursor data class.
|
protected |
Actual cursor position screen (DPI Unscaled)
[out] | unscaled | cursor x |
[out] | unscaled | cursor y |
|
protected |
Acquires array of map items for multi selection based on selection mode.
mapItems | are map items within selection |
screen to world conversion
get entities inside the selection rectangle
EMapCursorState SCR_MapCursorModule.GetCursorState | ( | ) |
Get cursor state.
|
protected |
Get cursor visual state config.
|
static |
Get widgets under cursor.
bool SCR_MapCursorModule.HandleContextualMenu | ( | bool | doClose = false | ) |
Handle contextual menu.
doClose | determines whether the context menu should close |
context menu disabled
bool SCR_MapCursorModule.HandleDialog | ( | bool | active | ) |
Handle dialog state.
|
protected |
Handle drag state.
startDrag | determines whether dragging should begin or stop |
bool SCR_MapCursorModule.HandleDraw | ( | bool | active | ) |
Handle draw state.
|
protected |
Handle hover state displaying details over target.
|
protected |
Handle move state.
|
protected |
Handle multi select - rectangular selection.
|
protected |
Handle pan.
|
protected |
Handle rotate map tool.
|
protected |
Handle select state.
select disabled
bool SCR_MapCursorModule.HandleSubMenu | ( | bool | active | ) |
Handle sub menu state.
|
protected |
Handle zoom.
zoom disabled
|
protected |
Initialize inputs.
|
protected |
Initialize widgets.
|
protected |
Sets active device - KB+M or controller.
|
protected |
Digital drag.
|
protected |
Digital drag toggle.
|
protected |
Cursor motion horizontal.
|
protected |
Cursor motion vertical.
|
protected |
Digital click.
|
protected |
Digital modifier key.
|
protected |
Digital multiselect mouse.
|
protected |
Digital multiselect gamepad.
|
protected |
Digital pan input for activating drag mode.
|
protected |
Digital pan KBM.
|
protected |
Analog pan horizontal.
|
protected |
Digital pan vertical.
|
protected |
Analog pan vertical.
|
protected |
Digital zoom.
zoom disabled
|
protected |
Digital zoom mouse wheel.
zoom disabled
|
protected |
Digital zoom mouse wheel.
zoom disabled
override void SCR_MapCursorModule.OnMapClose | ( | MapConfiguration | config | ) |
SCR_MapEntity event.
Implements SCR_MapModuleBase.
override void SCR_MapCursorModule.OnMapOpen | ( | MapConfiguration | config | ) |
SCR_MapEntity event.
Implements SCR_MapModuleBase.
|
protected |
PauseMenuUI event.
|
protected |
PauseMenuUI event.
|
protected |
Set visibility of a custom crosshair grid lines.
|
protected |
Set cursor state.
state | is the added state |
|
protected |
Sets cursor type - visual style.
void SCR_MapCursorModule.SetWheelZoomMultiplier | ( | float | value | ) |
Sets zoom strength multiplier for mouse wheel zoom.
|
protected |
Window edge pan.
x | is scaled cursor pos x |
y | is scaled cursor pos y |
screenX | is screen size x |
screenY | is screen size y |
void SCR_MapCursorModule.ToggleFastTravelDestinationSelection | ( | bool | enable | ) |
|
staticprotected |
Trace widgets under cursor.
|
protected |
Unset cursor state.
state | is the removed state |
override void SCR_MapCursorModule.Update | ( | float | timeSlice | ) |
Update method for frame operations.
Implements SCR_MapModuleBase.
|
protected |
Update crosshair UI.
|
staticprotected |
|
staticprotected |
|
static |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
EMapCursorSelectType SCR_MapCursorModule.m_eMultiSelType |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |