Freeciv-3.2: /fast/freeciv/nightly/S3_2/client/gui-sdl3/menu.c File Reference

Freeciv-3.2

Loading...
Searching...
No Matches
Macros | Functions | Variables
menu.c File Reference
`#include <SDL3/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 "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 "pages.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 widget * | options_button
static struct widget * | begin_order_widget_list
static struct widget * | end_order_widget_list
static struct widget * | order_clean_button
static struct widget * | order_airbase_button
static struct widget * | order_fortress_button
static struct widget * | order_build_add_to_city_button
static struct widget * | order_mine_button
static struct widget * | order_irrigation_button
static struct widget * | order_cultivate_button
static struct widget * | order_plant_button
static struct widget * | order_road_button
static struct widget * | order_transform_button
static struct widget * | order_trade_button

## Macro Definition Documentation

## ◆ local_hide

#define local_hide | ( |  | id | ) |

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

Definition at line 80 of file menu.c.

## ◆ local_show

#define local_show | ( |  | id | ) |

Value:
clear_wflag(get_widget_pointer_from_id(begin_order_widget_list, id, SCAN_FORWARD), \
WF_HIDDEN)
clear_wflag
void clear_wflag(struct widget *pwidget, enum widget_flag flag)
Definition widget_core.c:62

Definition at line 76 of file menu.c.

## Function Documentation

## ◆ create_units_order_widgets()

void create_units_order_widgets | ( | void |  | ) |

Create units order widgets.

Definition at line 394 of file menu.c.

## ◆ delete_units_order_widgets()

void delete_units_order_widgets | ( | void |  | ) |

Free resources allocated for unit order widgets.

Definition at line 936 of file menu.c.

## ◆ disable_order_buttons()

void disable_order_buttons | ( | void |  | ) |

Disable all unit order buttons.

Definition at line 1458 of file menu.c.

## ◆ enable_order_buttons()

void enable_order_buttons | ( | void |  | ) |

Enable all unit order buttons.

Definition at line 1468 of file menu.c.

## ◆ 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 985 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 993 of file menu.c.

## ◆ redraw_order_widgets()

static Uint16 redraw_order_widgets | ( | void |  | ) |

static

Refresh order widgets.

Definition at line 269 of file menu.c.

## ◆ 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 297 of file menu.c.

## ◆ undraw_order_widgets()

void undraw_order_widgets | ( | void |  | ) |

Clear unit order widgets from view.

Definition at line 957 of file menu.c.

## ◆ unit_order_callback()

static int unit_order_callback | ( | struct widget * | order_widget | ) |

static

User interacted with some unit order widget.

Definition at line 88 of file menu.c.

## ◆ update_order_widgets()

void update_order_widgets | ( | void |  | ) |

Draw order widgets to their currently correct place.

Definition at line 948 of file menu.c.

## Variable Documentation

## ◆ begin_order_widget_list

struct widget* begin_order_widget_list

static

Definition at line 61 of file menu.c.

## ◆ end_order_widget_list

struct widget* end_order_widget_list

static

Definition at line 62 of file menu.c.

## ◆ options_button

struct widget* options_button

extern

Definition at line 103 of file optiondlg.c.

Referenced by back_callback(), disable_options_button(), enable_options_button(), and init_options_button().

## ◆ order_airbase_button

struct widget* order_airbase_button

static

Definition at line 65 of file menu.c.

## ◆ order_build_add_to_city_button

struct widget* order_build_add_to_city_button

static

Definition at line 67 of file menu.c.

## ◆ order_clean_button

struct widget* order_clean_button

static

Definition at line 64 of file menu.c.

## ◆ order_cultivate_button

struct widget* order_cultivate_button

static

Definition at line 70 of file menu.c.

## ◆ order_fortress_button

struct widget* order_fortress_button

static

Definition at line 66 of file menu.c.

## ◆ order_irrigation_button

struct widget* order_irrigation_button

static

Definition at line 69 of file menu.c.

## ◆ order_mine_button

struct widget* order_mine_button

static

Definition at line 68 of file menu.c.

## ◆ order_plant_button

struct widget* order_plant_button

static

Definition at line 71 of file menu.c.

## ◆ order_road_button

struct widget* order_road_button

static

Definition at line 72 of file menu.c.

## ◆ order_trade_button

struct widget* order_trade_button

static

Definition at line 74 of file menu.c.

## ◆ order_transform_button

struct widget* order_transform_button

static

Definition at line 73 of file menu.c.