Graphical User Interface (GUI) components for the application. More...
Namespaces | |
namespace | anonymous_namespace{canvas.cc} |
namespace | zeml |
Zelda Editor Markup Language Functions. | |
Classes | |
struct | AssetObject |
class | Canvas |
Represents a canvas for drawing and manipulating graphics. More... | |
struct | DungeonAsset |
struct | ExampleSelectionWithDeletion |
struct | GfxSheetAssetBrowser |
struct | MultiSelectWithClipper |
struct | OverworldAsset |
struct | SpriteAsset |
struct | UnsortedAsset |
Typedefs | |
using | ItemLabelFlags |
Enumerations | |
enum class | CanvasType { kTile , kBlock , kMap } |
enum class | CanvasMode { kPaint , kSelect } |
enum class | CanvasGridSize { k8x8 , k16x16 , k32x32 , k64x64 } |
Functions | |
void | GraphicsBinCanvasPipeline (int width, int height, int tile_size, int num_sheets_to_load, int canvas_id, bool is_loaded, gfx::BitmapTable &graphics_bin) |
void | BitmapCanvasPipeline (gui::Canvas &canvas, const gfx::Bitmap &bitmap, int width, int height, int tile_size, bool is_loaded, bool scrollbar, int canvas_id) |
ImVec4 | ConvertSnesColorToImVec4 (const SnesColor &color) |
IMGUI_API bool | SnesColorButton (absl::string_view id, SnesColor &color, ImGuiColorEditFlags flags, const ImVec2 &size_arg) |
IMGUI_API bool | SnesColorEdit4 (absl::string_view label, SnesColor *color, ImGuiColorEditFlags flags) |
absl::Status | DisplayPalette (app::gfx::SnesPalette &palette, bool loaded) |
void | SelectablePalettePipeline (uint64_t &palette_id, bool &refresh_graphics, gfx::SnesPalette &palette) |
bool | InputHex (const char *label, uint64_t *data) |
bool | InputHex (const char *label, int *data, int num_digits, float input_width) |
bool | InputHexShort (const char *label, uint32_t *data) |
bool | InputHexWord (const char *label, uint16_t *data, float input_width, bool no_step) |
bool | InputHexWord (const char *label, int16_t *data, float input_width, bool no_step) |
bool | InputHexByte (const char *label, uint8_t *data, float input_width, bool no_step) |
bool | InputHexByte (const char *label, uint8_t *data, uint8_t max_value, float input_width, bool no_step) |
void | ItemLabel (absl::string_view title, ItemLabelFlags flags) |
bool | ListBox (const char *label, int *current_item, const std::vector< std::string > &items, int height_in_items) |
bool | InputTileInfo (const char *label, gfx::TileInfo *tile_info) |
ImGuiID | GetID (const std::string &id) |
void | FileDialogPipeline (absl::string_view display_key, absl::string_view file_extensions, std::optional< absl::string_view > button_text, std::function< void()> callback) |
void | BeginWindowWithDisplaySettings (const char *id, bool *active, const ImVec2 &size, ImGuiWindowFlags flags) |
void | EndWindowWithDisplaySettings () |
void | BeginPadding (int i) |
void | EndPadding () |
void | BeginNoPadding () |
void | EndNoPadding () |
void | BeginChildWithScrollbar (const char *str_id) |
void | BeginChildBothScrollbars (int id) |
void | DrawDisplaySettings (ImGuiStyle *ref) |
void | TextWithSeparators (const absl::string_view &text) |
void | ColorsYaze () |
void | DrawBitmapViewer (const std::vector< gfx::Bitmap > &bitmaps, float scale, int ¤t_bitmap_id) |
TextEditor::LanguageDefinition | GetAssemblyLanguageDef () |
Variables | |
constexpr uint32_t | kBlackColor = IM_COL32(0, 0, 0, 255) |
constexpr uint32_t | kRectangleColor = IM_COL32(32, 32, 32, 255) |
constexpr uint32_t | kWhiteColor = IM_COL32(255, 255, 255, 255) |
constexpr uint32_t | kOutlineRect = IM_COL32(255, 255, 255, 200) |
constexpr ImGuiButtonFlags | kMouseFlags |
const int | kStepOneHex = 0x01 |
const int | kStepFastHex = 0x0F |
constexpr ImVec2 | kDefaultModalSize = ImVec2(200, 0) |
constexpr ImVec2 | kZeroPos = ImVec2(0, 0) |
Graphical User Interface (GUI) components for the application.
|
strong |
|
strong |
|
strong |
void yaze::app::gui::GraphicsBinCanvasPipeline | ( | int | width, |
int | height, | ||
int | tile_size, | ||
int | num_sheets_to_load, | ||
int | canvas_id, | ||
bool | is_loaded, | ||
gfx::BitmapTable & | graphics_bin ) |
Definition at line 801 of file canvas.cc.
References yaze::app::gui::Canvas::draw_list(), yaze::app::gui::Canvas::DrawBackground(), yaze::app::gui::Canvas::DrawContextMenu(), yaze::app::gui::Canvas::DrawGrid(), yaze::app::gui::Canvas::DrawOverlay(), yaze::app::gui::Canvas::DrawTileSelector(), and yaze::app::gui::Canvas::zero_point().
void yaze::app::gui::BitmapCanvasPipeline | ( | gui::Canvas & | canvas, |
const gfx::Bitmap & | bitmap, | ||
int | width, | ||
int | height, | ||
int | tile_size, | ||
bool | is_loaded, | ||
bool | scrollbar, | ||
int | canvas_id ) |
Definition at line 832 of file canvas.cc.
References yaze::app::gui::Canvas::DrawBackground(), yaze::app::gui::Canvas::DrawBitmap(), yaze::app::gui::Canvas::DrawContextMenu(), yaze::app::gui::Canvas::DrawGrid(), yaze::app::gui::Canvas::DrawOverlay(), and yaze::app::gui::Canvas::DrawTileSelector().
Referenced by yaze::app::editor::GfxGroupEditor::DrawBlocksetViewer(), yaze::app::editor::GfxGroupEditor::DrawRoomsetViewer(), yaze::app::editor::GfxGroupEditor::DrawSpritesetViewer(), yaze::app::editor::GraphicsEditor::UpdateScadView(), and yaze::app::editor::Tile16Editor::UpdateTransferTileCanvas().
ImVec4 yaze::app::gui::ConvertSnesColorToImVec4 | ( | const SnesColor & | color | ) |
Definition at line 16 of file color.cc.
References yaze::app::gfx::SnesColor::rgb().
Referenced by SnesColorButton(), and SnesColorEdit4().
IMGUI_API bool yaze::app::gui::SnesColorButton | ( | absl::string_view | id, |
SnesColor & | color, | ||
ImGuiColorEditFlags | flags, | ||
const ImVec2 & | size_arg ) |
Definition at line 25 of file color.cc.
References ConvertSnesColorToImVec4(), and yaze::app::gfx::SnesColor::snes().
Referenced by yaze::app::editor::anonymous_namespace{gfx_group_editor.cc}::DrawPaletteFromPaletteGroup(), yaze::app::editor::PaletteEditor::DrawPaletteGroup(), and SelectablePalettePipeline().
IMGUI_API bool yaze::app::gui::SnesColorEdit4 | ( | absl::string_view | label, |
SnesColor * | color, | ||
ImGuiColorEditFlags | flags ) |
Definition at line 42 of file color.cc.
References yaze::app::gfx::ConvertRgbToSnes(), ConvertSnesColorToImVec4(), yaze::app::gfx::SnesColor::set_rgb(), and yaze::app::gfx::SnesColor::set_snes().
Referenced by yaze::app::editor::PaletteEditor::DrawCustomPalette(), yaze::app::editor::PaletteEditor::DrawModifiedColors(), yaze::app::editor::PaletteEditor::HandleColorPopup(), and yaze::app::editor::PaletteEditor::Update().
absl::Status yaze::app::gui::DisplayPalette | ( | app::gfx::SnesPalette & | palette, |
bool | loaded ) |
Definition at line 56 of file color.cc.
References ASSIGN_OR_RETURN, yaze::app::gfx::SnesPalette::GetColor(), and yaze::app::gfx::SnesPalette::size().
Referenced by yaze::app::editor::ScreenEditor::DrawInventoryMenuEditor().
void yaze::app::gui::SelectablePalettePipeline | ( | uint64_t & | palette_id, |
bool & | refresh_graphics, | ||
gfx::SnesPalette & | palette ) |
Definition at line 129 of file color.cc.
References yaze::app::gfx::SnesPalette::size(), and SnesColorButton().
Referenced by yaze::app::gui::Canvas::DrawContextMenu(), yaze::app::editor::GraphicsEditor::DrawPaletteControls(), yaze::app::editor::DungeonEditor::UpdateDungeonRoomView(), and yaze::app::editor::GraphicsEditor::UpdatePaletteColumn().
IMGUI_API bool yaze::app::gui::InputHex | ( | const char * | label, |
uint64_t * | data ) |
Definition at line 142 of file input.cc.
References kStepFastHex, and kStepOneHex.
Referenced by yaze::app::editor::GraphicsEditor::DrawClipboardImport(), yaze::app::editor::DrawEntranceInserterPopup(), yaze::app::editor::DrawExitEditorPopup(), yaze::app::editor::DrawExitInserterPopup(), yaze::app::editor::GraphicsEditor::DrawFileImport(), yaze::app::editor::DrawOverworldEntrancePopup(), yaze::app::editor::GraphicsEditor::DrawPaletteControls(), yaze::app::editor::DungeonEditor::DrawRoomSelector(), yaze::app::emu::Emulator::RenderMemoryViewer(), yaze::app::editor::MemoryEditorWithDiffChecker::Update(), and yaze::app::editor::GraphicsEditor::UpdatePaletteColumn().
IMGUI_API bool yaze::app::gui::InputHex | ( | const char * | label, |
int * | data, | ||
int | num_digits, | ||
float | input_width ) |
Definition at line 148 of file input.cc.
References ImGui::InputScalarLeft(), kStepFastHex, and kStepOneHex.
IMGUI_API bool yaze::app::gui::InputHexShort | ( | const char * | label, |
uint32_t * | data ) |
Definition at line 155 of file input.cc.
References kStepFastHex, and kStepOneHex.
IMGUI_API bool yaze::app::gui::InputHexWord | ( | const char * | label, |
uint16_t * | data, | ||
float | input_width, | ||
bool | no_step ) |
Definition at line 161 of file input.cc.
References ImGui::InputScalarLeft(), kStepFastHex, and kStepOneHex.
Referenced by yaze::app::gui::Canvas::DrawContextMenu(), yaze::app::editor::OverworldEditor::DrawCustomOverworldMapSettings(), yaze::app::editor::DungeonEditor::DrawDungeonCanvas(), yaze::app::editor::ScreenEditor::DrawDungeonMapsTabs(), yaze::app::editor::DungeonEditor::DrawEntranceSelector(), yaze::app::editor::DrawExitEditorPopup(), yaze::app::editor::DrawOverworldEntrancePopup(), yaze::app::editor::OverworldEditor::DrawOverworldMapSettings(), yaze::app::editor::DungeonEditor::DrawRoomSelector(), yaze::app::editor::SpriteEditor::DrawSpriteCanvas(), InputTileInfo(), yaze::app::gui::zeml::Render(), and yaze::app::emu::Emulator::RenderBreakpointList().
IMGUI_API bool yaze::app::gui::InputHexWord | ( | const char * | label, |
int16_t * | data, | ||
float | input_width, | ||
bool | no_step ) |
Definition at line 168 of file input.cc.
References ImGui::InputScalarLeft(), kStepFastHex, and kStepOneHex.
IMGUI_API bool yaze::app::gui::InputHexByte | ( | const char * | label, |
uint8_t * | data, | ||
float | input_width, | ||
bool | no_step ) |
Definition at line 175 of file input.cc.
References ImGui::InputScalarLeft(), kStepFastHex, and kStepOneHex.
Referenced by yaze::app::editor::GfxGroupEditor::DrawBlocksetViewer(), yaze::app::editor::SpriteEditor::DrawCurrentSheets(), yaze::app::editor::OverworldEditor::DrawCustomOverworldMapSettings(), yaze::app::editor::DungeonEditor::DrawDungeonCanvas(), yaze::app::editor::ScreenEditor::DrawDungeonMapsTabs(), yaze::app::editor::DungeonEditor::DrawEntranceSelector(), yaze::app::editor::DrawExitEditorPopup(), yaze::app::editor::GraphicsEditor::DrawGfxEditToolset(), yaze::app::editor::DrawOverworldEntrancePopup(), yaze::app::editor::OverworldEditor::DrawOverworldMapSettings(), yaze::app::editor::GfxGroupEditor::DrawPaletteViewer(), yaze::app::editor::GfxGroupEditor::DrawRoomsetViewer(), yaze::app::editor::SpriteEditor::DrawSpriteCanvas(), yaze::app::editor::GfxGroupEditor::DrawSpritesetViewer(), yaze::app::editor::Tile16Editor::DrawTileEditControls(), InputTileInfo(), yaze::app::gui::zeml::Render(), yaze::app::emu::Emulator::RenderBreakpointList(), and yaze::app::editor::GfxGroupEditor::Update().
IMGUI_API bool yaze::app::gui::InputHexByte | ( | const char * | label, |
uint8_t * | data, | ||
uint8_t | max_value, | ||
float | input_width, | ||
bool | no_step ) |
Definition at line 182 of file input.cc.
References ImGui::InputScalarLeft(), kStepFastHex, and kStepOneHex.
IMGUI_API void yaze::app::gui::ItemLabel | ( | absl::string_view | title, |
ItemLabelFlags | flags ) |
Definition at line 195 of file input.cc.
Referenced by yaze::app::editor::MusicEditor::DrawToolset().
IMGUI_API bool yaze::app::gui::ListBox | ( | const char * | label, |
int * | current_item, | ||
const std::vector< std::string > & | items, | ||
int | height_in_items ) |
bool yaze::app::gui::InputTileInfo | ( | const char * | label, |
gfx::TileInfo * | tile_info ) |
Definition at line 250 of file input.cc.
References yaze::app::gfx::TileInfo::horizontal_mirror_, yaze::app::gfx::TileInfo::id_, InputHexByte(), InputHexWord(), yaze::app::gfx::TileInfo::over_, yaze::app::gfx::TileInfo::palette_, and yaze::app::gfx::TileInfo::vertical_mirror_.
Referenced by yaze::app::editor::ScreenEditor::DrawDungeonMapsEditor().
IMGUI_API ImGuiID yaze::app::gui::GetID | ( | const std::string & | id | ) |
Definition at line 264 of file input.cc.
Referenced by yaze::app::editor::SpriteEditor::DrawCurrentSheets(), yaze::app::editor::SpriteEditor::DrawSpriteCanvas(), and yaze::app::editor::SpriteEditor::DrawSpritesList().
void yaze::app::gui::FileDialogPipeline | ( | absl::string_view | display_key, |
absl::string_view | file_extensions, | ||
std::optional< absl::string_view > | button_text, | ||
std::function< void()> | callback ) |
Definition at line 266 of file input.cc.
Referenced by yaze::app::editor::GraphicsEditor::DrawCgxImport(), yaze::app::editor::GraphicsEditor::DrawFileImport(), yaze::app::editor::GraphicsEditor::DrawObjImport(), yaze::app::editor::GraphicsEditor::DrawPaletteControls(), yaze::app::editor::GraphicsEditor::DrawScrImport(), yaze::app::editor::GraphicsEditor::DrawTilemapImport(), and yaze::app::editor::Tile16Editor::UpdateTransferTileCanvas().
void yaze::app::gui::BeginWindowWithDisplaySettings | ( | const char * | id, |
bool * | active, | ||
const ImVec2 & | size, | ||
ImGuiWindowFlags | flags ) |
Definition at line 11 of file style.cc.
Referenced by yaze::app::editor::OverworldEditor::DrawOverworldProperties(), and yaze::app::editor::OverworldEditor::DrawToolset().
void yaze::app::gui::EndWindowWithDisplaySettings | ( | ) |
Definition at line 31 of file style.cc.
Referenced by yaze::app::editor::OverworldEditor::DrawOverworldProperties(), and yaze::app::editor::OverworldEditor::DrawToolset().
void yaze::app::gui::BeginPadding | ( | int | i | ) |
Definition at line 36 of file style.cc.
Referenced by yaze::app::editor::OverworldEditor::DrawAreaGraphics(), yaze::app::editor::MessageEditor::DrawCurrentMessage(), yaze::app::editor::OverworldEditor::DrawTile16Selector(), yaze::app::editor::OverworldEditor::DrawTileSelector(), and yaze::app::editor::Tile16Editor::UpdateBlockset().
void yaze::app::gui::EndPadding | ( | ) |
Definition at line 40 of file style.cc.
References EndNoPadding().
Referenced by yaze::app::editor::OverworldEditor::DrawAreaGraphics(), yaze::app::editor::MessageEditor::DrawCurrentMessage(), and yaze::app::editor::Tile16Editor::UpdateBlockset().
void yaze::app::gui::BeginNoPadding | ( | ) |
Definition at line 42 of file style.cc.
Referenced by yaze::app::editor::OverworldEditor::DrawOverworldCanvas().
void yaze::app::gui::EndNoPadding | ( | ) |
Definition at line 46 of file style.cc.
Referenced by yaze::app::editor::OverworldEditor::DrawOverworldCanvas(), yaze::app::editor::OverworldEditor::DrawTile16Selector(), yaze::app::editor::OverworldEditor::DrawTileSelector(), and EndPadding().
void yaze::app::gui::BeginChildWithScrollbar | ( | const char * | str_id | ) |
Definition at line 48 of file style.cc.
Referenced by yaze::app::editor::PaletteEditor::DisplayCategoryTable(), yaze::app::editor::OverworldEditor::DrawAreaGraphics(), yaze::app::editor::OverworldEditor::DrawTile16Selector(), yaze::app::editor::OverworldEditor::DrawTileSelector(), and yaze::app::editor::Tile16Editor::UpdateBlockset().
void yaze::app::gui::BeginChildBothScrollbars | ( | int | id | ) |
Definition at line 53 of file style.cc.
Referenced by yaze::app::editor::OverworldEditor::DrawOverworldCanvas().
void yaze::app::gui::DrawDisplaySettings | ( | ImGuiStyle * | ref | ) |
Definition at line 60 of file style.cc.
Referenced by yaze::app::editor::EditorManager::DrawYazeMenu().
void yaze::app::gui::TextWithSeparators | ( | const absl::string_view & | text | ) |
Definition at line 424 of file style.cc.
Referenced by yaze::app::editor::GraphicsEditor::DrawCgxImport(), yaze::app::editor::GraphicsEditor::DrawClipboardImport(), yaze::app::gui::Canvas::DrawContextMenu(), yaze::app::editor::DrawExitEditorPopup(), yaze::app::editor::GraphicsEditor::DrawExperimentalFeatures(), yaze::app::editor::GraphicsEditor::DrawFileImport(), yaze::app::editor::GraphicsEditor::DrawObjImport(), yaze::app::editor::GraphicsEditor::DrawPaletteControls(), yaze::app::editor::GraphicsEditor::DrawTilemapImport(), and yaze::app::editor::GraphicsEditor::UpdatePaletteColumn().
void yaze::app::gui::ColorsYaze | ( | ) |
Definition at line 431 of file style.cc.
Referenced by yaze::app::core::Controller::CreateGuiContext(), and yaze::test::integration::RunIntegrationTest().
void yaze::app::gui::DrawBitmapViewer | ( | const std::vector< gfx::Bitmap > & | bitmaps, |
float | scale, | ||
int & | current_bitmap_id ) |
Definition at line 530 of file style.cc.
References yaze::app::gfx::Bitmap::height(), yaze::app::gfx::Bitmap::texture(), and yaze::app::gfx::Bitmap::width().
TextEditor::LanguageDefinition yaze::app::gui::GetAssemblyLanguageDef | ( | ) |
Definition at line 596 of file style.cc.
Referenced by yaze::app::editor::AssemblyEditor::AssemblyEditor().
|
constexpr |
Definition at line 36 of file canvas.cc.
Referenced by yaze::app::gui::Canvas::DrawRect(), and yaze::app::gui::Canvas::DrawText().
|
constexpr |
Definition at line 37 of file canvas.cc.
Referenced by yaze::app::gui::Canvas::DrawBackground().
|
constexpr |
Definition at line 38 of file canvas.cc.
Referenced by yaze::app::gui::Canvas::DrawBackground(), yaze::app::gui::Canvas::DrawBitmap(), yaze::app::gui::Canvas::DrawGrid(), yaze::app::gui::Canvas::DrawInfoGrid(), yaze::app::gui::Canvas::DrawOverlay(), yaze::app::gui::Canvas::DrawSelectRect(), and yaze::app::gui::Canvas::DrawText().
|
constexpr |
Definition at line 39 of file canvas.cc.
Referenced by yaze::app::gui::Canvas::DrawOutline().
|
constexpr |
Definition at line 41 of file canvas.cc.
Referenced by yaze::app::gui::Canvas::DrawBackground().
const int yaze::app::gui::kStepOneHex = 0x01 |
Definition at line 139 of file input.cc.
Referenced by InputHex(), InputHex(), InputHexByte(), InputHexByte(), InputHexShort(), InputHexWord(), and InputHexWord().
const int yaze::app::gui::kStepFastHex = 0x0F |
Definition at line 140 of file input.cc.
Referenced by InputHex(), InputHex(), InputHexByte(), InputHexByte(), InputHexShort(), InputHexWord(), and InputHexWord().
|
constexpr |
Definition at line 27 of file input.h.
Referenced by yaze::app::editor::EditorManager::DrawAboutPopup(), yaze::app::editor::EditorManager::DrawInfoPopup(), yaze::app::editor::EditorManager::DrawStatusPopup(), and yaze::app::editor::EditorManager::DrawYazeMenuBar().
|
constexpr |
Definition at line 28 of file input.h.
Referenced by yaze::app::core::anonymous_namespace{controller.cc}::NewMasterFrame().