Fixup 039463e
(don't use _t suffix)
This commit is contained in:
parent
312743403b
commit
7c89a984d7
2 changed files with 24 additions and 24 deletions
|
@ -376,14 +376,14 @@ mouse_button<T>::mouse_button(const std::string& name_, widget& owner,
|
|||
, signal_handler_sdl_button_down_entered_(false)
|
||||
, signal_handler_sdl_button_up_entered_(false)
|
||||
{
|
||||
owner_.connect_signal<T::sdl_button_down_t>(
|
||||
owner_.connect_signal<T::sdl_button_down_event>(
|
||||
std::bind(&mouse_button<T>::signal_handler_sdl_button_down,
|
||||
this,
|
||||
_2,
|
||||
_3,
|
||||
_5),
|
||||
queue_position);
|
||||
owner_.connect_signal<T::sdl_button_up_t>(
|
||||
owner_.connect_signal<T::sdl_button_up_event>(
|
||||
std::bind(&mouse_button<T>::signal_handler_sdl_button_up,
|
||||
this,
|
||||
_2,
|
||||
|
@ -425,10 +425,10 @@ void mouse_button<T>::signal_handler_sdl_button_down(const event::ui_event event
|
|||
if(mouse_captured_) {
|
||||
assert(mouse_focus_);
|
||||
focus_ = mouse_focus_;
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::sdl_button_down_t << ".\n";
|
||||
if(!owner_.fire(T::sdl_button_down_t, *focus_, coordinate)) {
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::button_down_t << ".\n";
|
||||
owner_.fire(T::button_down_t, *mouse_focus_);
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::sdl_button_down_event << ".\n";
|
||||
if(!owner_.fire(T::sdl_button_down_event, *focus_, coordinate)) {
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::button_down_event << ".\n";
|
||||
owner_.fire(T::button_down_event, *mouse_focus_);
|
||||
}
|
||||
} else {
|
||||
widget* mouse_over = owner_.find_at(coordinate, true);
|
||||
|
@ -445,10 +445,10 @@ void mouse_button<T>::signal_handler_sdl_button_down(const event::ui_event event
|
|||
}
|
||||
|
||||
focus_ = mouse_over;
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::sdl_button_down_t << ".\n";
|
||||
if(!owner_.fire(T::sdl_button_down_t, *focus_, coordinate)) {
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::button_down_t << ".\n";
|
||||
owner_.fire(T::button_down_t, *focus_);
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::sdl_button_down_event << ".\n";
|
||||
if(!owner_.fire(T::sdl_button_down_event, *focus_, coordinate)) {
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::button_down_event << ".\n";
|
||||
owner_.fire(T::button_down_event, *focus_);
|
||||
}
|
||||
}
|
||||
handled = true;
|
||||
|
@ -473,10 +473,10 @@ void mouse_button<T>::signal_handler_sdl_button_up(const event::ui_event event,
|
|||
is_down_ = false;
|
||||
|
||||
if(focus_) {
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::sdl_button_up_t << ".\n";
|
||||
if(!owner_.fire(T::sdl_button_up_t, *focus_, coordinate)) {
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::button_up_t << ".\n";
|
||||
owner_.fire(T::button_up_t, *focus_);
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::sdl_button_up_event << ".\n";
|
||||
if(!owner_.fire(T::sdl_button_up_event, *focus_, coordinate)) {
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::button_up_event << ".\n";
|
||||
owner_.fire(T::button_up_event, *focus_);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -513,16 +513,16 @@ void mouse_button<T>::mouse_button_click(widget* widget)
|
|||
if(last_click_stamp_ + settings::double_click_time >= stamp
|
||||
&& last_clicked_widget_ == widget) {
|
||||
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::button_double_click_t << ".\n";
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::button_double_click_event << ".\n";
|
||||
|
||||
owner_.fire(T::button_double_click_t, *widget);
|
||||
owner_.fire(T::button_double_click_event, *widget);
|
||||
last_click_stamp_ = 0;
|
||||
last_clicked_widget_ = nullptr;
|
||||
|
||||
} else {
|
||||
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::button_click_t << ".\n";
|
||||
owner_.fire(T::button_click_t, *widget);
|
||||
DBG_GUI_E << LOG_HEADER << "Firing: " << T::button_click_event << ".\n";
|
||||
owner_.fire(T::button_click_event, *widget);
|
||||
last_click_stamp_ = stamp;
|
||||
last_clicked_widget_ = widget;
|
||||
}
|
||||
|
|
|
@ -164,12 +164,12 @@ template<
|
|||
ui_event button_double_click>
|
||||
struct mouse_button_event_types_wrapper
|
||||
{
|
||||
static const ui_event sdl_button_down_t = sdl_button_down;
|
||||
static const ui_event sdl_button_up_t = sdl_button_up;
|
||||
static const ui_event button_down_t = button_down;
|
||||
static const ui_event button_up_t = button_up;
|
||||
static const ui_event button_click_t = button_click;
|
||||
static const ui_event button_double_click_t = button_double_click;
|
||||
static const ui_event sdl_button_down_event = sdl_button_down;
|
||||
static const ui_event sdl_button_up_event = sdl_button_up;
|
||||
static const ui_event button_down_event = button_down;
|
||||
static const ui_event button_up_event = button_up;
|
||||
static const ui_event button_click_event = button_click;
|
||||
static const ui_event button_double_click_event = button_double_click;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
|
|
Loading…
Add table
Reference in a new issue