yaze
0.3.2
Link to the Past ROM Editor
Loading...
Searching...
No Matches
scratch_space_panel.cc
Go to the documentation of this file.
1
#include "
app/editor/overworld/panels/scratch_space_panel.h
"
2
3
#include "
app/editor/core/content_registry.h
"
4
#include "
app/editor/core/panel_registration.h
"
5
#include "
app/editor/overworld/overworld_editor.h
"
6
7
namespace
yaze::editor
{
8
9
void
ScratchSpacePanel::Draw
(
bool
* p_open) {
10
auto
* editor =
ContentRegistry::Context::current_editor
();
11
if
(!editor)
return
;
12
13
if
(
auto
* ow_editor =
dynamic_cast<
OverworldEditor
*
>
(editor)) {
14
// Call the existing DrawScratchSpace implementation
15
if
(
auto
status = ow_editor->DrawScratchSpace(); !status.ok()) {
16
LOG_ERROR
(
"ScratchSpacePanel"
,
"Failed to draw: %s"
,
17
status.ToString().c_str());
18
}
19
}
20
}
21
22
REGISTER_PANEL
(
ScratchSpacePanel
);
23
24
}
// namespace yaze::editor
yaze::editor::OverworldEditor
Main UI class for editing overworld maps in A Link to the Past.
Definition
overworld_editor.h:124
yaze::editor::ScratchSpacePanel
Provides a scratch workspace for layout planning and clipboard operations.
Definition
scratch_space_panel.h:19
yaze::editor::ScratchSpacePanel::Draw
void Draw(bool *p_open) override
Draw the panel content.
Definition
scratch_space_panel.cc:9
content_registry.h
LOG_ERROR
#define LOG_ERROR(category, format,...)
Definition
log.h:109
yaze::editor::ContentRegistry::Context::current_editor
Editor * current_editor()
Get the currently active editor.
Definition
content_registry.cc:94
yaze::editor
Editors are the view controllers for the application.
Definition
patch_export_usage.cc:9
overworld_editor.h
panel_registration.h
REGISTER_PANEL
#define REGISTER_PANEL(PanelClass)
Auto-registration macro for panels with default constructors.
Definition
panel_registration.h:39
scratch_space_panel.h
src
app
editor
overworld
panels
scratch_space_panel.cc
Generated by
1.10.0