void SetIconSize( Vector2 size )

robot_2Generated
code_blocksInput

Description

The SetIconSize method is used to set the size of the icons displayed on the toolbar. This method allows you to customize the appearance of the toolbar by specifying the desired dimensions for the icons.

Usage

To use the SetIconSize method, you need to provide a Vector2 parameter that represents the width and height of the icons. This method is typically called when you want to adjust the icon size to better fit the design or layout requirements of your application.

Example

// Create a new toolbar instance
Editor.ToolBar myToolBar = new Editor.ToolBar();

// Set the icon size to 32x32 pixels
myToolBar.SetIconSize(new Vector2(32, 32));

// Add options or widgets to the toolbar as needed
myToolBar.AddOption("Save", "save_icon", () => SaveDocument());
myToolBar.AddSeparator();
myToolBar.AddOption("Open", "open_icon", () => OpenDocument());