unreal.ButtonStyle

class unreal.ButtonStyle(normal=[[32.0, 32.0], [0.0, 0.0, 0.0, 0.0], [[1.0, 1.0, 1.0, 1.0], SlateColorStylingMode.USE_COLOR_SPECIFIED], None, SlateBrushDrawType.IMAGE, SlateBrushTileType.NO_TILE, SlateBrushMirrorType.NO_MIRROR], hovered=[[32.0, 32.0], [0.0, 0.0, 0.0, 0.0], [[1.0, 1.0, 1.0, 1.0], SlateColorStylingMode.USE_COLOR_SPECIFIED], None, SlateBrushDrawType.IMAGE, SlateBrushTileType.NO_TILE, SlateBrushMirrorType.NO_MIRROR], pressed=[[32.0, 32.0], [0.0, 0.0, 0.0, 0.0], [[1.0, 1.0, 1.0, 1.0], SlateColorStylingMode.USE_COLOR_SPECIFIED], None, SlateBrushDrawType.IMAGE, SlateBrushTileType.NO_TILE, SlateBrushMirrorType.NO_MIRROR], disabled=[[0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [[1.0, 1.0, 1.0, 1.0], SlateColorStylingMode.USE_COLOR_SPECIFIED], None, SlateBrushDrawType.NO_DRAW_TYPE, SlateBrushTileType.NO_TILE, SlateBrushMirrorType.NO_MIRROR], normal_padding=[0.0, 0.0, 0.0, 0.0], pressed_padding=[0.0, 0.0, 0.0, 0.0], pressed_slate_sound=[None], hovered_slate_sound=[None])

Bases: unreal.SlateWidgetStyle

Represents the appearance of an SButton

C++ Source:

  • Module: SlateCore
  • File: SlateTypes.h

Editor Properties: (see get_editor_property/set_editor_property)

  • disabled (SlateBrush): [Read-Write] Button appearance when disabled, by default this is set to an invalid resource when that is the case default disabled drawing is used.
  • hovered (SlateBrush): [Read-Write] Button appearance when hovered
  • hovered_slate_sound (SlateSound): [Read-Write] The sound the button should play when initially hovered over
  • normal (SlateBrush): [Read-Write] Button appearance when the button is not hovered or pressed
  • normal_padding (Margin): [Read-Write] Padding that accounts for the border in the button’s background image. When this is applied, the content of the button should appear flush with the button’s border. Use this padding when the button is not pressed.
  • pressed (SlateBrush): [Read-Write] Button appearance when pressed
  • pressed_padding (Margin): [Read-Write] Same as NormalPadding but used when the button is pressed. Allows for moving the content to match any “movement” in the button’s border image.
  • pressed_slate_sound (SlateSound): [Read-Write] The sound the button should play when pressed
disabled

(SlateBrush) – [Read-Write] Button appearance when disabled, by default this is set to an invalid resource when that is the case default disabled drawing is used.

hovered

(SlateBrush) – [Read-Write] Button appearance when hovered

hovered_slate_sound

(SlateSound) – [Read-Write] The sound the button should play when initially hovered over

normal

(SlateBrush) – [Read-Write] Button appearance when the button is not hovered or pressed

normal_padding

(Margin) – [Read-Write] Padding that accounts for the border in the button’s background image. When this is applied, the content of the button should appear flush with the button’s border. Use this padding when the button is not pressed.

pressed

(SlateBrush) – [Read-Write] Button appearance when pressed

pressed_padding

(Margin) – [Read-Write] Same as NormalPadding but used when the button is pressed. Allows for moving the content to match any “movement” in the button’s border image.

pressed_slate_sound

(SlateSound) – [Read-Write] The sound the button should play when pressed