Freeciv-3.2
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions | Variables
cma_fe.c File Reference
#include <SDL3/SDL.h>
#include "fcintl.h"
#include "game.h"
#include "client_main.h"
#include "citydlg.h"
#include "cityrep.h"
#include "cma_fec.h"
#include "colors.h"
#include "graphics.h"
#include "gui_id.h"
#include "gui_main.h"
#include "gui_tilespec.h"
#include "mapview.h"
#include "sprite.h"
#include "themespec.h"
#include "widget.h"
#include "cma_fe.h"

Go to the source code of this file.

Data Structures

struct  hmove
 
struct  cma_dialog
 

Enumerations

enum  specialist_type { SP_ELVIS , SP_SCIENTIST , SP_TAXMAN , SP_LAST }
 

Functions

static void set_cma_hscrollbars (void)
 
static int cma_dlg_callback (struct widget *pwindow)
 
static int exit_cma_dialog_callback (struct widget *pwidget)
 
static Uint16 scroll_mouse_button_up (SDL_MouseButtonEvent *button_event, void *data)
 
static Uint16 scroll_mouse_motion_handler (SDL_MouseMotionEvent *motion_event, void *data)
 
static int min_horiz_cma_callback (struct widget *pwidget)
 
static int factor_horiz_cma_callback (struct widget *pwidget)
 
static int toggle_cma_celebrating_callback (struct widget *pwidget)
 
static int save_cma_window_callback (struct widget *pwindow)
 
static int ok_save_cma_callback (struct widget *pwidget)
 
static int cancel_sld_cma_callback (struct widget *pwidget)
 
static int save_cma_callback (struct widget *pwidget)
 
static int ld_cma_callback (struct widget *pwidget)
 
static void popup_load_del_presets_dialog (bool load, struct widget *button)
 
static int load_cma_callback (struct widget *pwidget)
 
static int del_cma_callback (struct widget *pwidget)
 
static int run_cma_callback (struct widget *pwidget)
 
static int run_cma_once_callback (struct widget *pwidget)
 
static int stop_cma_callback (struct widget *pwidget)
 
void update_city_cma_dialog (void)
 
void popup_city_cma_dialog (struct city *pcity)
 
void popdown_city_cma_dialog (void)
 

Variables

static struct cma_dialogcma = NULL
 

Enumeration Type Documentation

◆ specialist_type

Enumerator
SP_ELVIS 
SP_SCIENTIST 
SP_TAXMAN 
SP_LAST 

Definition at line 58 of file cma_fe.c.

Function Documentation

◆ cancel_sld_cma_callback()

static int cancel_sld_cma_callback ( struct widget pwidget)
static

Cancel : SAVE, LOAD, DELETE Dialogs

Definition at line 282 of file cma_fe.c.

◆ cma_dlg_callback()

static int cma_dlg_callback ( struct widget pwindow)
static

User interacted with cma dialog.

Definition at line 69 of file cma_fe.c.

◆ del_cma_callback()

static int del_cma_callback ( struct widget pwidget)
static

User interacted with delete cma settings -widget

Definition at line 624 of file cma_fe.c.

◆ exit_cma_dialog_callback()

static int exit_cma_dialog_callback ( struct widget pwidget)
static

User interacted with cma dialog close button.

Definition at line 77 of file cma_fe.c.

◆ factor_horiz_cma_callback()

static int factor_horiz_cma_callback ( struct widget pwidget)
static

User interacted with factor horizontal cma scrollbar

Definition at line 191 of file cma_fe.c.

◆ ld_cma_callback()

static int ld_cma_callback ( struct widget pwidget)
static

User interacted with some preset cma button.

Definition at line 436 of file cma_fe.c.

◆ load_cma_callback()

static int load_cma_callback ( struct widget pwidget)
static

User interacted with load cma settings -widget

Definition at line 612 of file cma_fe.c.

◆ min_horiz_cma_callback()

static int min_horiz_cma_callback ( struct widget pwidget)
static

User interacted with minimal horizontal cma scrollbar

Definition at line 151 of file cma_fe.c.

◆ ok_save_cma_callback()

static int ok_save_cma_callback ( struct widget pwidget)
static

User interacted with "yes" button from save cma dialog.

Definition at line 256 of file cma_fe.c.

◆ popdown_city_cma_dialog()

void popdown_city_cma_dialog ( void  )

Close cma dialog

Definition at line 1286 of file cma_fe.c.

◆ popup_city_cma_dialog()

void popup_city_cma_dialog ( struct city pcity)

Open cma dialog for city.

Definition at line 887 of file cma_fe.c.

◆ popup_load_del_presets_dialog()

static void popup_load_del_presets_dialog ( bool  load,
struct widget button 
)
static

User clicked either load or delete preset widget.

Definition at line 470 of file cma_fe.c.

◆ run_cma_callback()

static int run_cma_callback ( struct widget pwidget)
static

Changes the workers of the city to the cma parameters and puts the city under agent control

Definition at line 639 of file cma_fe.c.

◆ run_cma_once_callback()

static int run_cma_once_callback ( struct widget pwidget)
static

Changes the workers of the city to the cma parameters

Definition at line 652 of file cma_fe.c.

◆ save_cma_callback()

static int save_cma_callback ( struct widget pwidget)
static

User interacted with cma setting saving button.

Definition at line 300 of file cma_fe.c.

◆ save_cma_window_callback()

static int save_cma_window_callback ( struct widget pwindow)
static

User interacted with widget that result in cma window getting saved.

Definition at line 248 of file cma_fe.c.

◆ scroll_mouse_button_up()

static Uint16 scroll_mouse_button_up ( SDL_MouseButtonEvent button_event,
void data 
)
static

User released mouse button while in scrollbar.

Definition at line 90 of file cma_fe.c.

◆ scroll_mouse_motion_handler()

static Uint16 scroll_mouse_motion_handler ( SDL_MouseMotionEvent motion_event,
void data 
)
static

User moved mouse while holding scrollbar.

Definition at line 99 of file cma_fe.c.

◆ set_cma_hscrollbars()

static void set_cma_hscrollbars ( void  )
static

Setup horizontal cma scrollbars

Definition at line 686 of file cma_fe.c.

◆ stop_cma_callback()

static int stop_cma_callback ( struct widget pwidget)
static

User interacted with release city from cma -widget

Definition at line 671 of file cma_fe.c.

◆ toggle_cma_celebrating_callback()

static int toggle_cma_celebrating_callback ( struct widget pwidget)
static

User interacted with cma celebrating -toggle.

Definition at line 231 of file cma_fe.c.

◆ update_city_cma_dialog()

void update_city_cma_dialog ( void  )

Update cma dialog

Definition at line 733 of file cma_fe.c.

Variable Documentation

◆ cma

struct cma_dialog * cma = NULL
static