mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-24 21:45:12 +00:00
GUI: even more piano work
- don't allow piano window to be moved if clicking on piano - only treat left click as a touch point
This commit is contained in:
parent
cfa05143ab
commit
255fc4cc25
2 changed files with 3 additions and 0 deletions
|
@ -2314,6 +2314,7 @@ void FurnaceGUI::processPoint(SDL_Event& ev) {
|
|||
break;
|
||||
}
|
||||
case SDL_MOUSEBUTTONDOWN: {
|
||||
if (ev.button.button!=SDL_BUTTON_LEFT) break;
|
||||
for (size_t i=0; i<activePoints.size(); i++) {
|
||||
TouchPoint& point=activePoints[i];
|
||||
if (point.id==-1) {
|
||||
|
@ -2332,6 +2333,7 @@ void FurnaceGUI::processPoint(SDL_Event& ev) {
|
|||
break;
|
||||
}
|
||||
case SDL_MOUSEBUTTONUP: {
|
||||
if (ev.button.button!=SDL_BUTTON_LEFT) break;
|
||||
for (size_t i=0; i<activePoints.size(); i++) {
|
||||
TouchPoint& point=activePoints[i];
|
||||
if (point.id==-1) {
|
||||
|
|
|
@ -209,6 +209,7 @@ void FurnaceGUI::drawPiano() {
|
|||
// render piano
|
||||
//ImGui::ItemSize(size,ImGui::GetStyle().FramePadding.y);
|
||||
if (ImGui::ItemAdd(rect,ImGui::GetID("pianoDisplay"))) {
|
||||
ImGui::ItemHoverable(rect,ImGui::GetID("pianoDisplay"));
|
||||
if (view) {
|
||||
int notes=oct*12;
|
||||
// evaluate input
|
||||
|
|
Loading…
Reference in a new issue