Able to open paint popup and move with the same button
This commit is contained in:
parent
ba34431be1
commit
e35fd4fa79
2 changed files with 3 additions and 2 deletions
|
|
@ -127,7 +127,7 @@ void DrawingProgram::input_mouse_button_callback(const InputManager::MouseButton
|
||||||
|
|
||||||
if(button.down) {
|
if(button.down) {
|
||||||
if(button.button == InputManager::MouseButton::RIGHT) {
|
if(button.button == InputManager::MouseButton::RIGHT) {
|
||||||
if(!controls.middleClickHeld && !controls.leftClickHeld) {
|
if(!controls.leftClickHeld) {
|
||||||
if(rightClickPopupLocation.has_value())
|
if(rightClickPopupLocation.has_value())
|
||||||
clear_right_click_popup();
|
clear_right_click_popup();
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -491,6 +491,7 @@ void InputManager::backend_pen_button_down_update(const SDL_PenButtonEvent& e) {
|
||||||
pen.buttons[e.button].held = true;
|
pen.buttons[e.button].held = true;
|
||||||
pen.isEraser = e.pen_state & SDL_PEN_INPUT_ERASER_TIP;
|
pen.isEraser = e.pen_state & SDL_PEN_INPUT_ERASER_TIP;
|
||||||
|
|
||||||
|
// Someone requested that one pen button be able to both middle click and right click at the same time, so don't turn this into an if-else statement
|
||||||
if(e.button == main.conf.tabletOptions.middleClickButton) {
|
if(e.button == main.conf.tabletOptions.middleClickButton) {
|
||||||
main.input_mouse_button_callback({
|
main.input_mouse_button_callback({
|
||||||
.deviceType = MouseDeviceType::PEN,
|
.deviceType = MouseDeviceType::PEN,
|
||||||
|
|
@ -500,7 +501,7 @@ void InputManager::backend_pen_button_down_update(const SDL_PenButtonEvent& e) {
|
||||||
.pos = mouseNewPos
|
.pos = mouseNewPos
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if(e.button == main.conf.tabletOptions.rightClickButton) {
|
if(e.button == main.conf.tabletOptions.rightClickButton) {
|
||||||
main.input_mouse_button_callback({
|
main.input_mouse_button_callback({
|
||||||
.deviceType = MouseDeviceType::PEN,
|
.deviceType = MouseDeviceType::PEN,
|
||||||
.button = MouseButton::RIGHT,
|
.button = MouseButton::RIGHT,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue