Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

EditorIcons

Add this in your code:

#include <editor/ui/editor_icons.h>

Description

Class used to get icon textures of the editor.
Can be used for Gizmo.

Static methods


GetIcons

Get the list of all editor icons.

const std::vector<std::shared_ptr<Texture>>& GetIcons()

Code sample:

const std::vector<std::shared_ptr<Texture>>& icons = EditorIcons::GetIcons();

const std::shared_ptr<Texture>& cameraIcon = icons[IconName::Icon_Camera];

GetIcon

Get an icon by its name enum.

Parameters:

  • iconName: Icon name Enum
const std::shared_ptr<Texture>& GetIcon(IconName iconName)

Code sample:

const std::shared_ptr<Texture>& cameraIcon = EditorIcons::GetIcon(IconName::Icon_Camera);