mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-11 02:57:39 +00:00
Add ability to assign None/Pan/Rotate to mouse buttons (#10736)
* Add logic to handle the left, middle and right buttons being assigned to do nothing, pan or rotate * Add entries for setting the drag actions to preferences * Allow the label text in preferences to wrap * Show mouse mappings in Help -> Keyboard Shortcuts * Re-add preferences in updated layout * Add camera mouse options under camera * Change mouse action strings to use L() for localization * Display "None" when it is selected instead of blank in keyboard shortcuts --------- Co-authored-by: Rob O <robertolabode@gmail.com> Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
@@ -1038,8 +1038,11 @@ public:
|
||||
void on_set_focus(wxFocusEvent& evt);
|
||||
void force_set_focus();
|
||||
|
||||
bool is_camera_rotate(const wxMouseEvent& evt, const bool buttonsSwapped) const;
|
||||
bool is_camera_pan(const wxMouseEvent& evt, const bool buttonsSwapped) const;
|
||||
enum class MouseButton { None, Left, Middle, Right };
|
||||
enum class MouseAction { None, Pan, Rotation };
|
||||
bool clicked_button_matches_action(const wxMouseEvent& evt, MouseAction action, const std::map<MouseButton, MouseAction>& mappings) const;
|
||||
bool is_camera_rotate(const wxMouseEvent& evt, const std::map<MouseButton, MouseAction>& mappings) const;
|
||||
bool is_camera_pan(const wxMouseEvent& evt, const std::map<MouseButton, MouseAction>& mappings) const;
|
||||
|
||||
Size get_canvas_size() const;
|
||||
Vec2d get_local_mouse_position() const;
|
||||
|
||||
Reference in New Issue
Block a user