Browse Source

Don't clear search box when ModuleBrowser is shown.

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
e3097e2dac
4 changed files with 11 additions and 4 deletions
  1. +1
    -1
      dep/Makefile
  2. +8
    -1
      src/app/ModuleBrowser.cpp
  3. +1
    -1
      src/app/RackWidget.cpp
  4. +1
    -1
      src/app/Scene.cpp

+ 1
- 1
dep/Makefile View File

@@ -109,7 +109,7 @@ $(libcurl): $(openssl)
cd curl-7.63.0 && PKG_CONFIG_PATH= $(CONFIGURE) \
--disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --disable-manual --disable-shared --disable-symbol-hiding \
--without-zlib --without-libpsl --without-libmetalink --without-libssh2 --without-librtmp --without-winidn --without-libidn2 --without-nghttp2 --without-brotli \
--without-ca-bundle --with-ca-fallback --with-ssl=$(realpath $(DEP_LOCAL))
--without-ca-bundle --with-ca-fallback --with-ssl="$(realpath $(DEP_LOCAL))"
$(MAKE) -C curl-7.63.0
$(MAKE) -C curl-7.63.0 install



+ 8
- 1
src/app/ModuleBrowser.cpp View File

@@ -237,6 +237,7 @@ struct BrowserSearchField : ui::TextField {
APP->event->setSelected(this);
TextField::step();
}

void onSelectKey(const event::SelectKey &e) override {
if (e.action == GLFW_PRESS) {
if (e.key == GLFW_KEY_ESCAPE) {
@@ -249,12 +250,18 @@ struct BrowserSearchField : ui::TextField {
if (!e.getConsumed())
ui::TextField::onSelectKey(e);
}

void onChange(const event::Change &e) override;

void onHide(const event::Hide &e) override {
setText("");
APP->event->setSelected(NULL);
ui::TextField::onHide(e);
}

void onShow(const event::Show &e) override {
selectAll();
TextField::onShow(e);
}
};




+ 1
- 1
src/app/RackWidget.cpp View File

@@ -176,7 +176,7 @@ void RackWidget::onButton(const event::Button &e) {
widget::OpaqueWidget::onButton(e);
if (e.getConsumed() == this) {
if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_RIGHT) {
APP->scene->moduleBrowser->visible = true;
APP->scene->moduleBrowser->show();
}
}
}


+ 1
- 1
src/app/Scene.cpp View File

@@ -138,7 +138,7 @@ void Scene::onHoverKey(const event::HoverKey &e) {
} break;
case GLFW_KEY_ENTER:
case GLFW_KEY_KP_ENTER: {
moduleBrowser->visible = true;
moduleBrowser->show();
e.consume(this);
} break;
case GLFW_KEY_F11: {


Loading…
Cancel
Save