#include "editor.h" #include "asset.h" #include "gui.h" #include "map.h" #include "render.h" static GUI_Scroll_State map_ss = { 0 }; void draw_map_scrollable( GUI* g, Renderer* r, const Rect* rect, const GUI_Scroll_State* ss ) { (void)g; (void)ss; ren_texture(r, rect, get_texture(asset_id_floorboards_texture)); } void edit_map(Editor* e, GUI* g, Map* m) { Rect b = gui_viewport(g); Rect t = gui_cut_up(&b, gui_text_height() + 4); (void)e; (void)m; gui_btn(g, gui_cut_left(&t, gui_text_width("Load", 4) + 4), "Save"); gui_btn(g, gui_cut_left(&t, gui_text_width("Save", 4) + 4), "Load"); gui_scrollable(g, b, &map_ss, draw_map_scrollable); }