|
Arma Reforger Script API
|
Map entity. More...
Public Member Functions | |
| MapConfiguration | GetMapConfig () |
| Get map config. | |
| bool | IsOpen () |
| Check if the map is opened. | |
| int | GetMapSizeX () |
| Get map sizeX in meters. | |
| int | GetMapSizeY () |
| Get map sizeY in meters. | |
| float | GetMaxZoom () |
| Get maximal zoom. | |
| float | GetMinZoom () |
| Get minimal zoom. | |
| float | GetTargetZoomPPU () |
| Get target zoom in the form of PixelPerUnit value, which is different from current zoom if interpolation is ongoing. | |
| bool | IsZooming () |
| Get whether zoom interpolation is ongoing. | |
| vector | GetCurrentPan () |
| Get current DPIScaled pan offsets. | |
| CanvasWidget | GetMapWidget () |
| Get map widget. | |
| Widget | GetMapMenuRoot () |
| Get map menu root widget. | |
| void | SetMapWidget (Widget mapW) |
| Set map widget. | |
| MapItem | GetHoveredItem () |
| Get hovered item. | |
| void | GetMapVisibleFrame (out vector min, out vector max) |
| Return visible frame in the form of min and max point, used to ignore update of f.e. icons when they are not visible. | |
| float | GetCurrentZoom () |
| Get how much pixels per unit(meter) are currently visible on screen. | |
| void | GetMapCursorWorldPosition (out float worldX, out float worldY) |
| Get map cursor world position. | |
| void | GetMapCenterWorldPosition (out float worldX, out float worldY) |
| Get map center of screen world position. | |
| SCR_MapModuleBase | GetMapModule (TypeName moduleType) |
| Get a specific map module. | |
| SCR_MapUIBaseComponent | GetMapUIComponent (TypeName componentType) |
| Get a specific map UI component. | |
| void | OpenMap (MapConfiguration config) |
| Open the map. | |
| void | CloseMap () |
| Close the map. | |
| MapConfiguration | SetupMapConfig (EMapEntityMode mapMode, ResourceName configPath, Widget rootWidget) |
| Prepare MapConfiguration object from provided map config. | |
| void | CenterMap () |
| Center the map. | |
| void | ZoomOut () |
| Set minimal zoom and center the map. | |
| void | ShowScriptDebug () |
| Show/hide debug info table. | |
| void | SetZoom (float targetPPU, bool instant=false) |
| Set zoom value. | |
| void | ZoomSmooth (float targetPixPerUnit, float zoomTime=0.25, bool zoomToCenter=true, bool reinitZoom=false) |
| Interpolated zoom. | |
| void | ZoomPanSmooth (float targetPixPerUnit, float worldX, float worldY, float zoomTime=0.25) |
| Interpolated zoom with custom pan target for simultaneous use of zoom+pan. | |
| void | SetPan (float x, float y, bool isPanEnd=true, bool center=true) |
| Pan the map to target position, all of scripted panning is called through this. | |
| void | Pan (EMapPanMode panMode, float panValue=0) |
| Pan the map by px amount. | |
| void | PanSmooth (float panX, float panY, float panTime=0.25) |
| Interpolated pan. | |
| void | InvokeOnSelect (vector selectionPos) |
| Triggers OnSelection event. | |
| void | SelectItem (MapItem item) |
| Select target MapItem. | |
| void | HoverItem (MapItem item) |
| Set hover mode to target MapItem. | |
| void | ClearSelection () |
| Clear selected items. | |
| void | ClearHover () |
| Clear hover state. | |
| void | WorldToScreen (float worldX, float worldY, out int screenPosX, out int screenPosY, bool withPan=false) |
| Use canvas world coords to get DPIscaled screen coords, flips the y-axis. | |
| void | WorldToScreenCustom (float worldX, float worldY, out int screenPosX, out int screenPosY, float targetPPU, bool withPan=false) |
| Use canvas world coords and defined pixel per unit to get DPIscaled screen coords, flips the y-axis. | |
| void | ScreenToWorld (int screenPosX, int screenPosY, out float worldX, out float worldY) |
| Use scaled screen coords to get canvas world coords, flips the y-axis. | |
| void | ScreenToWorldNoFlip (int screenPosX, int screenPosY, out float worldX, out float worldY) |
| Use scaled screen coords to get canvas world coords without flipping the y-axis. | |
| bool | UpdateZoomBounds () |
| Calculate zoom min/max. | |
| void | DeactivateModule (SCR_MapModuleBase module) |
| Deactivate module, removing it from loadable list until config is reloaded. | |
| void | DeactivateComponent (SCR_MapUIBaseComponent component) |
| Deactivate UI component, removing it from loadable list until config is reloaded. | |
| void | UpdateViewPort () |
| Updates view port. | |
| override void | EOnFrame (IEntity owner, float timeSlice) |
| override void | EOnInit (IEntity owner) |
| void | SCR_MapEntity (IEntitySource src, IEntity parent) |
| void | ~SCR_MapEntity () |
Public Member Functions inherited from MapEntity | |
| proto external void | UpdateTexts () |
| proto external void | AbsorbData () |
| Absorb world data and create precalculated form for visualisation. | |
| proto external vector | Offset () |
| Starting offset of the map. | |
| proto external vector | Size () |
| Terrain dimensions (x, height = maxElevation-minElevation, z) | |
| proto external float | TerrainUnitScale () |
| Terrain unit scale. | |
| proto external void | SetSelection (vector start, vector end) |
| Set selection to visualise (from -> to) | |
| proto external void | ResetSelection () |
| Reset selection to visualise (from -> to) | |
| proto external void | SetFrame (vector start, vector end) |
| Set frame to visualise (from -> to) | |
| proto external void | ZoomChange (float level) |
| Set new zoom. | |
| proto external void | PosChange (float x, float y) |
| Set new pos of map. | |
| proto external void | CursorChange (float x, float y) |
| Set new pos of cursor. | |
| proto external float | MinElevation () |
| Minimal map elevation. | |
| proto external float | MaxElevation () |
| Maximal map elevation. | |
| proto external float | ElevationAt (vector pos) |
| Get elevation at coords. | |
| proto external void | ShowDiag (bool bEnable) |
| Show/ Hide diag. | |
| proto external MapItem | CreateCustomMapItem () |
| Create custom representation from script This representation has no entity and you have to support position and orientation yourself (watch MapItem Api) | |
| proto external int | CountOfVisible () |
| Count of visible. | |
| proto external MapItem | GetVisible (int iIndex) |
| Visible by index. | |
| proto external int | GetVisibleAll (out notnull array< MapItem > outItems) |
| Gets all the visible map entities in the current view. | |
| proto external int | GetInsideRect (out notnull array< MapItem > outItems, vector from, vector to) |
| Get entities in rectangle. Flips the screen y-axis before performing its operation. | |
| proto external int | GetInsideCircle (out notnull array< MapItem > outItems, vector origin, float range) |
| Get entities in circle. Flips the screen y-axis before performing its operation. | |
| proto external MapItem | GetClose (vector origin, float range) |
| Get entities in rectangle. Flips the screen y-axis before performing its operation. | |
| proto external int | GetSelected (out notnull array< MapItem > outItems) |
| Get all selected entities. | |
| proto external int | GetByType (out notnull array< MapItem > outItems, int type) |
| Get entities by descriptor type. | |
| proto external void | ResetSelected () |
| Reset all entity selection. | |
| proto external void | ResetHovering () |
| Reset all entity hovering tag. | |
| proto external void | ResetHighlighted () |
| Reset all entity highlighted tag. | |
| proto external void | ShowMultiple (int type, bool bEnable) |
| Show/ hide multiple items by type (EMapDescriptorType) of item. | |
| proto external void | ShowEditor (bool bEnable) |
| Show/ hide editor items. | |
| proto external void | ShowDebug (bool bEnable) |
| Show/ hide debug items (camera, map sizes) | |
| proto external void | EnableVisualisation (bool bValue) |
| Enable/ Disable visualisation. | |
| proto external void | EnableGrid (bool bValue) |
| Enable/ Disable grid visibility. | |
| proto external void | EnableOverlay (bool bValue) |
| Enable/ Disable overlay. | |
| proto external void | InitializeLayers (int count, int factionSize=4) |
| Clear layer setup + set new layer count. | |
| proto external int | LayerCount () |
| Get layer count. | |
| proto external MapLayer | GetLayer (int index) |
| Get layer by Index. | |
| proto external void | SetLayer (int index) |
| Set active layer. | |
| proto external int | GetLayerIndex () |
| Returns -1 if no valid index previously set. | |
| proto external void | SetImagesetMapping (notnull array< int > values) |
| Sets corresponding multiple imageset indices for MapDescriptors usage. | |
Static Public Member Functions | |
| static ScriptInvokerBase< MapConfigurationInvoker > | GetOnMapInit () |
| Get on map init invoker, caution: called during the first frame of opening the map when widget related stuff is not initialized yet. | |
| static ScriptInvokerBase< MapConfigurationInvoker > | GetOnMapOpen () |
| Get on map open invoker. | |
| static ScriptInvokerBase< MapConfigurationInvoker > | GetOnMapClose () |
| Get on map close invoker. | |
| static ScriptInvokerBase< ScriptInvokerFloat2Bool > | GetOnMapPan () |
| Get on map pan invoker. | |
| static ScriptInvokerFloat2 | GetOnMapPanEnd () |
| Get on map pan interpolated end invoker. | |
| static ScriptInvokerFloat | GetOnMapZoom () |
| Get on map zoom invoker. | |
| static ScriptInvokerFloat | GetOnMapZoomEnd () |
| Get on map zoom interpolated end invoker. | |
| static ScriptInvokerBase< MapItemInvoker > | GetOnSelectionChanged () |
| Get on selection changed invoker. | |
| static ScriptInvokerVector | GetOnSelection () |
| Get on selection invoker. | |
| static ScriptInvokerBase< MapItemInvoker > | GetOnHoverItem () |
| Get on hover item invoker. | |
| static ScriptInvokerBase< MapItemInvoker > | GetOnHoverEnd () |
| Get on hover end invoker. | |
| static ScriptInvokerInt | GetOnLayerChanged () |
| Get on layer changed invoker. | |
| static SCR_MapEntity | GetMapInstance () |
| Get map entity instance. | |
| static string | GetGridLabel (vector pos, int resMin=2, int resMax=4, string delimiter=" ") |
| Get grid coordinates for given position. | |
| static void | GetGridPos (vector pos, out int gridX, out int gridZ, int resMin=2, int resMax=4) |
| Get grid coordinates for given position. | |
Static Public Attributes | |
| const int | FRAME_DELAY = 1 |
Protected Member Functions | |
| void | OnMapOpen (MapConfiguration config) |
| Map open event. | |
| void | OnMapClose () |
| Map close event. | |
| void | OnLifeStateChanged (ECharacterLifeState previousLifeState, ECharacterLifeState newLifeState) |
| SCR_CharacterControllerComponent event Called only in case of a fullscreen map. | |
| void | OnPlayerDeleted (int playerId, IEntity player) |
| SCR_BaseGameMode event Called only in case of a fullscreen map. | |
| void | OnUserSettingsChanged () |
| Game event. | |
| void | OnWindowResized (int width, int heigth, bool windowed) |
| Game event. | |
| void | SetupLayersAndProps (inout MapConfiguration configObject, SCR_MapConfig mapCfg) |
| Layer and map properties config setup, if missing creates a default one. | |
| void | SetupDescriptorTypes (SCR_MapDescriptorDefaults descriptorDefaultsConfig) |
| Map properties config setup, matches imageset indices defined in map layout (MapWidget) to descriptor types. | |
| bool | FitPanBounds (inout float panX, inout float panY, bool center) |
| Adjust provided pan values by pan bounds conditions. | |
| void | AssignViewLayer (bool isInit) |
| Checks whether layer should change based on current zoom. | |
| void | InitLayers (MapConfiguration mapConfig) |
| Initialize layers from config. | |
| void | InitDescriptors (int layerID, MapLayer layer, SCR_LayerConfiguration layerConfig, MapConfiguration mapConfig) |
| Init visibility and default config values for descriptors based on type. | |
| void | ActivateModules (array< ref SCR_MapModuleBase > modules) |
| Activate modules. | |
| void | ActivateComponents (array< ref SCR_MapUIBaseComponent > components) |
| Activate UI components. | |
| void | ActivateOtherComponents (EMapOtherComponents componentFlags) |
| Activate other components. | |
| void | Cleanup () |
| Map close cleanup. | |
| void | PanUpdate (float timeSlice) |
| Interpolated pan update. | |
| void | ZoomUpdate (float timeSlice) |
| Interpolated zoom update. | |
| void | UpdateDebug () |
| Update map debug table. | |
| void | UpdateMap (float timeSlice) |
| Handle update of modules, components and pan/zoom interpolation. | |
Protected Member Functions inherited from MapEntity | |
| proto external void | EnableLegend (bool bValue) |
| Enable/ Disable legend. | |
Protected Attributes | |
| int | m_iDelayCounter = FRAME_DELAY |
| bool | m_bIsOpen |
| bool | m_bDoReload |
| bool | m_bDoUpdate |
| bool | m_bIsDebugMode |
| int | m_iMapSizeX |
| int | m_iMapSizeY |
| int | m_iMapOffsetX |
| int | m_iMapOffsetY |
| vector | m_vVisibleFrameMin |
| vector | m_vVisibleFrameMax |
| EMapEntityMode | m_eLastMapMode |
| Widget | m_wMapRoot |
| CanvasWidget | m_MapWidget |
| WorkspaceWidget | m_Workspace |
| ref MapConfiguration | m_ActiveMapCfg |
| MapItem | m_HoveredMapItem |
| bool | m_bIsZoomInterp |
| float | m_fZoomPPU = 1 |
| float | m_fStartPPU |
| float | m_fTargetPPU = 1 |
| float | m_fZoomTimeModif |
| float | m_fZoomSlice |
| float | m_fMinZoom = 1 |
| float | m_fMaxZoom |
| bool | m_bIsPanInterp |
| int | m_iPanX = 0 |
| int | m_iPanY = 0 |
| int | m_aStartPan [2] |
| int | m_aTargetPan [2] |
| float | m_fPanTimeModif |
| float | m_fPanSlice |
| ref array< ref SCR_MapModuleBase > | m_aActiveModules = {} |
| ref array< ref SCR_MapModuleBase > | m_aLoadedModules = {} |
| ref array< ref SCR_MapUIBaseComponent > | m_aActiveComponents = {} |
| ref array< ref SCR_MapUIBaseComponent > | m_aLoadedComponents = {} |
Static Protected Attributes | |
| static SCR_MapEntity | s_MapInstance |
| static ref ScriptInvokerBase< MapConfigurationInvoker > | s_OnMapInit = new ScriptInvokerBase<MapConfigurationInvoker>() |
| static ref ScriptInvokerBase< MapConfigurationInvoker > | s_OnMapOpen = new ScriptInvokerBase<MapConfigurationInvoker>() |
| static ref ScriptInvokerBase< MapConfigurationInvoker > | s_OnMapClose = new ScriptInvokerBase<MapConfigurationInvoker>() |
| static ref ScriptInvokerBase< ScriptInvokerFloat2Bool > | s_OnMapPan = new ScriptInvokerBase<ScriptInvokerFloat2Bool> |
| static ref ScriptInvokerFloat2 | s_OnMapPanEnd = new ScriptInvokerFloat2() |
| static ref ScriptInvokerFloat | s_OnMapZoom = new ScriptInvokerFloat() |
| static ref ScriptInvokerFloat | s_OnMapZoomEnd = new ScriptInvokerFloat() |
| static ref ScriptInvokerVector | s_OnSelection = new ScriptInvokerVector() |
| static ref ScriptInvokerInt | s_OnLayerChanged = new ScriptInvokerInt() |
| static ref ScriptInvokerBase< MapItemInvoker > | s_OnSelectionChanged = new ScriptInvokerBase<MapItemInvoker>() |
| static ref ScriptInvokerBase< MapItemInvoker > | s_OnHoverItem = new ScriptInvokerBase<MapItemInvoker>() |
| static ref ScriptInvokerBase< MapItemInvoker > | s_OnHoverEnd = new ScriptInvokerBase<MapItemInvoker>() |
Map entity.
| void SCR_MapEntity.SCR_MapEntity | ( | IEntitySource | src, |
| IEntity | parent ) |
| void SCR_MapEntity.~SCR_MapEntity | ( | ) |
|
protected |
Activate UI components.
| modules | is an array of module typenames |
|
protected |
Activate modules.
| modules | is an array of modules to activate |
|
protected |
Activate other components.
| modules | is an array of component names |
|
protected |
Checks whether layer should change based on current zoom.
| void SCR_MapEntity.CenterMap | ( | ) |
Center the map.
get current size of map(includes zoom level) in screen space
|
protected |
Map close cleanup.
| void SCR_MapEntity.ClearHover | ( | ) |
Clear hover state.
| void SCR_MapEntity.ClearSelection | ( | ) |
Clear selected items.
| void SCR_MapEntity.CloseMap | ( | ) |
Close the map.
| void SCR_MapEntity.DeactivateComponent | ( | SCR_MapUIBaseComponent | component | ) |
Deactivate UI component, removing it from loadable list until config is reloaded.
| void SCR_MapEntity.DeactivateModule | ( | SCR_MapModuleBase | module | ) |
Deactivate module, removing it from loadable list until config is reloaded.
| override void SCR_MapEntity.EOnFrame | ( | IEntity | owner, |
| float | timeSlice ) |
| override void SCR_MapEntity.EOnInit | ( | IEntity | owner | ) |
|
protected |
Adjust provided pan values by pan bounds conditions.
| panX | is UNSCALED pan offset x in px |
| panY | is UNSCALED pan offset y in px |
| vector SCR_MapEntity.GetCurrentPan | ( | ) |
Get current DPIScaled pan offsets.
| float SCR_MapEntity.GetCurrentZoom | ( | ) |
Get how much pixels per unit(meter) are currently visible on screen.
If this value is 1 and resolution is 1920x1080, then 1920 units(meters) of map will be visible
|
static |
Get grid coordinates for given position.
| pos | World position |
| resMin | Minimum grid resolution as 10^x, e.g., 2 = 100, 3 = 1000, etc. |
| resMax | Maximum grid resolution as 10^x |
| delimiter | String added between horizontal and vertical coordinate |
|
static |
Get grid coordinates for given position.
| pos | World position |
| resMin | Minimum grid resolution as 10^x, e.g., 2 = 100, 3 = 1000, etc. |
| resMax | Maximum grid resolution as 10^x |
| MapItem SCR_MapEntity.GetHoveredItem | ( | ) |
Get hovered item.
| void SCR_MapEntity.GetMapCenterWorldPosition | ( | out float | worldX, |
| out float | worldY ) |
Get map center of screen world position.
| worldX | is x coord |
| worldY | is y coord |
| MapConfiguration SCR_MapEntity.GetMapConfig | ( | ) |
Get map config.
| void SCR_MapEntity.GetMapCursorWorldPosition | ( | out float | worldX, |
| out float | worldY ) |
Get map cursor world position.
| worldX | is x coord |
| worldY | is y coord |
|
static |
Get map entity instance.
| Widget SCR_MapEntity.GetMapMenuRoot | ( | ) |
Get map menu root widget.
| SCR_MapModuleBase SCR_MapEntity.GetMapModule | ( | TypeName | moduleType | ) |
Get a specific map module.
| moduleType | is a typename of the wanted module |
| int SCR_MapEntity.GetMapSizeX | ( | ) |
Get map sizeX in meters.
| int SCR_MapEntity.GetMapSizeY | ( | ) |
Get map sizeY in meters.
| SCR_MapUIBaseComponent SCR_MapEntity.GetMapUIComponent | ( | TypeName | componentType | ) |
Get a specific map UI component.
| moduleType | is a typename of the wanted UI component |
| void SCR_MapEntity.GetMapVisibleFrame | ( | out vector | min, |
| out vector | max ) |
Return visible frame in the form of min and max point, used to ignore update of f.e. icons when they are not visible.
| CanvasWidget SCR_MapEntity.GetMapWidget | ( | ) |
Get map widget.
| float SCR_MapEntity.GetMaxZoom | ( | ) |
Get maximal zoom.
| float SCR_MapEntity.GetMinZoom | ( | ) |
Get minimal zoom.
|
static |
Get on hover end invoker.
|
static |
Get on hover item invoker.
|
static |
Get on layer changed invoker.
|
static |
Get on map close invoker.
|
static |
Get on map init invoker, caution: called during the first frame of opening the map when widget related stuff is not initialized yet.
|
static |
Get on map open invoker.
|
static |
Get on map pan invoker.
|
static |
Get on map pan interpolated end invoker.
|
static |
Get on map zoom invoker.
|
static |
Get on map zoom interpolated end invoker.
|
static |
Get on selection invoker.
|
static |
Get on selection changed invoker.
| float SCR_MapEntity.GetTargetZoomPPU | ( | ) |
Get target zoom in the form of PixelPerUnit value, which is different from current zoom if interpolation is ongoing.
| void SCR_MapEntity.HoverItem | ( | MapItem | item | ) |
|
protected |
Init visibility and default config values for descriptors based on type.
| layerID | is id of the layer |
| layer | is the map layer |
| layerConfig | is the config for the layer |
|
protected |
Initialize layers from config.
| void SCR_MapEntity.InvokeOnSelect | ( | vector | selectionPos | ) |
Triggers OnSelection event.
| selectionPos | the selection (click) position in scaled screen coordinates |
| bool SCR_MapEntity.IsOpen | ( | ) |
Check if the map is opened.
| bool SCR_MapEntity.IsZooming | ( | ) |
Get whether zoom interpolation is ongoing.
|
protected |
SCR_CharacterControllerComponent event Called only in case of a fullscreen map.
|
protected |
Map close event.
|
protected |
Map open event.
| config | is the configuration object |
|
protected |
SCR_BaseGameMode event Called only in case of a fullscreen map.
|
protected |
Game event.
|
protected |
Game event.
| void SCR_MapEntity.OpenMap | ( | MapConfiguration | config | ) |
Open the map.
| config | is the configuration object |
| void SCR_MapEntity.Pan | ( | EMapPanMode | panMode, |
| float | panValue = 0 ) |
Pan the map by px amount.
| panMode | is mode of panning |
| panValue | is amount of pixels to pan |
| void SCR_MapEntity.PanSmooth | ( | float | panX, |
| float | panY, | ||
| float | panTime = 0::25 ) |
Interpolated pan.
| panX | is x target screen coordinate in DPIScaled px |
| panY | is y target screen coordinate in DPIScaled px |
| panTime | is interpolation duration |
|
protected |
Interpolated pan update.
| timeSlice | is frame timeSlice |
| void SCR_MapEntity.ScreenToWorld | ( | int | screenPosX, |
| int | screenPosY, | ||
| out float | worldX, | ||
| out float | worldY ) |
Use scaled screen coords to get canvas world coords, flips the y-axis.
| void SCR_MapEntity.ScreenToWorldNoFlip | ( | int | screenPosX, |
| int | screenPosY, | ||
| out float | worldX, | ||
| out float | worldY ) |
Use scaled screen coords to get canvas world coords without flipping the y-axis.
| void SCR_MapEntity.SelectItem | ( | MapItem | item | ) |
| void SCR_MapEntity.SetMapWidget | ( | Widget | mapW | ) |
Set map widget.
| void SCR_MapEntity.SetPan | ( | float | x, |
| float | y, | ||
| bool | isPanEnd = true, | ||
| bool | center = true ) |
Pan the map to target position, all of scripted panning is called through this.
| x | is horizontal screen UNSCALED coordinate |
| y | is vertical screen UNSCALED coordinate |
| center | determines whether the map should center to the supplied coordinates |
| IsPanEnd | determines whether this is also the end of panning operation, resetting the start pos for drag pannning |
|
protected |
Map properties config setup, matches imageset indices defined in map layout (MapWidget) to descriptor types.
| configObject | is a config object created for map init |
| mapCfg | is the provided map config |
|
protected |
Layer and map properties config setup, if missing creates a default one.
| configObject | is a config object created for map init |
| mapCfg | is the provided map config |
| MapConfiguration SCR_MapEntity.SetupMapConfig | ( | EMapEntityMode | mapMode, |
| ResourceName | configPath, | ||
| Widget | rootWidget ) |
Prepare MapConfiguration object from provided map config.
| mapMode | is the last map mode opened, if its the same we do not need to setup new config |
| configPath | is the path to the map config resource |
| rootWidget | is the root widget of the layout used to display map |
| void SCR_MapEntity.SetZoom | ( | float | targetPPU, |
| bool | instant = false ) |
Set zoom value.
| targetPPU | is wanted pixel per unit (zoom) value |
| instant | determines whether it is a one time zoom or an animation |
| void SCR_MapEntity.ShowScriptDebug | ( | ) |
Show/hide debug info table.
|
protected |
Update map debug table.
|
protected |
Handle update of modules, components and pan/zoom interpolation.
| timeSlice | is frame timeSlice |
| void SCR_MapEntity.UpdateViewPort | ( | ) |
Updates view port.
| bool SCR_MapEntity.UpdateZoomBounds | ( | ) |
Calculate zoom min/max.
| void SCR_MapEntity.WorldToScreen | ( | float | worldX, |
| float | worldY, | ||
| out int | screenPosX, | ||
| out int | screenPosY, | ||
| bool | withPan = false ) |
Use canvas world coords to get DPIscaled screen coords, flips the y-axis.
| void SCR_MapEntity.WorldToScreenCustom | ( | float | worldX, |
| float | worldY, | ||
| out int | screenPosX, | ||
| out int | screenPosY, | ||
| float | targetPPU, | ||
| bool | withPan = false ) |
Use canvas world coords and defined pixel per unit to get DPIscaled screen coords, flips the y-axis.
| void SCR_MapEntity.ZoomOut | ( | ) |
Set minimal zoom and center the map.
| void SCR_MapEntity.ZoomPanSmooth | ( | float | targetPixPerUnit, |
| float | worldX, | ||
| float | worldY, | ||
| float | zoomTime = 0::25 ) |
Interpolated zoom with custom pan target for simultaneous use of zoom+pan.
| targetPixPerUnit | is the target pixel per unit value |
| worldX | is world pos X panning target |
| worldY | is world pos Y panning target |
| zoomTime | is interpolation duration |
| void SCR_MapEntity.ZoomSmooth | ( | float | targetPixPerUnit, |
| float | zoomTime = 0::25, | ||
| bool | zoomToCenter = true, | ||
| bool | reinitZoom = false ) |
Interpolated zoom.
| targetPixPerUnit | is the target pixel per unit value |
| zoomTime | is interpolation duration |
| zoomToCenter | determines whether zoom target is screen center (true) or relative position of mouse within window (false) |
| reinitZoom | determines whether the condition blocking zooming to the same PPU value is ignored (f.e. when changing resolution) |
|
protected |
Interpolated zoom update.
| timeSlice | is frame timeSlice |
|
static |
|
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 |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |