Freeciv-3.3
Loading...
Searching...
No Matches
Macros | Functions | Variables
menu.c File Reference
#include <SDL2/SDL.h>
#include "fcintl.h"
#include "log.h"
#include "clientutils.h"
#include "game.h"
#include "road.h"
#include "traderoutes.h"
#include "unitlist.h"
#include "client_main.h"
#include "climisc.h"
#include "control.h"
#include "pages_g.h"
#include "dialogs.h"
#include "gotodlg.h"
#include "graphics.h"
#include "gui_id.h"
#include "gui_main.h"
#include "gui_tilespec.h"
#include "mapctrl.h"
#include "mapview.h"
#include "widget.h"
#include "menu.h"

Go to the source code of this file.

Macros

#define local_show(id)
 
#define local_hide(id)
 

Functions

static int unit_order_callback (struct widget *order_widget)
 
static Uint16 redraw_order_widgets (void)
 
static void set_new_order_widget_start_pos (void)
 
void create_units_order_widgets (void)
 
void delete_units_order_widgets (void)
 
void update_order_widgets (void)
 
void undraw_order_widgets (void)
 
void real_menus_init (void)
 
void real_menus_update (void)
 
void disable_order_buttons (void)
 
void enable_order_buttons (void)
 

Variables

struct widgetoptions_button
 
static struct widgetbegin_order_widget_list
 
static struct widgetend_order_widget_list
 
static struct widgetorder_clean_button
 
static struct widgetorder_airbase_button
 
static struct widgetorder_fortress_button
 
static struct widgetorder_build_add_to_city_button
 
static struct widgetorder_mine_button
 
static struct widgetorder_irrigation_button
 
static struct widgetorder_cultivate_button
 
static struct widgetorder_plant_button
 
static struct widgetorder_road_button
 
static struct widgetorder_transform_button
 
static struct widgetorder_trade_button
 

Macro Definition Documentation

◆ local_hide

#define local_hide (   id)
Value:
static struct widget * begin_order_widget_list
Definition menu.c:65
struct widget * get_widget_pointer_from_id(const struct widget *gui_list, Uint16 id, enum scan_direction direction)
Definition widget.c:552
@ SCAN_FORWARD
Definition widget.h:191
@ WF_HIDDEN
Definition widget.h:68
void set_wflag(struct widget *pwidget, enum widget_flag flag)
Definition widget_core.c:54

Definition at line 84 of file menu.c.

◆ local_show

#define local_show (   id)
Value:
void clear_wflag(struct widget *pwidget, enum widget_flag flag)
Definition widget_core.c:62

Definition at line 80 of file menu.c.

Function Documentation

◆ create_units_order_widgets()

void create_units_order_widgets ( void  )

Create units order widgets.

Definition at line 398 of file menu.c.

Referenced by show_game_page().

◆ delete_units_order_widgets()

void delete_units_order_widgets ( void  )

Free resources allocated for unit order widgets.

Definition at line 940 of file menu.c.

Referenced by close_game_page().

◆ disable_order_buttons()

void disable_order_buttons ( void  )

Disable all unit order buttons.

Definition at line 1463 of file menu.c.

Referenced by disable_main_widgets().

◆ enable_order_buttons()

void enable_order_buttons ( void  )

Enable all unit order buttons.

Definition at line 1473 of file menu.c.

Referenced by enable_main_widgets(), and show_game_page().

◆ real_menus_init()

void real_menus_init ( void  )

Initialize menus (sensitivity, name, etc.) based on the current state and current ruleset, etc. Call menus_update().

Definition at line 989 of file menu.c.

◆ real_menus_update()

void real_menus_update ( void  )

Update all of the menus (sensitivity, etc.) based on the current state.

Definition at line 997 of file menu.c.

◆ redraw_order_widgets()

static Uint16 redraw_order_widgets ( void  )
static

Refresh order widgets.

Definition at line 273 of file menu.c.

Referenced by disable_order_buttons(), enable_order_buttons(), real_menus_update(), and update_order_widgets().

◆ set_new_order_widget_start_pos()

static void set_new_order_widget_start_pos ( void  )
static

Reposition order widgets as they fit.

Definition at line 301 of file menu.c.

Referenced by real_menus_update(), and update_order_widgets().

◆ undraw_order_widgets()

void undraw_order_widgets ( void  )

◆ unit_order_callback()

static int unit_order_callback ( struct widget order_widget)
static

User interacted with some unit order widget.

Definition at line 92 of file menu.c.

Referenced by create_units_order_widgets().

◆ update_order_widgets()

void update_order_widgets ( void  )

Draw order widgets to their currently correct place.

Definition at line 952 of file menu.c.

Referenced by real_resize_window_callback(), toggle_map_window_callback(), and toggle_unit_info_window_callback().

Variable Documentation

◆ begin_order_widget_list

struct widget* begin_order_widget_list
static

◆ end_order_widget_list

struct widget* end_order_widget_list
static

◆ options_button

struct widget* options_button
extern

Definition at line 103 of file optiondlg.c.

Referenced by real_menus_update().

◆ order_airbase_button

struct widget* order_airbase_button
static

Definition at line 69 of file menu.c.

Referenced by create_units_order_widgets(), and real_menus_update().

◆ order_build_add_to_city_button

struct widget* order_build_add_to_city_button
static

Definition at line 71 of file menu.c.

Referenced by create_units_order_widgets(), and real_menus_update().

◆ order_clean_button

struct widget* order_clean_button
static

Definition at line 68 of file menu.c.

Referenced by create_units_order_widgets(), and real_menus_update().

◆ order_cultivate_button

struct widget* order_cultivate_button
static

Definition at line 74 of file menu.c.

Referenced by create_units_order_widgets(), and real_menus_update().

◆ order_fortress_button

struct widget* order_fortress_button
static

Definition at line 70 of file menu.c.

Referenced by create_units_order_widgets(), and real_menus_update().

◆ order_irrigation_button

struct widget* order_irrigation_button
static

Definition at line 73 of file menu.c.

Referenced by create_units_order_widgets(), and real_menus_update().

◆ order_mine_button

struct widget* order_mine_button
static

Definition at line 72 of file menu.c.

Referenced by create_units_order_widgets(), and real_menus_update().

◆ order_plant_button

struct widget* order_plant_button
static

Definition at line 75 of file menu.c.

Referenced by create_units_order_widgets(), and real_menus_update().

◆ order_road_button

struct widget* order_road_button
static

Definition at line 76 of file menu.c.

Referenced by create_units_order_widgets(), and real_menus_update().

◆ order_trade_button

struct widget* order_trade_button
static

Definition at line 78 of file menu.c.

Referenced by create_units_order_widgets(), and real_menus_update().

◆ order_transform_button

struct widget* order_transform_button
static

Definition at line 77 of file menu.c.

Referenced by create_units_order_widgets(), and real_menus_update().