Freeciv-3.2
Loading...
Searching...
No Matches
Macros | Functions | Variables
zoom.h File Reference

Go to the source code of this file.

Macros

#define zoom_get_level()   map_zoom
 
#define zoom_is_enabled()   zoom_enabled
 

Functions

void zoom_set (float new_zoom)
 
void zoom_1_0 (void)
 
void zoom_set_steps (float *steps)
 
void zoom_phase_set (bool individual_tiles)
 
void zoom_step_up (void)
 
void zoom_step_down (void)
 
void zoom_start (float tgt, bool tgt_1_0, float factor, float interval)
 
bool zoom_update (double time_until_next_call)
 

Variables

bool zoom_enabled
 
float map_zoom
 
float mouse_zoom
 

Macro Definition Documentation

◆ zoom_get_level

#define zoom_get_level ( )    map_zoom

Definition at line 25 of file zoom.h.

◆ zoom_is_enabled

#define zoom_is_enabled ( )    zoom_enabled

Definition at line 26 of file zoom.h.

Function Documentation

◆ zoom_1_0()

void zoom_1_0 ( void  )

Set map zoom level to exactly one.

Definition at line 66 of file zoom.c.

Referenced by set_client_page_callback(), zoom_step_down(), zoom_step_up(), and zoom_update().

◆ zoom_phase_set()

void zoom_phase_set ( bool  individual_tiles)

Set time zooming takes place. Default is to zoom individual tiles. Gui needs to implement alternatives themselves.

Definition at line 93 of file zoom.c.

Referenced by ui_init().

◆ zoom_set()

void zoom_set ( float  new_zoom)

Set map zoom level.

Definition at line 49 of file zoom.c.

Referenced by set_client_page_callback(), zoom_step_down(), zoom_step_up(), and zoom_update().

◆ zoom_set_steps()

void zoom_set_steps ( float steps)

Set list of zoom steps that the system uses. The list is not copied - caller is expected to maintain it. First and last value must be -1.0

Definition at line 80 of file zoom.c.

Referenced by ui_init().

◆ zoom_start()

void zoom_start ( float  tgt,
bool  tgt_1_0,
float  factor,
float  interval 
)

Start zoom animation.

Definition at line 156 of file zoom.c.

◆ zoom_step_down()

void zoom_step_down ( void  )

Zoom level one step down

Definition at line 130 of file zoom.c.

Referenced by key_press_map_canvas(), and key_press_map_canvas().

◆ zoom_step_up()

void zoom_step_up ( void  )

Zoom level one step up

Definition at line 106 of file zoom.c.

Referenced by key_press_map_canvas(), and key_press_map_canvas().

◆ zoom_update()

bool zoom_update ( double  time_until_next_call)

Next step from the active zoom.

Definition at line 172 of file zoom.c.

Referenced by real_timer_callback().

Variable Documentation

◆ map_zoom

float map_zoom
extern

◆ mouse_zoom

float mouse_zoom
extern

◆ zoom_enabled

bool zoom_enabled
extern

Definition at line 26 of file zoom.c.

Referenced by zoom_1_0(), zoom_phase_set(), and zoom_set().