OptionButton

Inherits: Button < BaseButton < Control < CanvasItem < Node < Object

There is currently no description for this class. Please help us by contributing one!

Properties

ActionMode

action_mode

0 (overrides BaseButton)

HorizontalAlignment

alignment

0 (overrides Button)

bool

allow_reselect

false

bool

fit_to_longest_item

true

int

item_count

0

int

selected

-1

bool

toggle_mode

true (overrides BaseButton)

Methods

void

add_icon_item ( Texture2D texture, String label, int id=-1 )

void

add_item ( String label, int id=-1 )

void

add_separator ( String text=”” )

void

clear ( )

Texture2D

get_item_icon ( int idx ) const

int

get_item_id ( int idx ) const

int

get_item_index ( int id ) const

Variant

get_item_metadata ( int idx ) const

String

get_item_text ( int idx ) const

String

get_item_tooltip ( int idx ) const

PopupMenu

get_popup ( ) const

int

get_selectable_item ( bool from_last=false ) const

int

get_selected_id ( ) const

Variant

get_selected_metadata ( ) const

bool

has_selectable_items ( ) const

bool

is_item_disabled ( int idx ) const

bool

is_item_separator ( int idx ) const

void

remove_item ( int idx )

void

select ( int idx )

void

set_disable_shortcuts ( bool disabled )

void

set_item_disabled ( int idx, bool disabled )

void

set_item_icon ( int idx, Texture2D texture )

void

set_item_id ( int idx, int id )

void

set_item_metadata ( int idx, Variant metadata )

void

set_item_text ( int idx, String text )

void

set_item_tooltip ( int idx, String tooltip )

void

show_popup ( )

Theme Properties

int

arrow_margin

4

int

modulate_arrow

0

Texture2D

arrow


Signals

item_focused ( int index )

There is currently no description for this signal. Please help us by contributing one!


item_selected ( int index )

There is currently no description for this signal. Please help us by contributing one!


Property Descriptions

bool allow_reselect = false

  • void set_allow_reselect ( bool value )

  • bool get_allow_reselect ( )

There is currently no description for this property. Please help us by contributing one!


bool fit_to_longest_item = true

  • void set_fit_to_longest_item ( bool value )

  • bool is_fit_to_longest_item ( )

There is currently no description for this property. Please help us by contributing one!


int item_count = 0

  • void set_item_count ( int value )

  • int get_item_count ( )

There is currently no description for this property. Please help us by contributing one!


int selected = -1

  • int get_selected ( )

There is currently no description for this property. Please help us by contributing one!


Method Descriptions

void add_icon_item ( Texture2D texture, String label, int id=-1 )

There is currently no description for this method. Please help us by contributing one!


void add_item ( String label, int id=-1 )

There is currently no description for this method. Please help us by contributing one!


void add_separator ( String text=”” )

There is currently no description for this method. Please help us by contributing one!


void clear ( )

There is currently no description for this method. Please help us by contributing one!


Texture2D get_item_icon ( int idx ) const

There is currently no description for this method. Please help us by contributing one!


int get_item_id ( int idx ) const

There is currently no description for this method. Please help us by contributing one!


int get_item_index ( int id ) const

There is currently no description for this method. Please help us by contributing one!


Variant get_item_metadata ( int idx ) const

There is currently no description for this method. Please help us by contributing one!


String get_item_text ( int idx ) const

There is currently no description for this method. Please help us by contributing one!


String get_item_tooltip ( int idx ) const

There is currently no description for this method. Please help us by contributing one!


PopupMenu get_popup ( ) const

There is currently no description for this method. Please help us by contributing one!


int get_selectable_item ( bool from_last=false ) const

There is currently no description for this method. Please help us by contributing one!


int get_selected_id ( ) const

There is currently no description for this method. Please help us by contributing one!


Variant get_selected_metadata ( ) const

There is currently no description for this method. Please help us by contributing one!


bool has_selectable_items ( ) const

There is currently no description for this method. Please help us by contributing one!


bool is_item_disabled ( int idx ) const

There is currently no description for this method. Please help us by contributing one!


bool is_item_separator ( int idx ) const

There is currently no description for this method. Please help us by contributing one!


void remove_item ( int idx )

There is currently no description for this method. Please help us by contributing one!


void select ( int idx )

There is currently no description for this method. Please help us by contributing one!


void set_disable_shortcuts ( bool disabled )

There is currently no description for this method. Please help us by contributing one!


void set_item_disabled ( int idx, bool disabled )

There is currently no description for this method. Please help us by contributing one!


void set_item_icon ( int idx, Texture2D texture )

There is currently no description for this method. Please help us by contributing one!


void set_item_id ( int idx, int id )

There is currently no description for this method. Please help us by contributing one!


void set_item_metadata ( int idx, Variant metadata )

There is currently no description for this method. Please help us by contributing one!


void set_item_text ( int idx, String text )

There is currently no description for this method. Please help us by contributing one!


void set_item_tooltip ( int idx, String tooltip )

There is currently no description for this method. Please help us by contributing one!


void show_popup ( )

There is currently no description for this method. Please help us by contributing one!


Theme Property Descriptions

int arrow_margin = 4

There is currently no description for this theme property. Please help us by contributing one!


int modulate_arrow = 0

There is currently no description for this theme property. Please help us by contributing one!


Texture2D arrow

There is currently no description for this theme property. Please help us by contributing one!