Arma Reforger Script API
|
Public Member Functions | |
void | ~SCR_NearbyContextDisplay () |
Performs cleanup. | |
override void | DisplayStartDraw (IEntity owner) |
override void | DisplayInit (IEntity owner) |
override void | DisplayStopDraw (IEntity owner) |
override void | DisplayUpdate (IEntity owner, float timeSlice) |
void | CacheWidget (ResourceName layout, int amount, bool returnWidget=false, Widget widgetToReturn=null) |
Create a certain amount of given Widgets to cache. | |
![]() | |
void | SetEnabled (bool isEnabled) |
override void | Show (bool show, float speed=UIConstants.FADE_RATE_INSTANT, EAnimationCurve curve=EAnimationCurve.LINEAR) |
Show/hide InfoDisplay properly, not breaking other systems like AdaptiveOpacity or ConditionalVisibility. | |
![]() | |
SCR_InfoDisplayHandler | GetHandler (TypeName handlerType) |
SCR_InfoDisplayInvoker | GetOnStart () |
SCR_InfoDisplayInvoker | GetOnStop () |
IEntity | GetOwnerEntity () |
Widget | GetContentWidget () |
string | GetContentWidgetName () |
void | SetRootWidget (notnull Widget root) |
void | SetContentWidget (notnull Widget content) |
bool | IsShown () |
Widget | GetRootWidget () |
bool | GetDimensions (out float width, out float height, bool addSafezones=true) |
Get width and height of the InfoDisplay element, optionally with safezones adjustments. | |
bool | GetAnchorPosition (out float x, out float y, EWidgetAnchor anchor=EWidgetAnchor.TOPLEFT, bool addSafezones=true) |
Get width and height of the InfoDisplay element, optionally with safezones adjustments. | |
void | RegisterToHudManager () |
![]() | |
proto external int | GetInfoDisplays (out notnull array< BaseInfoDisplay > outInfoDisplays) |
![]() | |
proto external GenericComponent | FindComponentInParentContainer (TypeName typeName) |
Public Attributes | |
ResourceName | m_sIconLayoutPath |
![]() | |
ResourceName | m_LayoutPath |
EHudLayers | m_eLayer |
int | m_iOverrideZOrder |
Protected Member Functions | |
void | ClearCachedWidgets () |
Check every Cached Widget array and check if the array holds more widgets then the cap allows If there are too many cached Widgets, delete Widgets until its below the cap. | |
bool | IsObstructed (vector contextPos, vector cameraPos, BaseWorld world, notnull IEntity entAction) |
Use a Raycast to check if the givin position is in line of sight. | |
void | SetVisibleWidgets () |
Iterates through available precached widgets and leaves only provided count enabled. | |
void | SetWidgetAlpha (Widget widget, float distance, float limit) |
Set the Widget alpha based on the distance of the Context it's attached to to the Camera. | |
bool | GetWorldToScreenPosition (BaseWorld world, int cameraIndex, vector worldPosition, out float posX, out float posY) |
Recalculates worldPosition to screen space and applies it to widget. | |
bool | IsInLineOfSight (vector point, vector transform[4], float val) |
Performs a dot product check against threshold whether point is in line of sight of provided transformation. | |
bool | IsOnScreen (float resX, float resY, float posX, float posY) |
Checks is the given screenposition is within the resolution and not outside of the screen. | |
float | GetDistanceFromScreenCenter (float resX, float resY, float posX, float posY) |
Gets the distance from givin point to screen center by taking the X & Y position an calcualting the distance between them. | |
![]() | |
bool | DisplayStartDrawInit (IEntity owner) |
void | DisplayControlledEntityChanged (IEntity from, IEntity to) |
void | DisplayConsciousnessChanged (bool conscious, bool init=false) |
void | DisplayOnSuspended () |
Called when GUI is temporarily suspended due to visibility flags; e.g. GM entered and GUI marked as not to show in GM. | |
void | DisplayOnResumed () |
void | InitializeInterfaceSettings () |
void | OnSettingsChanged () |
![]() | |
void | OnShownFinished (Widget w, float targetOpacity, WidgetAnimationOpacity anim=null) |
void | AdaptiveOpacity_Update (float opacity, float sceneBrightness, bool init=false) |
Static Protected Member Functions | |
static bool | IsCharacter (notnull IEntity entity) |
Callback method for TraceMove, to check if hit entity is a Character. | |
void SCR_NearbyContextDisplay.~SCR_NearbyContextDisplay | ( | ) |
Performs cleanup.
void SCR_NearbyContextDisplay.CacheWidget | ( | ResourceName | layout, |
int | amount, | ||
bool | returnWidget = false, | ||
Widget | widgetToReturn = null ) |
Create a certain amount of given Widgets to cache.
[in] | layout | Layout that will be created and cached |
[in] | int | Amount of Widgets you want to cache |
[in] | bool | If true a Widget must be provided that will be used imideatly after caching |
[in] | widget | If returnWidget is true a Widget must be defined to where the newly created one should be used |
|
protected |
Check every Cached Widget array and check if the array holds more widgets then the cap allows If there are too many cached Widgets, delete Widgets until its below the cap.
override void SCR_NearbyContextDisplay.DisplayInit | ( | IEntity | owner | ) |
Implements SCR_InfoDisplayExtended.
override void SCR_NearbyContextDisplay.DisplayStartDraw | ( | IEntity | owner | ) |
Implements SCR_InfoDisplayExtended.
override void SCR_NearbyContextDisplay.DisplayStopDraw | ( | IEntity | owner | ) |
Implements SCR_InfoDisplayExtended.
override void SCR_NearbyContextDisplay.DisplayUpdate | ( | IEntity | owner, |
float | timeSlice ) |
If there is no widget available create a new one and use that
If there is no widget available create a new one and use that
Implements SCR_InfoDisplayExtended.
|
protected |
Gets the distance from givin point to screen center by taking the X & Y position an calcualting the distance between them.
[in] | float | ScreenresolutionX |
[in] | float | ScreenresolutionY |
[in] | float | X position on the screen |
[in] | float | Y position on the screen |
|
protected |
Recalculates worldPosition to screen space and applies it to widget.
[in] | worldPosition | |
[in] | int | Camera thats being used |
[in] | vector | Position in world space |
[out] | posX | X Position on the screen |
[out] | posY | Y Position on the screen |
|
staticprotected |
Callback method for TraceMove, to check if hit entity is a Character.
entity |
|
protected |
Performs a dot product check against threshold whether point is in line of sight of provided transformation.
[in] | vector | point Point to perform check for |
[in] | vector[4] | transform Reference matrix checked against |
[in] | float | threshold01 Dot product result is compared against this value, higher values result in more narrow arc. |
|
protected |
Use a Raycast to check if the givin position is in line of sight.
[in] | Position | to which we cast the raycast |
[in] | Position | where the raycast should start |
[in] | current | world |
[in] | Entity | Owner of the Action |
|
protected |
Checks is the given screenposition is within the resolution and not outside of the screen.
[in] | float | ScreenresolutionX |
[in] | float | ScreenresolutionY |
[in] | float | X position on the screen |
[in] | float | Y position on the screen |
|
protected |
Iterates through available precached widgets and leaves only provided count enabled.
|
protected |
Set the Widget alpha based on the distance of the Context it's attached to to the Camera.
[in] | Widget | to which the alpha will be applied |
[in] | Distance | from camera to context in world space |
[in] | Max | distance until the alpha will be 0 |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Distnace in meters in which contexts will be collected and visible to indicate a possible interaction. Defined in 'InteractionHandlerComponent' on DefaultPlayerController entity.
|
protected |
Distance in meters in which a context can be interacted with. Defined in 'InteractionHandlerComponent' on DefaultPlayerController entity.
|
protected |
|
protected |
|
protected |
Interaction handler attached to parent entity.
|
protected |
Holds all the different cached id with the enum as key.
|
protected |
Holds all the different cached Widgets with the Layout GUID as key.
|
protected |
|
protected |
|
protected |
|
protected |
ResourceName SCR_NearbyContextDisplay.m_sIconLayoutPath |