Always snap to grid

Difference between revisions of "UE3:UIToggleButton (UDK)"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(Talk)
m (1 revision: class descriptions for UDK January update (part 7))
 
(No difference)

Latest revision as of 06:52, 17 January 2010

UDK Object >> UIRoot >> UIScreenObject >> UIObject >> UIButton >> UILabelButton >> UIToggleButton
Package: 
Engine
Implemented interfaces
UIDataStorePublisher
This class in other games:
UT3

This button is identical to UIButton, with the exception that pressing this button toggles its pressed state, rather than only remaining in the pressed state while the mouse/key is depressed.

Properties[edit]

Property group 'Components'[edit]

CheckedBackgroundImageComponent[edit]

Type: UIComp_DrawImage

Modifiers: editinline, const, noclear

Component for rendering the button background image when checked

Default value: UIComp_DrawImage'CheckedBackgroundImageTemplate'

CheckedStringRenderComponent[edit]

Type: UIComp_DrawString

Modifiers: editinline, const, noclear

Renders the caption for this button when it is checked

Default value: UIComp_DrawString'CheckedLabelStringRenderer'

Property group 'Data'[edit]

bIsChecked[edit]

Type: bool

Modifiers: private

Controls whether this button is considered checked. When bIsChecked is TRUE, CheckedImage will be rendered over the button background image, using the current style.

ValueDataSource[edit]

Type: UIRoot.UIDataStoreBinding

Modifiers: private

the data store that this togglebutton retrieves its checked/unchecked value from

Default values[edit]

Property Value
OnClicked ButtonClicked

Subobjects[edit]

BackgroundImageTemplate[edit]

Class: Engine.UIComp_DrawImage

Inherits from: UILabelButton.BackgroundImageTemplate

No new values.

CheckedBackgroundImageTemplate[edit]

Class: Engine.UIComp_DrawImage

Property Value
ImageStyle
Member Value
DefaultStyleTag 'DefaultToggleButtonBackgroundStyle'
StyleResolverTag 'Background Image Style (Checked)'

CheckedLabelStringRenderer[edit]

Class: Engine.UIComp_DrawString

Property Value
StringStyle
Member Value
DefaultStyleTag 'DefaultToggleButtonStyle'
StyleResolverTag 'Caption Style (Checked)'

LabelStringRenderer[edit]

Class: Engine.UIComp_DrawString

Inherits from: UILabelButton.LabelStringRenderer

No new values.

WidgetEventComponent[edit]

Class: Engine.UIComp_Event

Inherits from: UILabelButton.WidgetEventComponent

No new values.

Functions[edit]

Native functions[edit]

SetCaption[edit]

native function SetCaption (string NewText)

Overrides: UILabelButton.SetCaption

Sets the caption for this button.

Parameters:

  • NewText - the new caption for the button

SetValue[edit]

native final function SetValue (bool bShouldBeChecked, optional int PlayerIndex)

Changed the checked state of this checkbox and activates a checked event.

Parameters:

  • bShouldBeChecked - TRUE to turn the checkbox on, FALSE to turn it off
  • PlayerIndex - the index of the player that generated the call to SetValue; used as the PlayerIndex when activating UIEvents; if not specified, the value of GetBestPlayerIndex() is used instead.

Other instance functions[edit]

ButtonClicked[edit]

function bool ButtonClicked (UIScreenObject Sender, int PlayerIndex)

Default handler for the toggle button's OnClick

IsChecked[edit]

final function bool IsChecked ()

Returns TRUE if this button is in the checked state, FALSE if in the