Example #1
0
/****************************************************************************
  Thaw the drawing of the map.
****************************************************************************/
void mapview_thaw(void)
{
  if (1 < mapview_frozen_level) {
    mapview_frozen_level--;
  } else {
    fc_assert(0 < mapview_frozen_level);
    mapview_frozen_level = 0;
    dirty_all();
  }
}
Example #2
0
/**************************************************************************
...
**************************************************************************/
void popupinfo_popdown_callback(Widget w, XtPointer client_data,
        XtPointer call_data)
{
  bool *full = client_data;

  if (*full) {
    update_map_canvas_visible();
  } else {
    dirty_all();
  }

  XtDestroyWidget(w);
}
Example #3
0
/****************************************************************************
  Really resize the main window.
****************************************************************************/
static void real_resize_window_callback(void *data)
{
    struct widget *widget;
    Uint32 flags = Main.screen->flags;

    if (gui_sdl_fullscreen) {
        flags |= SDL_FULLSCREEN;
    } else {
        flags &= ~SDL_FULLSCREEN;
    }
    set_video_mode(gui_sdl_screen.width, gui_sdl_screen.height, flags);

    if (C_S_RUNNING == client_state()) {
        /* Move units window to botton-right corner. */
        set_new_unitinfo_window_pos();
        /* Move minimap window to botton-left corner. */
        set_new_minimap_window_pos();

        /* Move cooling/warming icons to botton-right corner. */
        widget = get_widget_pointer_form_main_list(ID_WARMING_ICON);
        widget_set_position(widget, (Main.screen->w - adj_size(10)
                                     - (widget->size.w * 2)), widget->size.y);

        widget = get_widget_pointer_form_main_list(ID_COOLING_ICON);
        widget_set_position(widget, (Main.screen->w - adj_size(10)
                                     - widget->size.w), widget->size.y);

        map_canvas_resized(Main.screen->w, Main.screen->h);
        update_info_label();
        update_unit_info_label(get_units_in_focus());
        center_on_something();      /* With redrawing full map. */
        update_order_widgets();
    } else {
        draw_intro_gfx();
        dirty_all();
    }
    flush_all();
}