editor_display Class Reference

Simplified display class for the editor. More...

#include <display.hpp>

Inheritance diagram for editor_display:

Inheritance graph
[legend]
Collaboration diagram for editor_display:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 editor_display (CVideo &video, const gamemap &map, const config &theme_cfg, const config &cfg, const config &level)
bool in_editor () const
void draw (bool update=true, bool force=false)
 draw() for the editor display.
void rebuild_terrain (const gamemap::location &loc)
 Rebuild the dynamic terrain at the given location.
void update_light_levels ()
 Updates editor light levels from preferences.

Private Attributes

int lr_
int lg_
int lb_


Detailed Description

Simplified display class for the editor.

It only needs to draw terrain, no units, no fog, etc.

Definition at line 579 of file display.hpp.


Constructor & Destructor Documentation

editor_display::editor_display ( CVideo video,
const gamemap map,
const config theme_cfg,
const config cfg,
const config level 
)


Member Function Documentation

bool editor_display::in_editor (  )  const [inline, virtual]

Reimplemented from display.

Definition at line 585 of file display.hpp.

void editor_display::draw ( bool  update = true,
bool  force = false 
) [virtual]

draw() for the editor display.

It only has to know about terrain.

Todo:
FIXME: this should be done from the preferences dialog as well, to reflect changes for the user before closing it

Todo:
FIXME: this seems to have no effect, and to be left-over of the time of day light system used before around version 0.9

Implements display.

Definition at line 47 of file editor_display.cpp.

References display::ADJACENT_BACKGROUND, display::ADJACENT_FOREGROUND, image::BRIGHTENED, display::draw_border(), display::draw_init(), display::draw_wrap(), display::drawing_buffer_add(), display::drawing_buffer_commit(), gamemap::empty(), gamemap::get_drawing_order(), image::get_image(), display::get_location_x(), display::get_location_y(), display::get_screen_surface(), gamemap::get_terrain(), display::get_terrain_images(), gamemap::get_terrain_info(), display::grid_, game_config::grid_image, display::highlighted_locations_, display::invalidated_, display::LAYER_TERRAIN_BG, display::LAYER_TERRAIN_FG, display::LAYER_TERRAIN_TMP_BG, lb_, lg_, lr_, display::map_, display::map_outside_area(), display::mouseover_hex_overlay_, display::mouseoverHex_, terrain_type::name(), t_translation::OFF_MAP_USER, gamemap::on_board(), reports::POSITION, display::refresh_report(), image::SCALED_TO_HEX, screen, display::screen_, display::selected_hex_overlay_, display::selectedHex_, image::SEMI_BRIGHTENED, image::set_colour_adjustment(), reports::TERRAIN, gamemap::underlying_union_terrain(), update_light_levels(), CVideo::update_locked(), reports::VILLAGES, gamemap::villages(), and display::zoom_.

void editor_display::rebuild_terrain ( const gamemap::location loc  )  [inline]

Rebuild the dynamic terrain at the given location.

Definition at line 592 of file display.hpp.

References display::builder_, and terrain_builder::rebuild_terrain().

void editor_display::update_light_levels ( void   ) 

Updates editor light levels from preferences.

Definition at line 160 of file editor_display.cpp.

References preferences::editor_b(), preferences::editor_g(), preferences::editor_r(), lb_, lg_, and lr_.

Referenced by draw().


Member Data Documentation

int editor_display::lr_ [private]

Definition at line 598 of file display.hpp.

Referenced by draw(), and update_light_levels().

int editor_display::lg_ [private]

Definition at line 598 of file display.hpp.

Referenced by draw(), and update_light_levels().

int editor_display::lb_ [private]

Definition at line 598 of file display.hpp.

Referenced by draw(), and update_light_levels().


The documentation for this class was generated from the following files:

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs