Menu Events
Menu events in ScaleformUI are specific triggers that allow developers to execute actions in response to user interactions with the menu. These events ensure that the menu system stays dynamic and responsive, improving the user experience.
OnIndexChange
Triggered when the user presses up or down, changing the current selection.
public event IndexChangedEvent OnIndexChange;
--- Triggered when the user presses up or down, changing the current selection.
menu.OnIndexChange = function(menu, newindex)
end
OnListChange
Triggered when the user presses left or right, changing a list position.
public event ListChangedEvent OnListChange;
--- Triggered when the user presses left or right, changing a list position.
menu.OnListChange = function(menu, list, newindex)
end
OnSliderChange
Triggered when the user presses left or right, changing a slider position.
public event SliderChangedEvent OnSliderChange;
--- Triggered when the user presses left or right, changing a slider position.
menu.OnSliderChange = function(menu, slider, newindex)
end
OnProgressChange
Triggered when the user changes the value of a progress item.
public event OnProgressChanged OnProgressChange;
--- Triggered when the user changes the value of a progress item.
menu.OnProgressChange = function(menu, progress, newindex)
end
OnCheckboxChange
Triggered when the user presses enter on a checkbox item.
public event CheckboxChangeEvent OnCheckboxChange;
--- Triggered when the user presses enter on a checkbox item.
menu.OnCheckboxChange = function(menu, item, checked)
end
OnListSelect
Triggered when the user selects a list item.
public event ListSelectedEvent OnListSelect;
--- Triggered when the user selects a list item.
menu.OnListSelect = function(menu, list, index)
end
OnSliderSelect
Triggered when the user selects a slider item.
public event SliderSelectedEvent OnSliderSelect;
--- Triggered when the user selects a slider item.
menu.OnSliderSelect = function(menu, slider, index)
end
OnProgressSelect
Triggered when the user selects a progress item.
public event OnProgressSelected OnProgressSelect;
--- Triggered when the user selects a progress item.
menu.OnProgressSelect = function(menu, progress, index)
end
OnStatsSelect
Triggered when the user selects a stats item.
public event StatItemProgressChange OnStatsItemChanged;
--- Triggered when the user selects a stats item.
menu.OnStatsSelect = function(menu, progress, index)
end
OnItemSelect
Triggered when the user selects a simple item.
public event ItemSelectEvent OnItemSelect;
--- Triggered when the user selects a simple item.
menu.OnItemSelect = function(menu, item, index)
end
OnMenuOpen
Triggered when the menu is opened.
public event MenuOpenedEvent OnMenuOpen;
--- Triggered when the menu is opened.
menu.OnMenuOpen = function(menu)
end
OnMenuClose
Triggered when the menu is closed.
public event MenuClosedEvent OnMenuClose;
--- Triggered when the menu is closed.
menu.OnMenuClose = function(menu)
end
OnColorPanelChanged
Triggered when the user changes the index of a color panel.
public event ColorPanelChangedEvent OnColorPanelChange;
--- Triggered when the user changes the index of a color panel.
menu.OnColorPanelChanged = function(menu, item, index)
end
OnPercentagePanelChanged
Triggered when the user changes the value of a percentage panel.
public event PercentagePanelChangedEvent OnPercentagePanelChange;
--- Triggered when the user changes the value of a percentage panel.
menu.OnPercentagePanelChanged = function(menu, item, index)
end
OnGridPanelChanged
Triggered when the user changes the value of a grid panel.
public event GridPanelChangedEvent OnGridPanelChange;
--- Triggered when the user changes the value of a grid panel.
menu.OnGridPanelChanged = function(menu, item, index)
end
ExtensionMethod
Triggered to run a custom method for extending the menu behavior.
public event ExtensionMethodEvent ExtensionMethod;
--- Triggered to run a custom method for extending the menu behavior.
menu.ExtensionMethod = function(menu)
end