|
G1R AngelScript
Scripting reference for the Gothic 1 Remake
|
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 |
| void CancelDragDrop | ( | ) |
Cancels any current drag drop operation.
| FEventReply CaptureJoystick | ( | FEventReply & | Reply, |
| UWidget | CapturingWidget, | ||
| bool | bInAllJoysticks = false ) |
| FEventReply CaptureMouse | ( | FEventReply & | Reply, |
| UWidget | CapturingWidget ) |
| FEventReply ClearUserFocus | ( | FEventReply & | Reply, |
| bool | bInAllUsers = false ) |
| 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.
| WidgetDetectingDrag | Detect dragging in this widget |
| DragKey | This button should be pressed to detect the drag |
| 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.
| PointerEvent | The pointer device event coming in. |
| WidgetDetectingDrag | Detect dragging in this widget. |
| DragKey | This button should be pressed to detect the drag, won't emit the DetectDrag FEventReply unless this is pressed. |
| void DismissAllMenus | ( | ) |
Closes any popup menu.
| 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.
| PositionA | Starting position of the line in local space. |
| PositionB | Ending position of the line in local space. |
| Tint | Color to render the line. |
| bAntiAlias | Whether the line should be antialiased. |
| Thickness | How many pixels thick this line should be. |
| 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.
| Points | Line pairs, each line needs to be 2 separate points in the array. |
| Tint | Color to render the line. |
| bAntiAlias | Whether the line should be antialiased. |
| Thickness | How many pixels thick this line should be. |
| 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.
| Start | Starting position of the spline in local space. |
| StartDir | The direction of the spline from the start point. |
| End | Ending position of the spline in local space. |
| EndDir | The direction of the spline to the end point. |
| Tint | Color to render the spline. |
| Thickness | How many pixels thick this spline should be. |
| void DrawText | ( | FPaintContext & | Context, |
| FString | InString, | ||
| FVector2D | Position, | ||
| FLinearColor | Tint = FLinearColor ( 1.000000 , 1.000000 , 1.000000 , 1.000000 ) ) |
Draws text.
| InString | The string to draw. |
| Position | The starting position where the text is drawn in local space. |
| Tint | Color to render the line. |
| 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 ) ) |
| FEventReply EndDragDrop | ( | FEventReply & | Reply | ) |
An event should return FReply::Handled().EndDragDrop() to request that the current drag/drop operation be terminated.
| void GetAllWidgetsOfClass | ( | TArray< UUserWidget > & | FoundWidgets, |
| TSubclassOf< UUserWidget > | WidgetClass, | ||
| bool | TopLevelOnly = true ) |
Find all widgets of a certain class.
| FoundWidgets | The widgets that were found matching the filter. |
| WidgetClass | The widget class to filter by. |
| TopLevelOnly | Only the widgets that are direct children of the viewport will be returned. |
| 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.
| FoundWidgets | Output array of widgets that implement the specified interface. |
| Interface | The interface to find. Must be specified or result array will be empty. |
| TopLevelOnly | Only the widgets that are direct children of the viewport will be returned. |
| UObject GetBrushResource | ( | FSlateBrush | Brush | ) |
Gets the resource object on a brush. This could be a UTexture2D or a UMaterialInterface.
| UMaterialInterface GetBrushResourceAsMaterial | ( | FSlateBrush | Brush | ) |
Gets the brush resource as a material.
| UTexture2D GetBrushResourceAsTexture2D | ( | FSlateBrush | Brush | ) |
Gets the brush resource as a texture 2D.
| UDragDropOperation GetDragDroppingContent | ( | ) |
Returns the drag and drop operation that is currently occurring if any, otherwise nothing.
| 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.
| FInputEvent GetInputEventFromCharacterEvent | ( | FCharacterEvent | Event | ) |
| FInputEvent GetInputEventFromKeyEvent | ( | FKeyEvent | Event | ) |
| FInputEvent GetInputEventFromNavigationEvent | ( | FNavigationEvent | Event | ) |
| FInputEvent GetInputEventFromPointerEvent | ( | FPointerEvent | Event | ) |
| FKeyEvent GetKeyEventFromAnalogInputEvent | ( | FAnalogInputEvent | Event | ) |
| 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.
| 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.
| bool IsDragDropping | ( | ) |
Returns true if a drag/drop event is occurring that a widget can handle.
| FEventReply LockMouse | ( | FEventReply & | Reply, |
| UWidget | CapturingWidget ) |
| FSlateBrush MakeBrushFromAsset | ( | USlateBrushAsset | BrushAsset | ) |
| FSlateBrush MakeBrushFromMaterial | ( | UMaterialInterface | Material, |
| int | Width = 32, | ||
| int | Height = 32 ) |
| FSlateBrush MakeBrushFromTexture | ( | UTexture2D | Texture, |
| int | Width = 0, | ||
| int | Height = 0 ) |
Creates a Slate Brush from a Texture2D.
| Width | When less than or equal to zero, the Width of the brush will default to the Width of the Texture |
| Height | When less than or equal to zero, the Height of the brush will default to the Height of the Texture |
| FSlateBrush NoResourceBrush | ( | ) |
Creates a Slate Brush that wont draw anything, the "Null Brush".
| FEventReply ReleaseJoystickCapture | ( | FEventReply & | Reply, |
| bool | bInAllJoysticks = false ) |
| FEventReply ReleaseMouseCapture | ( | FEventReply & | Reply | ) |
| void RestorePreviousWindowTitleBarState | ( | ) |
| void SetBrushResourceToMaterial | ( | FSlateBrush & | Brush, |
| UMaterialInterface | Material ) |
Sets the resource on a brush to be a Material.
| void SetBrushResourceToTexture | ( | FSlateBrush & | Brush, |
| UTexture2D | Texture ) |
Sets the resource on a brush to be a UTexture2D.
| void SetColorVisionDeficiencyType | ( | EColorVisionDeficiency | Type, |
| float32 | Severity, | ||
| bool | CorrectDeficiency, | ||
| bool | ShowCorrectionWithDeficiency ) |
Apply color deficiency correction settings to the game window.
| Type | The type of color deficiency correction to apply. |
| Severity | Intensity of the color deficiency correction effect, from 0 to 1. |
| CorrectDeficiency | Shifts the color spectrum to the visible range based on the current deficiency type. |
| ShowCorrectionWithDeficiency | If you're correcting the color deficiency, you can use this to visualize what the correction looks like with the deficiency. |
| void SetFocusToGameViewport | ( | ) |
| bool SetHardwareCursor | ( | EMouseCursor | CursorShape, |
| FName | CursorName, | ||
| FVector2D | HotSpot ) |
Loads or sets a hardware cursor from the content directory in the game.
| 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.
| 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.
| 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!
| FEventReply SetMousePosition | ( | FEventReply & | Reply, |
| FVector2D | NewMousePosition ) |
| FEventReply SetUserFocus | ( | FEventReply & | Reply, |
| UWidget | FocusWidget, | ||
| bool | bInAllUsers = false ) |
| void SetWindowTitleBarCloseButtonActive | ( | bool | bActive | ) |
| void SetWindowTitleBarOnCloseClickedDelegate | ( | FOnGameWindowCloseButtonClickedDelegate__WidgetBlueprintLibrary | Delegate = FOnGameWindowCloseButtonClickedDelegate__WidgetBlueprintLibrary ( ) | ) |
| void SetWindowTitleBarState | ( | UWidget | TitleBarContent, |
| EWindowTitleBarMode | Mode, | ||
| bool | bTitleBarDragEnabled, | ||
| bool | bWindowButtonsVisible, | ||
| bool | bTitleBarVisible ) |
| FEventReply Unhandled | ( | ) |
The event reply to use when you choose not to handle an event.
| FEventReply UnlockMouse | ( | FEventReply & | Reply | ) |
| const UDragDropOperation DragDroppingContent |