- struct Win win_keys = init_win(&win_meta, "Keys",
- 0, 29, &world, draw_keys_win);
- struct Win win_info = init_win(&win_meta, "Info",
- 2, 20, &world, draw_info_win);
- uint16_t height_logwin = win_meta.padframe.size.y
- - (2 + win_info.frame.size.y);
- struct Win win_log = init_win(&win_meta, "Log",
- height_logwin, 20, &world, draw_log_win);
- uint16_t width_mapwin = win_meta.padframe.size.x - win_keys.frame.size.x
- - win_log.frame.size.x - 2;
- struct Win win_map = init_win(&win_meta, "Map",
- 0, width_mapwin, &world, draw_map_win);
- toggle_window(&win_meta, &win_keys);
- toggle_window(&win_meta, &win_map);
- toggle_window(&win_meta, &win_info);
- toggle_window(&win_meta, &win_log);
+ world.wins.meta = &win_meta;
+ world.wins.keys = init_win_from_file(&world, "Keys", draw_keys_win);
+ set_cleanup_flag(CLEANUP_WIN_KEYS);
+ world.wins.info = init_win_from_file(&world, "Info", draw_info_win);
+ set_cleanup_flag(CLEANUP_WIN_INFO);
+ world.wins.log = init_win_from_file(&world, "Log", draw_log_win);
+ set_cleanup_flag(CLEANUP_WIN_LOG);
+ world.wins.map = init_win_from_file(&world, "Map", draw_map_win);
+ set_cleanup_flag(CLEANUP_WIN_MAP);
+
+ sorted_wintoggle(&world);