mirror of
https://github.com/holub/mame
synced 2025-07-04 09:28:51 +03:00
ui pointer options: revert reset options to default when pressing Del (conflict with ctrlr cfg)
This commit is contained in:
parent
0f3a9e4ced
commit
8c8c25f5e3
@ -191,16 +191,11 @@ struct mame_ui_manager::active_pointer
|
|||||||
struct mame_ui_manager::pointer_options
|
struct mame_ui_manager::pointer_options
|
||||||
{
|
{
|
||||||
pointer_options()
|
pointer_options()
|
||||||
|
: timeout(std::chrono::seconds(3))
|
||||||
|
, hide_inactive(true)
|
||||||
|
, timeout_set(false)
|
||||||
|
, hide_inactive_set(false)
|
||||||
{
|
{
|
||||||
reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
void reset()
|
|
||||||
{
|
|
||||||
timeout = std::chrono::seconds(3);
|
|
||||||
hide_inactive = true;
|
|
||||||
timeout_set = false;
|
|
||||||
hide_inactive_set = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool options_set() const
|
bool options_set() const
|
||||||
@ -1793,19 +1788,6 @@ bool mame_ui_manager::hide_inactive_pointers(int target) const noexcept
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
|
||||||
// reset_pointer_options - reset per-target
|
|
||||||
// pointer options
|
|
||||||
//-------------------------------------------------
|
|
||||||
|
|
||||||
void mame_ui_manager::reset_pointer_options(int target) noexcept
|
|
||||||
{
|
|
||||||
assert((0 <= target) && (m_pointer_options.size() > target));
|
|
||||||
if ((0 <= target) && (m_pointer_options.size() > target))
|
|
||||||
m_pointer_options[target].reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
SLIDER CONTROLS
|
SLIDER CONTROLS
|
||||||
|
@ -211,7 +211,6 @@ public:
|
|||||||
void set_hide_inactive_pointers(int target, bool hide) noexcept;
|
void set_hide_inactive_pointers(int target, bool hide) noexcept;
|
||||||
std::chrono::steady_clock::duration pointer_activity_timeout(int target) const noexcept;
|
std::chrono::steady_clock::duration pointer_activity_timeout(int target) const noexcept;
|
||||||
bool hide_inactive_pointers(int target) const noexcept;
|
bool hide_inactive_pointers(int target) const noexcept;
|
||||||
void reset_pointer_options(int target) noexcept;
|
|
||||||
|
|
||||||
// drawing informational overlays
|
// drawing informational overlays
|
||||||
void draw_fps_counter(render_container &container);
|
void draw_fps_counter(render_container &container);
|
||||||
|
@ -400,12 +400,6 @@ bool menu_video_options::handle(event const *ev)
|
|||||||
ui().set_hide_inactive_pointers(m_target.index(), !ui().hide_inactive_pointers(m_target.index()));
|
ui().set_hide_inactive_pointers(m_target.index(), !ui().hide_inactive_pointers(m_target.index()));
|
||||||
changed = true;
|
changed = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// restore default
|
|
||||||
case IPT_UI_CLEAR:
|
|
||||||
ui().reset_pointer_options(m_target.index());
|
|
||||||
changed = true;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user