#pragma once #include "uilayer.h" #include "bitmap_font.h" #include "../Rendering/graphics_device.h" #include #define EDITOR_MAX_PANELS 16 typedef enum { PANEL_SCENE, PANEL_INSPECTOR, PANEL_CONSOLE, PANEL_ASSETS, PANEL_VIEWPORT, } PanelType; typedef struct { PanelType type; const char* title; int x, y, w, h; int visible; int collapsed; int active_tab; } EditorPanel; typedef struct { int mouse_x, mouse_y; int mouse_lbtn; int mouse_rbtn; int key_down[256]; char text_input[256]; int text_len; } EditorInput; typedef struct { GraphicsDevice* device; UILayer ui; BitmapFont font; EditorPanel panels[EDITOR_MAX_PANELS]; int panel_count; EditorInput input; float time; char console_lines[32][256]; int console_count; int console_scroll; char selected_entity[128]; int scene_entities_count; float viewport_rotation; } Editor; int editor_init(Editor* ed, GraphicsDevice* dev); void editor_shutdown(Editor* ed); void editor_update(Editor* ed, float dt); void editor_render(Editor* ed); void editor_handle_input(Editor* ed, int msg, int wp, int lp);