Skip to content

Commit

Permalink
Handle zones editor
Browse files Browse the repository at this point in the history
  • Loading branch information
drbig committed Aug 29, 2015
1 parent f1df6b0 commit 010eb4d
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8356,14 +8356,17 @@ void game::zones_manager()

int zone_ui_height = 12;
const int width = use_narrow_sidebar() ? 45 : 55;
WINDOW *w_zones = newwin(TERMY - 2 - zone_ui_height - VIEW_OFFSET_Y * 2, width - 2, VIEW_OFFSET_Y + 1,
TERMX - width + 1 - VIEW_OFFSET_X);
WINDOW *w_zones_border = newwin(TERMY - zone_ui_height - VIEW_OFFSET_Y * 2, width, VIEW_OFFSET_Y,
TERMX - width - VIEW_OFFSET_X);
WINDOW *w_zones_info = newwin(zone_ui_height - 1, width - 2, TERMY - zone_ui_height - VIEW_OFFSET_Y,
TERMX - width + 1 - VIEW_OFFSET_X);
WINDOW *w_zones_info_border = newwin(zone_ui_height, width, TERMY - zone_ui_height - VIEW_OFFSET_Y,
TERMX - width - VIEW_OFFSET_X);
const int offsetX = right_sidebar ? TERMX - VIEW_OFFSET_X - width :
VIEW_OFFSET_X;

WINDOW *w_zones = newwin(TERMY - 2 - zone_ui_height - VIEW_OFFSET_Y * 2, width - 2,
VIEW_OFFSET_Y + 1, offsetX + 1);
WINDOW *w_zones_border = newwin(TERMY - zone_ui_height - VIEW_OFFSET_Y * 2, width,
VIEW_OFFSET_Y, offsetX);
WINDOW *w_zones_info = newwin(zone_ui_height - 1, width - 2,
TERMY - zone_ui_height - VIEW_OFFSET_Y, offsetX + 1);
WINDOW *w_zones_info_border = newwin(zone_ui_height, width,
TERMY - zone_ui_height - VIEW_OFFSET_Y, offsetX);

zones_manager_draw_borders(w_zones_border, w_zones_info_border, zone_ui_height, width);
zones_manager_shortcuts(w_zones_info);
Expand Down

0 comments on commit 010eb4d

Please sign in to comment.