| @@ -303,7 +303,10 @@ struct BrowserSearchField : ui::TextField { | |||||
| struct ShowFavoritesQuantity : ui::Quantity { | struct ShowFavoritesQuantity : ui::Quantity { | ||||
| widget::Widget *widget; | widget::Widget *widget; | ||||
| std::string getLabel() override {return "Only show favorites";} | |||||
| std::string getLabel() override { | |||||
| int favoritesLen = settings.favoriteModels.size(); | |||||
| return string::f("Only show favorites (%d)", favoritesLen); | |||||
| } | |||||
| void setValue(float value) override; | void setValue(float value) override; | ||||
| float getValue() override; | float getValue() override; | ||||
| }; | }; | ||||
| @@ -330,6 +333,7 @@ struct BrowserSidebar : widget::Widget { | |||||
| addChild(favoriteButton); | addChild(favoriteButton); | ||||
| authorLabel = new ui::Label; | authorLabel = new ui::Label; | ||||
| // authorLabel->fontSize = 16; | |||||
| authorLabel->color = nvgRGB(0x80, 0x80, 0x80); | authorLabel->color = nvgRGB(0x80, 0x80, 0x80); | ||||
| authorLabel->text = "Authors"; | authorLabel->text = "Authors"; | ||||
| addChild(authorLabel); | addChild(authorLabel); | ||||
| @@ -353,6 +357,7 @@ struct BrowserSidebar : widget::Widget { | |||||
| } | } | ||||
| tagLabel = new ui::Label; | tagLabel = new ui::Label; | ||||
| // tagLabel->fontSize = 16; | |||||
| tagLabel->color = nvgRGB(0x80, 0x80, 0x80); | tagLabel->color = nvgRGB(0x80, 0x80, 0x80); | ||||
| tagLabel->text = "Tags"; | tagLabel->text = "Tags"; | ||||
| addChild(tagLabel); | addChild(tagLabel); | ||||
| @@ -420,6 +425,7 @@ struct ModuleBrowser : widget::OpaqueWidget { | |||||
| addChild(modelScroll); | addChild(modelScroll); | ||||
| modelLabel = new ui::Label; | modelLabel = new ui::Label; | ||||
| // modelLabel->fontSize = 16; | |||||
| modelLabel->box.pos = math::Vec(10, 10); | modelLabel->box.pos = math::Vec(10, 10); | ||||
| modelScroll->container->addChild(modelLabel); | modelScroll->container->addChild(modelLabel); | ||||
| @@ -497,7 +503,7 @@ struct ModuleBrowser : widget::OpaqueWidget { | |||||
| assert(m); | assert(m); | ||||
| float score = 0.f; | float score = 0.f; | ||||
| if (m->visible) { | if (m->visible) { | ||||
| modelScore(m->model, search); | |||||
| score = modelScore(m->model, search); | |||||
| m->visible = (score > 0); | m->visible = (score > 0); | ||||
| } | } | ||||
| scores[m] = score; | scores[m] = score; | ||||