Freeciv-3.3
Loading...
Searching...
No Matches
Functions | Variables
gamedlgs.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "log.h"
#include "shared.h"
#include "string_vector.h"
#include "support.h"
#include "events.h"
#include "fcintl.h"
#include "government.h"
#include "multipliers.h"
#include "client_main.h"
#include "options.h"
#include "chatline.h"
#include "cityrep.h"
#include "dialogs.h"
#include "gui_main.h"
#include "gui_stuff.h"
#include "ratesdlg.h"
#include "gamedlgs.h"

Go to the source code of this file.

Functions

static void rates_changed_callback (GtkWidget *range)
 
static void rates_set_values (int tax, int no_tax_scroll, int lux, int no_lux_scroll, int sci, int no_sci_scroll)
 
static void rates_command_callback (GtkWidget *w, gint response_id)
 
static int mult_to_scale (const struct multiplier *pmul, int val)
 
static int scale_to_mult (const struct multiplier *pmul, int scale)
 
static gcharmultiplier_value_callback (GtkScale *scale, gdouble value, void *udata)
 
static void multipliers_command_callback (GtkWidget *w, gint response_id)
 
static void multiplier_dialog_update_values (bool set_positions)
 
void real_multipliers_dialog_update (void *unused)
 
static GtkWidgetcreate_multiplier_dialog (void)
 
void popup_multiplier_dialog (void)
 
static GtkWidgetcreate_rates_dialog (void)
 
void popup_rates_dialog (void)
 

Variables

static GtkWidgetrates_dialog_shell
 
static GtkWidgetrates_gov_label
 
static GtkWidgetrates_tax_toggle
 
static GtkWidgetrates_lux_toggle
 
static GtkWidgetrates_sci_toggle
 
static GtkWidgetrates_tax_label
 
static GtkWidgetrates_lux_label
 
static GtkWidgetrates_sci_label
 
static GtkWidgetrates_tax_scale
 
static GtkWidgetrates_lux_scale
 
static GtkWidgetrates_sci_scale
 
static GtkWidgetmultiplier_dialog_shell
 
static GtkWidgetmultipliers_scale [MAX_NUM_MULTIPLIERS]
 
static gulong rates_tax_sig
 
static gulong rates_lux_sig
 
static gulong rates_sci_sig
 
static int rates_tax_value
 
static int rates_lux_value
 
static int rates_sci_value
 

Function Documentation

◆ create_multiplier_dialog()

static GtkWidget * create_multiplier_dialog ( void  )
static

Create multipliers dialog

Definition at line 308 of file gamedlgs.c.

Referenced by popup_multiplier_dialog().

◆ create_rates_dialog()

static GtkWidget * create_rates_dialog ( void  )
static

Create rates dialog

Definition at line 399 of file gamedlgs.c.

Referenced by popup_rates_dialog().

◆ mult_to_scale()

static int mult_to_scale ( const struct multiplier pmul,
int  val 
)
static

Convert real multiplier display value to scale value

Definition at line 219 of file gamedlgs.c.

Referenced by create_multiplier_dialog(), multipler_rates_dialog::multipler_rates_dialog(), and multiplier_dialog_update_values().

◆ multiplier_dialog_update_values()

static void multiplier_dialog_update_values ( bool  set_positions)
static

Update values in multipliers dialog

Definition at line 266 of file gamedlgs.c.

Referenced by create_multiplier_dialog(), and real_multipliers_dialog_update().

◆ multiplier_value_callback()

static gchar * multiplier_value_callback ( GtkScale scale,
gdouble  value,
void udata 
)
static

Format value for multiplier scales

Definition at line 235 of file gamedlgs.c.

Referenced by create_multiplier_dialog().

◆ multipliers_command_callback()

static void multipliers_command_callback ( GtkWidget w,
gint  response_id 
)
static

User has responded to multipliers dialog

Definition at line 246 of file gamedlgs.c.

Referenced by create_multiplier_dialog().

◆ popup_multiplier_dialog()

void popup_multiplier_dialog ( void  )

Popup multipliers dialog

Definition at line 383 of file gamedlgs.c.

Referenced by multiplier_callback(), multiplier_callback(), and mr_menu::slot_popup_mult_rates().

◆ popup_rates_dialog()

void popup_rates_dialog ( void  )

Popup rates dialog

Definition at line 533 of file gamedlgs.c.

Referenced by side_rates_wdg(), mr_menu::slot_popup_tax_rates(), tax_rate_callback(), and tax_rate_callback().

◆ rates_changed_callback()

static void rates_changed_callback ( GtkWidget range)
static

User changes rates

Definition at line 179 of file gamedlgs.c.

Referenced by create_rates_dialog().

◆ rates_command_callback()

static void rates_command_callback ( GtkWidget w,
gint  response_id 
)
static

User has responded to rates dialog

Definition at line 207 of file gamedlgs.c.

Referenced by create_rates_dialog().

◆ rates_set_values()

static void rates_set_values ( int  tax,
int  no_tax_scroll,
int  lux,
int  no_lux_scroll,
int  sci,
int  no_sci_scroll 
)
static

Set tax values to display

Definition at line 71 of file gamedlgs.c.

Referenced by create_rates_dialog(), and rates_changed_callback().

◆ real_multipliers_dialog_update()

void real_multipliers_dialog_update ( void unused)

Callback when server indicates multiplier values have changed

Definition at line 293 of file gamedlgs.c.

Referenced by multipliers_dialog_update().

◆ scale_to_mult()

static int scale_to_mult ( const struct multiplier pmul,
int  scale 
)
static

Convert scale units to real multiplier display value

Definition at line 227 of file gamedlgs.c.

Referenced by multiplier_dialog_update_values(), multiplier_value_callback(), multipliers_command_callback(), and multipler_rates_dialog::slot_ok_button_pressed().

Variable Documentation

◆ multiplier_dialog_shell

GtkWidget* multiplier_dialog_shell
static

◆ multipliers_scale

GtkWidget* multipliers_scale[MAX_NUM_MULTIPLIERS]
static

◆ rates_dialog_shell

GtkWidget* rates_dialog_shell
static

Definition at line 52 of file gamedlgs.c.

Referenced by create_rates_dialog(), popup_rates_dialog(), and rates_command_callback().

◆ rates_gov_label

GtkWidget* rates_gov_label
static

Definition at line 53 of file gamedlgs.c.

Referenced by create_rates_dialog(), and popup_rates_dialog().

◆ rates_lux_label

GtkWidget * rates_lux_label
static

Definition at line 55 of file gamedlgs.c.

Referenced by create_rates_dialog(), and rates_set_values().

◆ rates_lux_scale

GtkWidget * rates_lux_scale
static

◆ rates_lux_sig

gulong rates_lux_sig
static

Definition at line 61 of file gamedlgs.c.

Referenced by create_rates_dialog(), and rates_set_values().

◆ rates_lux_toggle

GtkWidget * rates_lux_toggle
static

Definition at line 54 of file gamedlgs.c.

Referenced by create_rates_dialog(), and rates_set_values().

◆ rates_lux_value

int rates_lux_value
static

◆ rates_sci_label

GtkWidget * rates_sci_label
static

Definition at line 55 of file gamedlgs.c.

Referenced by create_rates_dialog(), and rates_set_values().

◆ rates_sci_scale

GtkWidget * rates_sci_scale
static

Definition at line 56 of file gamedlgs.c.

Referenced by create_rates_dialog(), popup_rates_dialog(), and rates_set_values().

◆ rates_sci_sig

gulong rates_sci_sig
static

Definition at line 61 of file gamedlgs.c.

Referenced by create_rates_dialog(), and rates_set_values().

◆ rates_sci_toggle

GtkWidget * rates_sci_toggle
static

Definition at line 54 of file gamedlgs.c.

Referenced by create_rates_dialog(), and rates_set_values().

◆ rates_sci_value

int rates_sci_value
static

◆ rates_tax_label

GtkWidget* rates_tax_label
static

Definition at line 55 of file gamedlgs.c.

Referenced by create_rates_dialog(), and rates_set_values().

◆ rates_tax_scale

GtkWidget* rates_tax_scale
static

◆ rates_tax_sig

gulong rates_tax_sig
static

Definition at line 61 of file gamedlgs.c.

Referenced by create_rates_dialog(), and rates_set_values().

◆ rates_tax_toggle

GtkWidget* rates_tax_toggle
static

Definition at line 54 of file gamedlgs.c.

Referenced by create_rates_dialog(), and rates_set_values().

◆ rates_tax_value

int rates_tax_value
static