#include <asset_browser.h>
Public Member Functions | |
void | Initialize (const std::array< gfx::Bitmap, kNumGfxSheets > &bmp_manager) |
void | AddItems (int count) |
void | ClearItems () |
void | UpdateLayoutSizes (float avail_width) |
void | Draw (const std::array< gfx::Bitmap, kNumGfxSheets > &bmp_manager) |
Public Attributes | |
bool | ShowTypeOverlay = true |
bool | AllowSorting = true |
bool | AllowDragUnselected = false |
bool | AllowBoxSelect = true |
float | IconSize = 32.0f |
int | IconSpacing = 10 |
int | IconHitSpacing = 4 |
bool | StretchSpacing = true |
ImVector< AssetObject > | Items |
ExampleSelectionWithDeletion | Selection |
ImGuiID | NextItemId = 0 |
bool | RequestDelete = false |
bool | RequestSort = false |
float | ZoomWheelAccum = 0.0f |
ImVec2 | LayoutItemSize |
ImVec2 | LayoutItemStep |
float | LayoutItemSpacing = 0.0f |
float | LayoutSelectableSpacing = 0.0f |
float | LayoutOuterPadding = 0.0f |
int | LayoutColumnCount = 0 |
int | LayoutLineCount = 0 |
bool | Initialized = false |
Definition at line 154 of file asset_browser.h.
|
inline |
Definition at line 191 of file asset_browser.h.
References Initialized, Items, and yaze::app::kNumGfxSheets.
Referenced by yaze::app::editor::GraphicsEditor::Update().
|
inline |
Definition at line 199 of file asset_browser.h.
References Items, NextItemId, and RequestSort.
|
inline |
Definition at line 208 of file asset_browser.h.
|
inline |
Definition at line 216 of file asset_browser.h.
References IconHitSpacing, IconSize, IconSpacing, IM_MAX, Items, LayoutColumnCount, LayoutItemSize, LayoutItemSpacing, LayoutItemStep, LayoutLineCount, LayoutOuterPadding, LayoutSelectableSpacing, and StretchSpacing.
Referenced by Draw().
void yaze::app::gui::GfxSheetAssetBrowser::Draw | ( | const std::array< gfx::Bitmap, kNumGfxSheets > & | bmp_manager | ) |
Definition at line 13 of file asset_browser.cc.
References AllowBoxSelect, AllowDragUnselected, AllowSorting, yaze::app::gui::ExampleSelectionWithDeletion::ApplyDeletionPostLoop(), yaze::app::gui::ExampleSelectionWithDeletion::ApplyDeletionPreLoop(), IconHitSpacing, IconSize, IconSpacing, yaze::app::gui::AssetObject::ID, IM_CLAMP, IM_MIN, Items, LayoutColumnCount, LayoutItemSize, LayoutItemSpacing, LayoutItemStep, LayoutLineCount, LayoutOuterPadding, LayoutSelectableSpacing, RequestDelete, RequestSort, Selection, ShowTypeOverlay, yaze::app::gui::AssetObject::SortWithSortSpecs(), StretchSpacing, yaze::app::gui::AssetObject::Type, UpdateLayoutSizes(), and ZoomWheelAccum.
Referenced by yaze::app::editor::GraphicsEditor::Update().
bool yaze::app::gui::GfxSheetAssetBrowser::ShowTypeOverlay = true |
Definition at line 156 of file asset_browser.h.
Referenced by Draw().
bool yaze::app::gui::GfxSheetAssetBrowser::AllowSorting = true |
Definition at line 157 of file asset_browser.h.
Referenced by Draw().
bool yaze::app::gui::GfxSheetAssetBrowser::AllowDragUnselected = false |
Definition at line 158 of file asset_browser.h.
Referenced by Draw().
bool yaze::app::gui::GfxSheetAssetBrowser::AllowBoxSelect = true |
Definition at line 159 of file asset_browser.h.
Referenced by Draw().
float yaze::app::gui::GfxSheetAssetBrowser::IconSize = 32.0f |
Definition at line 160 of file asset_browser.h.
Referenced by Draw(), and UpdateLayoutSizes().
int yaze::app::gui::GfxSheetAssetBrowser::IconSpacing = 10 |
Definition at line 161 of file asset_browser.h.
Referenced by Draw(), and UpdateLayoutSizes().
int yaze::app::gui::GfxSheetAssetBrowser::IconHitSpacing = 4 |
Definition at line 165 of file asset_browser.h.
Referenced by Draw(), and UpdateLayoutSizes().
bool yaze::app::gui::GfxSheetAssetBrowser::StretchSpacing = true |
Definition at line 166 of file asset_browser.h.
Referenced by Draw(), and UpdateLayoutSizes().
ImVector<AssetObject> yaze::app::gui::GfxSheetAssetBrowser::Items |
Definition at line 169 of file asset_browser.h.
Referenced by AddItems(), ClearItems(), Draw(), Initialize(), and UpdateLayoutSizes().
ExampleSelectionWithDeletion yaze::app::gui::GfxSheetAssetBrowser::Selection |
Definition at line 172 of file asset_browser.h.
Referenced by ClearItems(), and Draw().
ImGuiID yaze::app::gui::GfxSheetAssetBrowser::NextItemId = 0 |
Definition at line 174 of file asset_browser.h.
Referenced by AddItems().
bool yaze::app::gui::GfxSheetAssetBrowser::RequestDelete = false |
Definition at line 175 of file asset_browser.h.
Referenced by Draw().
bool yaze::app::gui::GfxSheetAssetBrowser::RequestSort = false |
Definition at line 176 of file asset_browser.h.
Referenced by AddItems(), and Draw().
float yaze::app::gui::GfxSheetAssetBrowser::ZoomWheelAccum = 0.0f |
Definition at line 178 of file asset_browser.h.
Referenced by Draw().
ImVec2 yaze::app::gui::GfxSheetAssetBrowser::LayoutItemSize |
Definition at line 182 of file asset_browser.h.
Referenced by Draw(), and UpdateLayoutSizes().
ImVec2 yaze::app::gui::GfxSheetAssetBrowser::LayoutItemStep |
Definition at line 183 of file asset_browser.h.
Referenced by Draw(), and UpdateLayoutSizes().
float yaze::app::gui::GfxSheetAssetBrowser::LayoutItemSpacing = 0.0f |
Definition at line 184 of file asset_browser.h.
Referenced by Draw(), and UpdateLayoutSizes().
float yaze::app::gui::GfxSheetAssetBrowser::LayoutSelectableSpacing = 0.0f |
Definition at line 185 of file asset_browser.h.
Referenced by Draw(), and UpdateLayoutSizes().
float yaze::app::gui::GfxSheetAssetBrowser::LayoutOuterPadding = 0.0f |
Definition at line 186 of file asset_browser.h.
Referenced by Draw(), and UpdateLayoutSizes().
int yaze::app::gui::GfxSheetAssetBrowser::LayoutColumnCount = 0 |
Definition at line 187 of file asset_browser.h.
Referenced by Draw(), and UpdateLayoutSizes().
int yaze::app::gui::GfxSheetAssetBrowser::LayoutLineCount = 0 |
Definition at line 188 of file asset_browser.h.
Referenced by Draw(), and UpdateLayoutSizes().
bool yaze::app::gui::GfxSheetAssetBrowser::Initialized = false |
Definition at line 189 of file asset_browser.h.
Referenced by Initialize(), and yaze::app::editor::GraphicsEditor::Update().