add canvas id and context id to Canvas
This commit is contained in:
@@ -202,9 +202,10 @@ class GraphicsEditor : public SharedRom, public Editor {
|
||||
gui::Canvas import_canvas_;
|
||||
gui::Canvas scr_canvas_;
|
||||
gui::Canvas super_donkey_canvas_;
|
||||
gui::Canvas current_sheet_canvas_{ImVec2(0x80, 0x20),
|
||||
gui::Canvas current_sheet_canvas_{"CurrentSheetCanvas", ImVec2(0x80, 0x20),
|
||||
gui::CanvasGridSize::k8x8};
|
||||
gui::Canvas link_canvas_{
|
||||
"LinkCanvas",
|
||||
ImVec2(core::kTilesheetWidth * 4, core::kTilesheetHeight * 0x10 * 4),
|
||||
gui::CanvasGridSize::k16x16};
|
||||
absl::Status status_;
|
||||
|
||||
@@ -95,18 +95,19 @@ class Tile16Editor : public context::GfxContext, public SharedRom {
|
||||
uint8_t* all_tiles_types_;
|
||||
|
||||
// Tile16 blockset for selecting the tile to edit
|
||||
gui::Canvas blockset_canvas_{ImVec2(0x100, 0x4000),
|
||||
gui::Canvas blockset_canvas_{"blocksetCanvas", ImVec2(0x100, 0x4000),
|
||||
gui::CanvasGridSize::k32x32};
|
||||
gfx::Bitmap* tile16_blockset_bmp_;
|
||||
|
||||
// Canvas for editing the selected tile
|
||||
gui::Canvas tile16_edit_canvas_{ImVec2(0x40, 0x40),
|
||||
gui::Canvas tile16_edit_canvas_{"Tile16EditCanvas", ImVec2(0x40, 0x40),
|
||||
gui::CanvasGridSize::k64x64};
|
||||
gfx::Bitmap* current_tile16_bmp_;
|
||||
gfx::Bitmap* current_tile8_bmp_;
|
||||
|
||||
// Tile8 canvas to get the tile to drawing in the tile16_edit_canvas_
|
||||
gui::Canvas tile8_source_canvas_{
|
||||
"Tile8SourceCanvas",
|
||||
ImVec2(core::kTilesheetWidth * 4, core::kTilesheetHeight * 0x10 * 4),
|
||||
gui::CanvasGridSize::k32x32};
|
||||
gfx::Bitmap current_gfx_bmp_;
|
||||
|
||||
@@ -244,14 +244,15 @@ class OverworldEditor : public Editor,
|
||||
PaletteEditor palette_editor_;
|
||||
zelda3::overworld::Overworld overworld_;
|
||||
|
||||
gui::Canvas ow_map_canvas_{ImVec2(0x200 * 8, 0x200 * 8),
|
||||
gui::Canvas ow_map_canvas_{"owMapCanvas", ImVec2(0x200 * 8, 0x200 * 8),
|
||||
gui::CanvasGridSize::k64x64};
|
||||
gui::Canvas current_gfx_canvas_{ImVec2(0x100 + 1, 0x10 * 0x40 + 1),
|
||||
gui::Canvas current_gfx_canvas_{"customGfxCanvas",
|
||||
ImVec2(0x100 + 1, 0x10 * 0x40 + 1),
|
||||
gui::CanvasGridSize::k32x32};
|
||||
gui::Canvas blockset_canvas_{ImVec2(0x100 + 1, 0x2000 + 1),
|
||||
gui::Canvas blockset_canvas_{"blocksetCanvas", ImVec2(0x100 + 1, 0x2000 + 1),
|
||||
gui::CanvasGridSize::k32x32};
|
||||
gui::Canvas graphics_bin_canvas_{
|
||||
ImVec2(0x100 + 1, kNumSheetsToLoad * 0x40 + 1),
|
||||
"graphicsBinCanvas", ImVec2(0x100 + 1, kNumSheetsToLoad * 0x40 + 1),
|
||||
gui::CanvasGridSize::k16x16};
|
||||
gui::Canvas properties_canvas_;
|
||||
|
||||
|
||||
@@ -90,7 +90,6 @@ void SpriteEditor::DrawSpriteCanvas() {
|
||||
ImGui::GetContentRegionAvail(), true)) {
|
||||
sprite_canvas_.DrawBackground();
|
||||
sprite_canvas_.DrawContextMenu();
|
||||
// sprite_canvas_.DrawBitmap(oam_bitmap_, 2, 2);
|
||||
sprite_canvas_.DrawGrid();
|
||||
sprite_canvas_.DrawOverlay();
|
||||
|
||||
|
||||
@@ -91,10 +91,11 @@ class SpriteEditor : public SharedRom, public Editor {
|
||||
gui::Bitmap oam_bitmap_; /**< OAM bitmap. */
|
||||
|
||||
gui::Canvas sprite_canvas_{
|
||||
ImVec2(0x200, 0x200), gui::CanvasGridSize::k32x32}; /**< Sprite canvas. */
|
||||
"SpriteCanvas", ImVec2(0x200, 0x200),
|
||||
gui::CanvasGridSize::k32x32}; /**< Sprite canvas. */
|
||||
|
||||
gui::Canvas graphics_sheet_canvas_{
|
||||
ImVec2(0x80 * 2 + 2, 0x40 * 8 + 2),
|
||||
"GraphicsSheetCanvas", ImVec2(0x80 * 2 + 2, 0x40 * 8 + 2),
|
||||
gui::CanvasGridSize::k16x16}; /**< Graphics sheet canvas. */
|
||||
|
||||
std::vector<zsprite::ZSprite> custom_sprites_; /**< Sprites. */
|
||||
|
||||
Reference in New Issue
Block a user