The Battle for Wesnoth  1.19.0-dev
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
events::mouse_handler Class Reference

#include <mouse_events.hpp>

Inheritance diagram for events::mouse_handler:

Public Member Functions

 mouse_handler (game_display *gui, play_controller &pc)
 
 ~mouse_handler ()
 
void set_side (int side_number)
 
void cycle_units (const bool browse, const bool reverse=false)
 
void cycle_back_units (const bool browse)
 
int get_path_turns () const
 
map_location current_unit_attacks_from (const map_location &loc) const
 
const pathfind::pathscurrent_paths () const
 
const map_locationget_last_hex () const
 
map_location get_selected_hex () const
 
void set_path_turns (const int path_turns)
 
void set_current_paths (const pathfind::paths &new_paths)
 
void deselect_hex ()
 
void invalidate_reachmap ()
 
void set_gui (game_display *gui)
 
unit_map::iterator selected_unit ()
 
pathfind::marked_route get_route (const unit *un, map_location go_to, team &team) const
 
const pathfind::marked_routeget_current_route () const
 
std::set< map_locationget_adj_enemies (const map_location &loc, int side) const
 
int show_attack_dialog (const map_location &attacker_loc, const map_location &defender_loc)
 
void attack_enemy (const map_location &attacker_loc, const map_location &defender_loc, int choice)
 
std::size_t move_unit_along_route (const std::vector< map_location > &steps, bool &interrupted)
 Moves a unit across the board for a player. More...
 
void select_hex (const map_location &hex, const bool browse, const bool highlight=true, const bool fire_event=true)
 
void move_action (bool browse) override
 Overridden in derived class. More...
 
void teleport_action ()
 
void touch_action (const map_location hex, bool browse) override
 
void select_or_action (bool browse)
 
void select_teleport ()
 
const map_location hovered_hex () const
 Uses SDL and game_display::hex_clicked_on to fetch the hex the mouse is hovering, if applicable. More...
 
bool hex_hosts_unit (const map_location &hex) const
 Unit exists on the hex, no matter if friend or foe. More...
 
void disable_units_highlight ()
 Use this to disable hovering an unit from highlighting its movement range. More...
 
void enable_units_highlight ()
 When unit highlighting is disabled, call this when the mouse no longer hovers any unit to enable highlighting again. More...
 
- Public Member Functions inherited from events::mouse_handler_base
 mouse_handler_base ()
 
virtual ~mouse_handler_base ()
 
bool dragging_started () const
 If mouse/finger has moved far enough to consider it move/swipe, and not a click/touch. More...
 
bool is_dragging () const
 
void mouse_motion_event (const SDL_MouseMotionEvent &event, const bool browse)
 
void touch_motion_event (const SDL_TouchFingerEvent &event, const bool browse)
 
void mouse_update (const bool browse, map_location loc)
 Update the mouse with a fake mouse motion. More...
 
bool get_show_menu () const
 
bool mouse_motion_default (int x, int y, bool update)
 This handles minimap scrolling and click-drag. More...
 
virtual void mouse_press (const SDL_MouseButtonEvent &event, const bool browse)
 
bool is_left_click (const SDL_MouseButtonEvent &event) const
 
bool is_middle_click (const SDL_MouseButtonEvent &event) const
 
bool is_right_click (const SDL_MouseButtonEvent &event) const
 
bool is_touch_click (const SDL_MouseButtonEvent &event) const
 
virtual void mouse_wheel (int xscroll, int yscroll, bool browse)
 Called when scrolling with the mouse wheel. More...
 
virtual bool allow_mouse_wheel_scroll (int, int)
 Derived classes can override this to disable mousewheel scrolling under some circumstances, e.g. More...
 
virtual bool left_click (int x, int y, const bool browse)
 Overridden in derived classes, called on a left click (mousedown). More...
 
virtual void left_drag_end (int, int, const bool)
 Called whenever the left mouse drag has "ended". More...
 
virtual void left_mouse_up (int, int, const bool)
 Called when the left mouse button is up. More...
 
virtual bool right_click (int x, int y, const bool browse)
 Overridden in derived classes, called on a right click (mousedown). More...
 
virtual void right_drag_end (int, int, const bool)
 Called whenever the right mouse drag has "ended". More...
 
virtual void right_mouse_up (int, int, const bool)
 Called when the right mouse button is up. More...
 
virtual void mouse_wheel_up (int, int, const bool)
 Called when the mouse wheel is scrolled up. More...
 
virtual void mouse_wheel_down (int, int, const bool)
 Called when the mouse wheel is scrolled down. More...
 
virtual void mouse_wheel_left (int, int, const bool)
 Called when the mouse wheel is scrolled left. More...
 
virtual void mouse_wheel_right (int, int, const bool)
 Called when the mouse wheel is scrolled right. More...
 
void set_scroll_start (int x, int y)
 Called when the middle click scrolling. More...
 
const SDL_Point get_scroll_start () const
 
bool scroll_started () const
 

Static Public Member Functions

static mouse_handlerget_singleton ()
 

Protected Member Functions

game_displaygui () override
 Due to the way this class is constructed we can assume that the display* gui_ member actually points to a game_display (derived class) More...
 
const game_displaygui () const override
 Const version. More...
 
int drag_threshold () const override
 Minimum dragging distance to fire the drag&drop. More...
 
void mouse_motion (int x, int y, const bool browse, bool update=false, map_location loc=map_location::null_location()) override
 Use update to force an update of the mouse state. More...
 
bool mouse_button_event (const SDL_MouseButtonEvent &event, uint8_t button, map_location loc, bool click=false) override
 
bool right_click_show_menu (int x, int y, const bool browse) override
 Called in the default right_click when the context menu is about to be shown, can be used for preprocessing and preventing the menu from being displayed without rewriting the right click function. More...
 
bool move_unit_along_current_route ()
 Moves a unit along the currently cached route. More...
 
void touch_motion (int x, int y, const bool browse, bool update=false, map_location loc=map_location::null_location()) override
 
void save_whiteboard_attack (const map_location &attacker_loc, const map_location &defender_loc, int weapon_choice)
 
int fill_weapon_choices (std::vector< battle_context > &bc_vector, unit_map::iterator attacker, unit_map::iterator defender)
 
void attack_enemy_ (const map_location &attacker_loc, const map_location &defender_loc, int choice)
 
void show_attack_options (const unit_map::const_iterator &u)
 Causes attackable hexes to be highlighted. More...
 
unit_map::const_iterator find_unit (const map_location &hex) const
 
unit_map::iterator find_unit (const map_location &hex)
 
unitfind_unit_nonowning (const map_location &hex)
 
const unitfind_unit_nonowning (const map_location &hex) const
 
bool unit_in_cycle (unit_map::const_iterator it)
 
- Protected Member Functions inherited from events::mouse_handler_base
void cancel_dragging ()
 
void clear_dragging (const SDL_MouseButtonEvent &event, bool browse)
 
void clear_drag_from_hex ()
 
void init_dragging (bool &dragging_flag)
 

Private Member Functions

teamviewing_team ()
 
const teamviewing_team () const
 
teamcurrent_team ()
 
void show_reach_for_unit (const unit_ptr &un)
 Highlight the hexes that a unit can move to. More...
 

Private Attributes

game_displaygui_
 
play_controllerpc_
 
map_location previous_hex_
 
map_location previous_free_hex_
 
map_location selected_hex_
 
map_location next_unit_
 
pathfind::marked_route current_route_
 
pathfind::paths current_paths_
 If non-empty, current_paths_.destinations contains a cache of highlighted hexes, likely the movement range or attack range of a unit. More...
 
bool unselected_paths_
 
bool unselected_reach_
 
int path_turns_
 
int side_num_
 
bool over_route_
 
bool reachmap_invalid_
 
bool show_partial_move_
 
bool teleport_selected_
 
bool preventing_units_highlight_
 

Static Private Attributes

static mouse_handlersingleton_ = nullptr
 

Additional Inherited Members

- Protected Attributes inherited from events::mouse_handler_base
bool simple_warp_
 MMB click (on game map) state flag. More...
 
bool minimap_scrolling_
 minimap scrolling (scroll-drag) state flag More...
 
bool dragging_left_
 LMB drag init flag. More...
 
bool dragging_touch_
 Finger drag init flag. More...
 
bool dragging_started_
 Actual drag flag. More...
 
bool dragging_right_
 RMB drag init flag. More...
 
int drag_from_x_
 Drag start position x. More...
 
int drag_from_y_
 Drag start position y. More...
 
map_location drag_from_hex_
 Drag start or mouse-down map location. More...
 
map_location last_hex_
 last highlighted hex More...
 
bool show_menu_
 Show context menu flag. More...
 
int scroll_start_x_
 Relative to middle click scrolling. More...
 
int scroll_start_y_
 
bool scroll_started_
 

Detailed Description

Definition at line 36 of file mouse_events.hpp.

Constructor & Destructor Documentation

◆ mouse_handler()

events::mouse_handler::mouse_handler ( game_display gui,
play_controller pc 
)

Definition at line 59 of file mouse_events.cpp.

References singleton_.

◆ ~mouse_handler()

events::mouse_handler::~mouse_handler ( )

Definition at line 82 of file mouse_events.cpp.

References singleton_.

Member Function Documentation

◆ attack_enemy()

void events::mouse_handler::attack_enemy ( const map_location attacker_loc,
const map_location defender_loc,
int  choice 
)

Definition at line 1372 of file mouse_events.cpp.

References attack_enemy_(), ERR_WML, and lg::log_to_chat().

Referenced by wb::attack::execute(), and move_action().

◆ attack_enemy_()

void events::mouse_handler::attack_enemy_ ( const map_location attacker_loc,
const map_location defender_loc,
int  choice 
)
protected

◆ current_paths()

const pathfind::paths& events::mouse_handler::current_paths ( ) const
inline

Definition at line 52 of file mouse_events.hpp.

References current_paths_.

Referenced by play_controller::process_keyup_event().

◆ current_team()

team & events::mouse_handler::current_team ( )
private

◆ current_unit_attacks_from()

map_location events::mouse_handler::current_unit_attacks_from ( const map_location loc) const

◆ cycle_back_units()

void events::mouse_handler::cycle_back_units ( const bool  browse)
inline

Definition at line 43 of file mouse_events.hpp.

References cycle_units().

Referenced by play_controller::hotkey_handler::cycle_back_units().

◆ cycle_units()

void events::mouse_handler::cycle_units ( const bool  browse,
const bool  reverse = false 
)

◆ deselect_hex()

void events::mouse_handler::deselect_hex ( )

◆ disable_units_highlight()

void events::mouse_handler::disable_units_highlight ( )

Use this to disable hovering an unit from highlighting its movement range.

See also
enable_units_highlight()

Definition at line 1600 of file mouse_events.cpp.

References preventing_units_highlight_.

Referenced by events::menu_handler::show_enemy_moves().

◆ drag_threshold()

int events::mouse_handler::drag_threshold ( ) const
overrideprotectedvirtual

Minimum dragging distance to fire the drag&drop.

Reimplemented from events::mouse_handler_base.

Definition at line 92 of file mouse_events.cpp.

References gui2::settings::screen_height, and gui2::settings::screen_width.

Referenced by touch_motion().

◆ enable_units_highlight()

void events::mouse_handler::enable_units_highlight ( )

When unit highlighting is disabled, call this when the mouse no longer hovers any unit to enable highlighting again.

See also
disable_units_highlight()

Definition at line 1605 of file mouse_events.cpp.

References preventing_units_highlight_.

Referenced by mouse_motion().

◆ fill_weapon_choices()

int events::mouse_handler::fill_weapon_choices ( std::vector< battle_context > &  bc_vector,
unit_map::iterator  attacker,
unit_map::iterator  defender 
)
protected

◆ find_unit() [1/2]

unit_map::iterator events::mouse_handler::find_unit ( const map_location hex)
protected

◆ find_unit() [2/2]

unit_map::const_iterator events::mouse_handler::find_unit ( const map_location hex) const
protected

◆ find_unit_nonowning() [1/2]

unit * events::mouse_handler::find_unit_nonowning ( const map_location hex)
protected

◆ find_unit_nonowning() [2/2]

const unit * events::mouse_handler::find_unit_nonowning ( const map_location hex) const
protected

◆ get_adj_enemies()

std::set< map_location > events::mouse_handler::get_adj_enemies ( const map_location loc,
int  side 
) const

◆ get_current_route()

const pathfind::marked_route& events::mouse_handler::get_current_route ( ) const
inline

Definition at line 67 of file mouse_events.hpp.

References current_route_.

Referenced by wb::manager::create_temp_move().

◆ get_last_hex()

const map_location& events::mouse_handler::get_last_hex ( ) const
inline

◆ get_path_turns()

int events::mouse_handler::get_path_turns ( ) const
inline

Definition at line 45 of file mouse_events.hpp.

References path_turns_.

Referenced by play_controller::process_keyup_event().

◆ get_route()

pathfind::marked_route events::mouse_handler::get_route ( const unit un,
map_location  go_to,
team team 
) const

◆ get_selected_hex()

map_location events::mouse_handler::get_selected_hex ( ) const
inline

◆ get_singleton()

static mouse_handler* events::mouse_handler::get_singleton ( )
inlinestatic

Definition at line 40 of file mouse_events.hpp.

References singleton_.

Referenced by unit_display::unit_mover::finish(), and unit_display::unit_die().

◆ gui() [1/2]

const game_display& events::mouse_handler::gui ( ) const
inlineoverrideprotectedvirtual

Const version.

Implements events::mouse_handler_base.

Definition at line 125 of file mouse_events.hpp.

References gui_.

◆ gui() [2/2]

game_display& events::mouse_handler::gui ( )
inlineoverrideprotectedvirtual

◆ hex_hosts_unit()

bool events::mouse_handler::hex_hosts_unit ( const map_location hex) const

Unit exists on the hex, no matter if friend or foe.

Definition at line 684 of file mouse_events.cpp.

References find_unit(), and unit_map::iterator_base< iter_types >::valid().

Referenced by events::menu_handler::show_enemy_moves().

◆ hovered_hex()

const map_location events::mouse_handler::hovered_hex ( ) const

Uses SDL and game_display::hex_clicked_on to fetch the hex the mouse is hovering, if applicable.

Definition at line 676 of file mouse_events.cpp.

References sdl::get_mouse_state(), gui_, and display::hex_clicked_on().

Referenced by events::menu_handler::show_enemy_moves().

◆ invalidate_reachmap()

void events::mouse_handler::invalidate_reachmap ( )
inline

Definition at line 59 of file mouse_events.hpp.

References reachmap_invalid_.

◆ mouse_button_event()

bool events::mouse_handler::mouse_button_event ( const SDL_MouseButtonEvent &  event,
uint8_t  button,
map_location  loc,
bool  click = false 
)
overrideprotectedvirtual

◆ mouse_motion()

void events::mouse_handler::mouse_motion ( int  x,
int  y,
const bool  browse,
bool  update = false,
map_location  loc = map_location::null_location() 
)
overrideprotectedvirtual

◆ move_action()

void events::mouse_handler::move_action ( bool  )
overridevirtual

◆ move_unit_along_current_route()

bool events::mouse_handler::move_unit_along_current_route ( )
protected

Moves a unit along the currently cached route.

Returns
true if the end of the route was reached and no information was uncovered that would warrant interrupting a chain of actions; false otherwise.

Definition at line 1199 of file mouse_events.cpp.

References current_paths_, current_route_, gui(), move_unit_along_route(), next_unit_, game_display::select_hex(), selected_hex_, game_display::set_route(), pathfind::marked_route::steps, and game_display::unhighlight_reach().

Referenced by move_action().

◆ move_unit_along_route()

std::size_t events::mouse_handler::move_unit_along_route ( const std::vector< map_location > &  steps,
bool &  interrupted 
)

Moves a unit across the board for a player.

This is specifically for movement at the time it is initiated by a player, whether via a mouse click or executing whiteboard actions. Continued moves (including goto execution) can bypass this and call actions::move_unit() directly. This function call may include time for an animation, so make sure the provided route will remain unchanged (the caller should probably make a local copy).

Parameters
[in]stepsThe route to be traveled. The unit to be moved is at the beginning of this route.
[out]interruptedThis is set to true if information was uncovered that warrants interrupting a chain of actions (and set to false otherwise).
Returns
The number of hexes entered. This can safely be used as an index into steps to get the location where movement ended, provided steps is not empty (the return value is guaranteed to be less than steps.size() ).

Definition at line 1245 of file mouse_events.cpp.

References _(), unit_map::find(), play_controller::get_map(), play_controller::get_undo_stack(), play_controller::get_units(), play_controller::get_whiteboard(), gui(), display::invalidate_game_status(), gamemap::is_keep(), LOG_NG, actions::move_unit_and_record(), cursor::NORMAL, pc_, select_hex(), cursor::set(), show_partial_move_, and gui2::show_transient_message().

Referenced by wb::move::execute(), and move_unit_along_current_route().

◆ right_click_show_menu()

bool events::mouse_handler::right_click_show_menu ( int  ,
int  ,
const bool   
)
overrideprotectedvirtual

Called in the default right_click when the context menu is about to be shown, can be used for preprocessing and preventing the menu from being displayed without rewriting the right click function.

Returns
true when the menu should be displayed and false otherwise FIXME: This return value is currently ignored

Reimplemented from events::mouse_handler_base.

Definition at line 815 of file mouse_events.cpp.

References rect::contains(), gui(), display::map_area(), selected_hex_, unselected_reach_, and map_location::valid().

◆ save_whiteboard_attack()

void events::mouse_handler::save_whiteboard_attack ( const map_location attacker_loc,
const map_location defender_loc,
int  weapon_choice 
)
protected

◆ select_hex()

void events::mouse_handler::select_hex ( const map_location hex,
const bool  browse,
const bool  highlight = true,
const bool  fire_event = true 
)

◆ select_or_action()

void events::mouse_handler::select_or_action ( bool  browse)

◆ select_teleport()

void events::mouse_handler::select_teleport ( )

◆ selected_unit()

unit_map::iterator events::mouse_handler::selected_unit ( )

◆ set_current_paths()

void events::mouse_handler::set_current_paths ( const pathfind::paths new_paths)

◆ set_gui()

void events::mouse_handler::set_gui ( game_display gui)
inline

Definition at line 61 of file mouse_events.hpp.

References gui(), and gui_.

Referenced by play_controller::init().

◆ set_path_turns()

void events::mouse_handler::set_path_turns ( const int  path_turns)
inline

Definition at line 56 of file mouse_events.hpp.

References path_turns_.

Referenced by play_controller::process_keyup_event().

◆ set_side()

void events::mouse_handler::set_side ( int  side_number)

Definition at line 87 of file mouse_events.cpp.

References side_num_.

Referenced by play_controller::init_side_begin().

◆ show_attack_dialog()

int events::mouse_handler::show_attack_dialog ( const map_location attacker_loc,
const map_location defender_loc 
)

◆ show_attack_options()

void events::mouse_handler::show_attack_options ( const unit_map::const_iterator u)
protected

Causes attackable hexes to be highlighted.

This checks the hexes that the provided unit can attack. If there is a valid target there, that location is inserted into current_paths_.destinations.

Definition at line 1476 of file mouse_events.cpp.

References current_paths_, current_team(), pathfind::paths::destinations, unit_map::find(), get_adjacent_tiles(), play_controller::get_map(), play_controller::get_teams(), play_controller::get_units(), i, unit::incapacitated(), pathfind::paths::dest_vect::insert(), team::is_enemy(), gamemap_base::on_board(), pc_, and unit::side().

Referenced by select_hex().

◆ show_reach_for_unit()

void events::mouse_handler::show_reach_for_unit ( const unit_ptr un)
private

Highlight the hexes that a unit can move to.

Based on the currently selected hex, selected unit and what's being moused-over, conditionally draw any planned moves for the unit passed as an argument.

Definition at line 345 of file mouse_events.cpp.

References current_paths_, current_team(), pathfind::paths::destinations, play_controller::get_map(), get_route(), play_controller::get_teams(), gui(), game_display::highlight_reach(), gamemap_base::on_board(), over_route_, path_turns_, pc_, selected_hex_, game_display::set_route(), side_num_, unselected_paths_, map_location::valid(), and viewing_team().

Referenced by mouse_motion().

◆ teleport_action()

void events::mouse_handler::teleport_action ( )

◆ touch_action()

void events::mouse_handler::touch_action ( const map_location  hex,
bool  browse 
)
overridevirtual

◆ touch_motion()

void events::mouse_handler::touch_motion ( int  x,
int  y,
const bool  browse,
bool  update = false,
map_location  loc = map_location::null_location() 
)
overrideprotectedvirtual

Implements events::mouse_handler_base.

Definition at line 102 of file mouse_events.cpp.

References cursor::ATTACK, cursor::ATTACK_DRAG, game_state::board_, game_display::clear_attack_indicator(), utils::contains(), pathfind::paths::dest_vect::contains(), current_paths_, current_route_, current_unit_attacks_from(), pathfind::paths::destinations, events::mouse_handler_base::drag_from_x_, events::mouse_handler_base::drag_from_y_, drag_threshold(), events::mouse_handler_base::dragging_started_, events::mouse_handler_base::dragging_touch_, find_unit(), play_controller::gamestate(), cursor::get(), play_controller::get_map(), sdl::get_mouse_state(), get_route(), unit_map::iterator_base< iter_types >::get_shared_ptr(), play_controller::get_whiteboard(), gui(), display::hex_clicked_on(), game_display::highlight_hex(), events::mouse_handler_base::is_dragging(), events::mouse_handler_base::last_hex_, game_board::map(), display::minimap_location_on(), events::mouse_handler_base::minimap_scrolling_, cursor::MOVE, cursor::MOVE_DRAG, cursor::NORMAL, map_location::null_location(), gamemap_base::on_board(), over_route_, pc_, previous_free_hex_, previous_hex_, tooltips::process(), reachmap_invalid_, display::scroll(), display::scroll_to_tile(), select_hex(), selected_hex_, selected_unit(), cursor::set(), game_display::set_attack_indicator(), game_display::set_route(), show_partial_move_, side_num_, events::mouse_handler_base::simple_warp_, pathfind::marked_route::steps, game_display::unhighlight_reach(), unselected_paths_, draw_manager::update(), map_location::valid(), unit_map::iterator_base< iter_types >::valid(), viewing_team(), cursor::WAIT, and display::WARP.

◆ unit_in_cycle()

bool events::mouse_handler::unit_in_cycle ( unit_map::const_iterator  it)
protected

◆ viewing_team() [1/2]

team & events::mouse_handler::viewing_team ( )
private

◆ viewing_team() [2/2]

const team & events::mouse_handler::viewing_team ( ) const
private

Definition at line 1588 of file mouse_events.cpp.

References play_controller::get_teams(), gui(), pc_, and display::viewing_team().

Member Data Documentation

◆ current_paths_

pathfind::paths events::mouse_handler::current_paths_
private

If non-empty, current_paths_.destinations contains a cache of highlighted hexes, likely the movement range or attack range of a unit.

Definition at line 188 of file mouse_events.hpp.

Referenced by attack_enemy_(), current_paths(), current_unit_attacks_from(), mouse_motion(), move_action(), move_unit_along_current_route(), save_whiteboard_attack(), select_hex(), set_current_paths(), show_attack_options(), show_reach_for_unit(), and touch_motion().

◆ current_route_

pathfind::marked_route events::mouse_handler::current_route_
private

◆ gui_

game_display* events::mouse_handler::gui_
private

Definition at line 174 of file mouse_events.hpp.

Referenced by current_unit_attacks_from(), gui(), hovered_hex(), select_hex(), and set_gui().

◆ next_unit_

map_location events::mouse_handler::next_unit_
private

Definition at line 182 of file mouse_events.hpp.

Referenced by cycle_units(), move_unit_along_current_route(), and select_hex().

◆ over_route_

bool events::mouse_handler::over_route_
private

Definition at line 194 of file mouse_events.hpp.

Referenced by mouse_motion(), show_reach_for_unit(), and touch_motion().

◆ path_turns_

int events::mouse_handler::path_turns_
private

Definition at line 191 of file mouse_events.hpp.

Referenced by get_path_turns(), select_hex(), set_path_turns(), and show_reach_for_unit().

◆ pc_

play_controller& events::mouse_handler::pc_
private

◆ preventing_units_highlight_

bool events::mouse_handler::preventing_units_highlight_
private

Definition at line 201 of file mouse_events.hpp.

Referenced by disable_units_highlight(), enable_units_highlight(), and mouse_motion().

◆ previous_free_hex_

map_location events::mouse_handler::previous_free_hex_
private

Definition at line 180 of file mouse_events.hpp.

Referenced by current_unit_attacks_from(), mouse_motion(), and touch_motion().

◆ previous_hex_

map_location events::mouse_handler::previous_hex_
private

Definition at line 179 of file mouse_events.hpp.

Referenced by current_unit_attacks_from(), mouse_motion(), and touch_motion().

◆ reachmap_invalid_

bool events::mouse_handler::reachmap_invalid_
private

Definition at line 195 of file mouse_events.hpp.

Referenced by invalidate_reachmap(), mouse_motion(), and touch_motion().

◆ selected_hex_

map_location events::mouse_handler::selected_hex_
private

◆ show_partial_move_

bool events::mouse_handler::show_partial_move_
private

◆ side_num_

int events::mouse_handler::side_num_
private

◆ singleton_

mouse_handler * events::mouse_handler::singleton_ = nullptr
staticprivate

Definition at line 199 of file mouse_events.hpp.

Referenced by get_singleton(), mouse_handler(), and ~mouse_handler().

◆ teleport_selected_

bool events::mouse_handler::teleport_selected_
private

Definition at line 197 of file mouse_events.hpp.

Referenced by move_action(), select_or_action(), select_teleport(), and teleport_action().

◆ unselected_paths_

bool events::mouse_handler::unselected_paths_
private

Definition at line 189 of file mouse_events.hpp.

Referenced by mouse_motion(), select_hex(), show_reach_for_unit(), and touch_motion().

◆ unselected_reach_

bool events::mouse_handler::unselected_reach_
private

Definition at line 190 of file mouse_events.hpp.

Referenced by right_click_show_menu(), and select_hex().


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