Commit c4fbc7fe authored by Leeor Dicker's avatar Leeor Dicker

Wheel mouse adjusts the brush size for collision editing.

parent c074e8f6
......@@ -17,6 +17,7 @@ ToolBar::~ToolBar()
EventHandler& e = Utility<EventHandler>::get();
e.keyDown().Disconnect(this, &ToolBar::onKeyDown);
e.mouseWheel().Disconnect(this, &ToolBar::onMouseWheel);
mToolbarEvent.Clear();
}
......@@ -158,6 +159,7 @@ void ToolBar::hookEvents()
EventHandler& e = Utility<EventHandler>::get();
e.keyDown().Connect(this, &ToolBar::onKeyDown);
e.mouseWheel().Connect(this, &ToolBar::onMouseWheel);
}
......@@ -168,6 +170,15 @@ void ToolBar::onKeyDown(KeyCode code, KeyModifier mod, bool repeat)
}
void ToolBar::onMouseWheel(int x, int y)
{
if (y == 1)
btnSpinnerUp_Clicked();
else
btnSpinnerDown_Clicked();
}
void drawSeparator(Button& btn, int margin)
{
//bevelBox(btn.positionX() + btn.width() + margin, btn.positionY(), 2, btn.height());
......
......@@ -69,6 +69,8 @@ private:
void onKeyDown(KeyCode code, KeyModifier mod, bool repeat);
void onMouseWheel(int x, int y);
private:
void resetTools();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment