EditorShell class
#include <Jazz2/Editor/Shell/EditorShell.h>
Interface of the level editor on a desktop.
The menu bar and the toolbar at the top, the tools on the left with the tiles and the events to pick from next to them, the layers and their properties on the right and the status bar at the bottom. The level is shown behind all of it, the part the panels leave uncovered is the view (see GetViewRect()). The panel on the left with the tiles and the one on the right can float over the level instead, see UI::
Public static functions
- static auto IsExpertAction(StringView actionId) -> bool
- Returns
trueif an action is offered only to experts, see EditorSettings::Expert.
Constructors, destructors, conversion operators
- EditorShell(EditorSession& session) explicit
- ~EditorShell() override
Public functions
- auto GetViewRect() const -> Rectf
- Returns the part of the screen the level is seen in, between the panels.
- auto IsCompact() const -> bool
- Returns
trueif the interface is laid out for a small screen, with the panels in drawers. - void ToggleDrawer(bool picker)
- Opens or closes the drawer of the panel with the tiles and the events, or of the panel on the right.
- auto IsDrawerOpen(bool picker) const -> bool
- Returns
trueif the drawer of a panel is open. - auto FindDialog(StringView id) const -> Element*
- Returns a dialog shown under an identifier, see ShowSingleDialog().
- void TrackDialog(StringView id, Element* dialog, Function<void()>&& onShownAgain)
- Remembers a dialog shown under an identifier until it's closed, with what to do when it's to be shown again.
- void ForgetDialog(Element* dialog)
- Forgets a dialog that was closed.
- void ShowDialogAgain(Element* dialog)
- Does what a dialog was shown with for when it's to be shown again, see TrackDialog().
- void Arrange(const Context& context, const Rectf& bounds) override
- void Draw(Painter& painter) override
- void Update(float timeMult) override
- auto HitTest(Vector2f pos) -> Element* override
-
void DrawSceneEvents(UI::
Canvas& canvas) - Draws the sprites of the events into the level, among its layers, their marks are drawn over it.