G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
Widget Namespace Reference

Functions

Focus
void SetFocusToGameViewport ()
Input
void SetInputMode_GameOnly (APlayerController PlayerController, bool bFlushInput=false)
 Setup an input mode that allows only player input / player controller to respond to user input.
void SetInputMode_GameAndUIEx (APlayerController PlayerController, UWidget InWidgetToFocus=nullptr, EMouseLockMode InMouseLockMode=EMouseLockMode ::DoNotLock, bool bHideCursorDuringCapture=true, bool bFlushInput=false)
 Setup an input mode that allows only the UI to respond to user input, and if the UI doesn't handle it player input / player controller gets a chance.
void SetInputMode_UIOnlyEx (APlayerController PlayerController, UWidget InWidgetToFocus=nullptr, EMouseLockMode InMouseLockMode=EMouseLockMode ::DoNotLock, bool bFlushInput=false)
 Setup an input mode that allows only the UI to respond to user input.
Painting
void DrawTextFormatted (FPaintContext &Context, FText Text, FVector2D Position, UFont Font, float32 FontSize=16.000000, FName FontTypeFace=FName(""), FLinearColor Tint=FLinearColor(1.000000, 1.000000, 1.000000, 1.000000))
 Draws text.
void DrawSpline (FPaintContext &Context, FVector2D Start, FVector2D StartDir, FVector2D End, FVector2D EndDir, FLinearColor Tint=FLinearColor(1.000000, 1.000000, 1.000000, 1.000000), float32 Thickness=1.000000)
 Draws a hermite spline.
void DrawText (FPaintContext &Context, FString InString, FVector2D Position, FLinearColor Tint=FLinearColor(1.000000, 1.000000, 1.000000, 1.000000))
 Draws text.
void DrawBox (FPaintContext &Context, FVector2D Position, FVector2D Size, USlateBrushAsset Brush, FLinearColor Tint=FLinearColor(1.000000, 1.000000, 1.000000, 1.000000))
 Draws a box.
void DrawLine (FPaintContext &Context, FVector2D PositionA, FVector2D PositionB, FLinearColor Tint=FLinearColor(1.000000, 1.000000, 1.000000, 1.000000), bool bAntiAlias=true, float32 Thickness=1.000000)
 Draws a line.
void DrawLines (FPaintContext &Context, TArray< FVector2D > Points, FLinearColor Tint=FLinearColor(1.000000, 1.000000, 1.000000, 1.000000), bool bAntiAlias=true, float32 Thickness=1.000000)
 Draws several line segments.
Widget
FInputEvent GetInputEventFromNavigationEvent (FNavigationEvent Event)
FKeyEvent GetKeyEventFromAnalogInputEvent (FAnalogInputEvent Event)
FInputEvent GetInputEventFromPointerEvent (FPointerEvent Event)
void GetAllWidgetsOfClass (TArray< UUserWidget > &FoundWidgets, TSubclassOf< UUserWidget > WidgetClass, bool TopLevelOnly=true)
 Find all widgets of a certain class.
void GetAllWidgetsWithInterface (TArray< UUserWidget > &FoundWidgets, TSubclassOf< UInterface > Interface, bool TopLevelOnly)
 Find all widgets in the world with the specified interface. This is a slow operation, use with caution e.g. do not use every frame.
FInputEvent GetInputEventFromKeyEvent (FKeyEvent Event)
FInputEvent GetInputEventFromCharacterEvent (FCharacterEvent Event)
Widget|Accessibility
void SetColorVisionDeficiencyType (EColorVisionDeficiency Type, float32 Severity, bool CorrectDeficiency, bool ShowCorrectionWithDeficiency)
 Apply color deficiency correction settings to the game window.
Widget|Brush
void SetBrushResourceToMaterial (FSlateBrush &Brush, UMaterialInterface Material)
 Sets the resource on a brush to be a Material.
FSlateBrush MakeBrushFromMaterial (UMaterialInterface Material, int Width=32, int Height=32)
 Creates a Slate Brush from a Material. Materials don't have an implicit size, so providing a widget and height is required to hint slate with how large the image wants to be by default.
UMaterialInterface GetBrushResourceAsMaterial (FSlateBrush Brush)
 Gets the brush resource as a material.
UMaterialInstanceDynamic GetDynamicMaterial (FSlateBrush &Brush)
 Gets the material that allows changes to parameters at runtime. The brush must already have a material assigned to it, if it does it will automatically be converted to a MID.
void SetBrushResourceToTexture (FSlateBrush &Brush, UTexture2D Texture)
 Sets the resource on a brush to be a UTexture2D.
FSlateBrush MakeBrushFromAsset (USlateBrushAsset BrushAsset)
 Creates a Slate Brush from a Slate Brush Asset.
FSlateBrush NoResourceBrush ()
 Creates a Slate Brush that wont draw anything, the "Null Brush".
UObject GetBrushResource (FSlateBrush Brush)
 Gets the resource object on a brush. This could be a UTexture2D or a UMaterialInterface.
FSlateBrush MakeBrushFromTexture (UTexture2D Texture, int Width=0, int Height=0)
 Creates a Slate Brush from a Texture2D.
UTexture2D GetBrushResourceAsTexture2D (FSlateBrush Brush)
 Gets the brush resource as a texture 2D.
Widget|Drag and Drop
void CancelDragDrop ()
 Cancels any current drag drop operation.
UDragDropOperation GetDragDroppingContent ()
 Returns the drag and drop operation that is currently occurring if any, otherwise nothing.
bool IsDragDropping ()
 Returns true if a drag/drop event is occurring that a widget can handle.
Widget|Drag and Drop|Event Reply
FEventReply EndDragDrop (FEventReply &Reply)
 An event should return FReply::Handled().EndDragDrop() to request that the current drag/drop operation be terminated.
FEventReply DetectDragIfPressed (FPointerEvent PointerEvent, UWidget WidgetDetectingDrag, FKey DragKey)
 Given the pointer event, emit the DetectDrag reply if the provided key was pressed. If the DragKey is a touch key, that will also automatically work.
FEventReply DetectDrag (FEventReply &Reply, UWidget WidgetDetectingDrag, FKey DragKey)
 Ask Slate to detect if a user starts dragging in this widget later. Slate internally tracks the movement and if it surpasses the drag threshold, Slate will send an OnDragDetected event to the widget.
Widget|Event Reply
FEventReply ReleaseMouseCapture (FEventReply &Reply)
FEventReply UnlockMouse (FEventReply &Reply)
FEventReply ReleaseJoystickCapture (FEventReply &Reply, bool bInAllJoysticks=false)
FEventReply Unhandled ()
 The event reply to use when you choose not to handle an event.
FEventReply Handled ()
 The event reply to use when you choose to handle an event. This will prevent the event from continuing to bubble up / down the widget hierarchy.
FEventReply LockMouse (FEventReply &Reply, UWidget CapturingWidget)
FEventReply SetMousePosition (FEventReply &Reply, FVector2D NewMousePosition)
FEventReply ClearUserFocus (FEventReply &Reply, bool bInAllUsers=false)
FEventReply CaptureMouse (FEventReply &Reply, UWidget CapturingWidget)
FEventReply CaptureJoystick (FEventReply &Reply, UWidget CapturingWidget, bool bInAllJoysticks=false)
FEventReply SetUserFocus (FEventReply &Reply, UWidget FocusWidget, bool bInAllUsers=false)
Widget|Hardware Cursor
bool SetHardwareCursor (EMouseCursor CursorShape, FName CursorName, FVector2D HotSpot)
 Loads or sets a hardware cursor from the content directory in the game.
Widget|Menu
void DismissAllMenus ()
 Closes any popup menu.
Widget|Safe Zone
void GetSafeZonePadding (FVector4 &SafePadding, FVector2D &SafePaddingScale, FVector4 &SpillOverPadding)
 Gets the amount of padding that needs to be added when accounting for the safe zone on TVs.
Widget|Window Title Bar
void SetWindowTitleBarState (UWidget TitleBarContent, EWindowTitleBarMode Mode, bool bTitleBarDragEnabled, bool bWindowButtonsVisible, bool bTitleBarVisible)
void SetWindowTitleBarCloseButtonActive (bool bActive)
void RestorePreviousWindowTitleBarState ()
void SetWindowTitleBarOnCloseClickedDelegate (FOnGameWindowCloseButtonClickedDelegate__WidgetBlueprintLibrary Delegate=FOnGameWindowCloseButtonClickedDelegate__WidgetBlueprintLibrary())

Variables

Variables
const UDragDropOperation DragDroppingContent

Function Documentation

◆ CancelDragDrop()

void CancelDragDrop ( )

Cancels any current drag drop operation.

◆ CaptureJoystick()

FEventReply CaptureJoystick ( FEventReply & Reply,
UWidget CapturingWidget,
bool bInAllJoysticks = false )

◆ CaptureMouse()

FEventReply CaptureMouse ( FEventReply & Reply,
UWidget CapturingWidget )

◆ ClearUserFocus()

FEventReply ClearUserFocus ( FEventReply & Reply,
bool bInAllUsers = false )

◆ DetectDrag()

FEventReply DetectDrag ( FEventReply & Reply,
UWidget WidgetDetectingDrag,
FKey DragKey )

Ask Slate to detect if a user starts dragging in this widget later. Slate internally tracks the movement and if it surpasses the drag threshold, Slate will send an OnDragDetected event to the widget.

Parameters
WidgetDetectingDragDetect dragging in this widget
DragKeyThis button should be pressed to detect the drag

◆ DetectDragIfPressed()

FEventReply DetectDragIfPressed ( FPointerEvent PointerEvent,
UWidget WidgetDetectingDrag,
FKey DragKey )

Given the pointer event, emit the DetectDrag reply if the provided key was pressed. If the DragKey is a touch key, that will also automatically work.

Parameters
PointerEventThe pointer device event coming in.
WidgetDetectingDragDetect dragging in this widget.
DragKeyThis button should be pressed to detect the drag, won't emit the DetectDrag FEventReply unless this is pressed.

◆ DismissAllMenus()

void DismissAllMenus ( )

Closes any popup menu.

◆ DrawBox()

void DrawBox ( FPaintContext & Context,
FVector2D Position,
FVector2D Size,
USlateBrushAsset Brush,
FLinearColor Tint = FLinearColor ( 1.000000 , 1.000000 , 1.000000 , 1.000000 ) )

Draws a box.

◆ DrawLine()

void DrawLine ( FPaintContext & Context,
FVector2D PositionA,
FVector2D PositionB,
FLinearColor Tint = FLinearColor ( 1.000000 , 1.000000 , 1.000000 , 1.000000 ),
bool bAntiAlias = true,
float32 Thickness = 1.000000 )

Draws a line.

Parameters
PositionAStarting position of the line in local space.
PositionBEnding position of the line in local space.
TintColor to render the line.
bAntiAliasWhether the line should be antialiased.
ThicknessHow many pixels thick this line should be.

◆ DrawLines()

void DrawLines ( FPaintContext & Context,
TArray< FVector2D > Points,
FLinearColor Tint = FLinearColor ( 1.000000 , 1.000000 , 1.000000 , 1.000000 ),
bool bAntiAlias = true,
float32 Thickness = 1.000000 )

Draws several line segments.

Parameters
PointsLine pairs, each line needs to be 2 separate points in the array.
TintColor to render the line.
bAntiAliasWhether the line should be antialiased.
ThicknessHow many pixels thick this line should be.

◆ DrawSpline()

void DrawSpline ( FPaintContext & Context,
FVector2D Start,
FVector2D StartDir,
FVector2D End,
FVector2D EndDir,
FLinearColor Tint = FLinearColor ( 1.000000 , 1.000000 , 1.000000 , 1.000000 ),
float32 Thickness = 1.000000 )

Draws a hermite spline.

Parameters
StartStarting position of the spline in local space.
StartDirThe direction of the spline from the start point.
EndEnding position of the spline in local space.
EndDirThe direction of the spline to the end point.
TintColor to render the spline.
ThicknessHow many pixels thick this spline should be.

◆ DrawText()

void DrawText ( FPaintContext & Context,
FString InString,
FVector2D Position,
FLinearColor Tint = FLinearColor ( 1.000000 , 1.000000 , 1.000000 , 1.000000 ) )

Draws text.

Parameters
InStringThe string to draw.
PositionThe starting position where the text is drawn in local space.
TintColor to render the line.

◆ DrawTextFormatted()

void DrawTextFormatted ( FPaintContext & Context,
FText Text,
FVector2D Position,
UFont Font,
float32 FontSize = 16.000000,
FName FontTypeFace = FName ( "" ),
FLinearColor Tint = FLinearColor ( 1.000000 , 1.000000 , 1.000000 , 1.000000 ) )

Draws text.

Parameters
TextThe string to draw.
PositionThe starting position where the text is drawn in local space.
TintColor to render the line.

◆ EndDragDrop()

FEventReply EndDragDrop ( FEventReply & Reply)

An event should return FReply::Handled().EndDragDrop() to request that the current drag/drop operation be terminated.

◆ GetAllWidgetsOfClass()

void GetAllWidgetsOfClass ( TArray< UUserWidget > & FoundWidgets,
TSubclassOf< UUserWidget > WidgetClass,
bool TopLevelOnly = true )

Find all widgets of a certain class.

Parameters
FoundWidgetsThe widgets that were found matching the filter.
WidgetClassThe widget class to filter by.
TopLevelOnlyOnly the widgets that are direct children of the viewport will be returned.

◆ GetAllWidgetsWithInterface()

void GetAllWidgetsWithInterface ( TArray< UUserWidget > & FoundWidgets,
TSubclassOf< UInterface > Interface,
bool TopLevelOnly )

Find all widgets in the world with the specified interface. This is a slow operation, use with caution e.g. do not use every frame.

Parameters
FoundWidgetsOutput array of widgets that implement the specified interface.
InterfaceThe interface to find. Must be specified or result array will be empty.
TopLevelOnlyOnly the widgets that are direct children of the viewport will be returned.

◆ GetBrushResource()

UObject GetBrushResource ( FSlateBrush Brush)

Gets the resource object on a brush. This could be a UTexture2D or a UMaterialInterface.

◆ GetBrushResourceAsMaterial()

UMaterialInterface GetBrushResourceAsMaterial ( FSlateBrush Brush)

Gets the brush resource as a material.

◆ GetBrushResourceAsTexture2D()

UTexture2D GetBrushResourceAsTexture2D ( FSlateBrush Brush)

Gets the brush resource as a texture 2D.

◆ GetDragDroppingContent()

UDragDropOperation GetDragDroppingContent ( )

Returns the drag and drop operation that is currently occurring if any, otherwise nothing.

◆ GetDynamicMaterial()

UMaterialInstanceDynamic GetDynamicMaterial ( FSlateBrush & Brush)

Gets the material that allows changes to parameters at runtime. The brush must already have a material assigned to it, if it does it will automatically be converted to a MID.

Returns
A material that supports dynamic input from the game.

◆ GetInputEventFromCharacterEvent()

FInputEvent GetInputEventFromCharacterEvent ( FCharacterEvent Event)

◆ GetInputEventFromKeyEvent()

FInputEvent GetInputEventFromKeyEvent ( FKeyEvent Event)

◆ GetInputEventFromNavigationEvent()

FInputEvent GetInputEventFromNavigationEvent ( FNavigationEvent Event)

◆ GetInputEventFromPointerEvent()

FInputEvent GetInputEventFromPointerEvent ( FPointerEvent Event)

◆ GetKeyEventFromAnalogInputEvent()

FKeyEvent GetKeyEventFromAnalogInputEvent ( FAnalogInputEvent Event)

◆ GetSafeZonePadding()

void GetSafeZonePadding ( FVector4 & SafePadding,
FVector2D & SafePaddingScale,
FVector4 & SpillOverPadding )

Gets the amount of padding that needs to be added when accounting for the safe zone on TVs.

◆ Handled()

FEventReply Handled ( )

The event reply to use when you choose to handle an event. This will prevent the event from continuing to bubble up / down the widget hierarchy.

◆ IsDragDropping()

bool IsDragDropping ( )

Returns true if a drag/drop event is occurring that a widget can handle.

◆ LockMouse()

FEventReply LockMouse ( FEventReply & Reply,
UWidget CapturingWidget )

◆ MakeBrushFromAsset()

FSlateBrush MakeBrushFromAsset ( USlateBrushAsset BrushAsset)

Creates a Slate Brush from a Slate Brush Asset.

Returns
A new slate brush using the asset's brush.

◆ MakeBrushFromMaterial()

FSlateBrush MakeBrushFromMaterial ( UMaterialInterface Material,
int Width = 32,
int Height = 32 )

Creates a Slate Brush from a Material. Materials don't have an implicit size, so providing a widget and height is required to hint slate with how large the image wants to be by default.

Returns
A new slate brush using the material.

◆ MakeBrushFromTexture()

FSlateBrush MakeBrushFromTexture ( UTexture2D Texture,
int Width = 0,
int Height = 0 )

Creates a Slate Brush from a Texture2D.

Parameters
WidthWhen less than or equal to zero, the Width of the brush will default to the Width of the Texture
HeightWhen less than or equal to zero, the Height of the brush will default to the Height of the Texture
Returns
A new slate brush using the texture.

◆ NoResourceBrush()

FSlateBrush NoResourceBrush ( )

Creates a Slate Brush that wont draw anything, the "Null Brush".

Returns
A new slate brush that wont draw anything.

◆ ReleaseJoystickCapture()

FEventReply ReleaseJoystickCapture ( FEventReply & Reply,
bool bInAllJoysticks = false )

◆ ReleaseMouseCapture()

FEventReply ReleaseMouseCapture ( FEventReply & Reply)

◆ RestorePreviousWindowTitleBarState()

void RestorePreviousWindowTitleBarState ( )

◆ SetBrushResourceToMaterial()

void SetBrushResourceToMaterial ( FSlateBrush & Brush,
UMaterialInterface Material )

Sets the resource on a brush to be a Material.

◆ SetBrushResourceToTexture()

void SetBrushResourceToTexture ( FSlateBrush & Brush,
UTexture2D Texture )

Sets the resource on a brush to be a UTexture2D.

◆ SetColorVisionDeficiencyType()

void SetColorVisionDeficiencyType ( EColorVisionDeficiency Type,
float32 Severity,
bool CorrectDeficiency,
bool ShowCorrectionWithDeficiency )

Apply color deficiency correction settings to the game window.

Parameters
TypeThe type of color deficiency correction to apply.
SeverityIntensity of the color deficiency correction effect, from 0 to 1.
CorrectDeficiencyShifts the color spectrum to the visible range based on the current deficiency type.
ShowCorrectionWithDeficiencyIf you're correcting the color deficiency, you can use this to visualize what the correction looks like with the deficiency.

◆ SetFocusToGameViewport()

void SetFocusToGameViewport ( )

◆ SetHardwareCursor()

bool SetHardwareCursor ( EMouseCursor CursorShape,
FName CursorName,
FVector2D HotSpot )

Loads or sets a hardware cursor from the content directory in the game.

◆ SetInputMode_GameAndUIEx()

void SetInputMode_GameAndUIEx ( APlayerController PlayerController,
UWidget InWidgetToFocus = nullptr,
EMouseLockMode InMouseLockMode = EMouseLockMode :: DoNotLock,
bool bHideCursorDuringCapture = true,
bool bFlushInput = false )

Setup an input mode that allows only the UI to respond to user input, and if the UI doesn't handle it player input / player controller gets a chance.

Note: This means that any bound Input events in the widget will be called.

◆ SetInputMode_GameOnly()

void SetInputMode_GameOnly ( APlayerController PlayerController,
bool bFlushInput = false )

Setup an input mode that allows only player input / player controller to respond to user input.

Note: Any bound Input Events in this widget will be called.

◆ SetInputMode_UIOnlyEx()

void SetInputMode_UIOnlyEx ( APlayerController PlayerController,
UWidget InWidgetToFocus = nullptr,
EMouseLockMode InMouseLockMode = EMouseLockMode :: DoNotLock,
bool bFlushInput = false )

Setup an input mode that allows only the UI to respond to user input.

Note: This means that any bound Input Events in the widget will not be called!

◆ SetMousePosition()

FEventReply SetMousePosition ( FEventReply & Reply,
FVector2D NewMousePosition )

◆ SetUserFocus()

FEventReply SetUserFocus ( FEventReply & Reply,
UWidget FocusWidget,
bool bInAllUsers = false )

◆ SetWindowTitleBarCloseButtonActive()

void SetWindowTitleBarCloseButtonActive ( bool bActive)

◆ SetWindowTitleBarOnCloseClickedDelegate()

◆ SetWindowTitleBarState()

void SetWindowTitleBarState ( UWidget TitleBarContent,
EWindowTitleBarMode Mode,
bool bTitleBarDragEnabled,
bool bWindowButtonsVisible,
bool bTitleBarVisible )

◆ Unhandled()

FEventReply Unhandled ( )

The event reply to use when you choose not to handle an event.

◆ UnlockMouse()

FEventReply UnlockMouse ( FEventReply & Reply)

Variable Documentation

◆ DragDroppingContent

const UDragDropOperation DragDroppingContent