Browse Source

Close MenuOverlay when clicked with any mouse button

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
d2f0458036
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      src/plugin.cpp
  2. +2
    -2
      src/ui/MenuOverlay.cpp

+ 1
- 1
src/plugin.cpp View File

@@ -109,7 +109,7 @@ static Plugin *loadPlugin(std::string path) {
#endif #endif
} }
} }
DEBUG("%lf", plugin->modifiedTimestamp);
// DEBUG("%lf", plugin->modifiedTimestamp);


// Load plugin.json // Load plugin.json
std::string metadataFilename = (path == "") ? asset::system("Core.json") : (path + "/plugin.json"); std::string metadataFilename = (path == "") ? asset::system("Core.json") : (path + "/plugin.json");


+ 2
- 2
src/ui/MenuOverlay.cpp View File

@@ -19,10 +19,10 @@ void MenuOverlay::step() {


void MenuOverlay::onButton(const event::Button &e) { void MenuOverlay::onButton(const event::Button &e) {
OpaqueWidget::onButton(e); OpaqueWidget::onButton(e);
if (e.getTarget() != this)
if (e.isConsumed() && e.getTarget() != this)
return; return;


if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_LEFT) {
if (e.action == GLFW_PRESS) {
requestDelete(); requestDelete();
e.consume(this); e.consume(this);
} }


Loading…
Cancel
Save