diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-08-13 15:32:47 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-08-13 15:32:47 -0400 |
commit | 23f2631d598b6e07450a96ed1ec00670c8867cdd (patch) | |
tree | 20195c1688ad8cb7e8631c97fa5920624f10972c /indra/llui/llui.cpp | |
parent | 54334ff6e377e35c97df3a0fe2a859795ec07b21 (diff) | |
parent | 8ce3323269d95f54e2b768c4c5aa154d4afbbb6b (diff) |
Merge branch 'develop' into nat/edu-channel
Diffstat (limited to 'indra/llui/llui.cpp')
-rw-r--r-- | indra/llui/llui.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index c7539fcec7..8d46422c09 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -156,7 +156,7 @@ mWindow(NULL), // set later in startup mRootView(NULL), mHelpImpl(NULL) { - LLRender2D::initParamSingleton(image_provider); + LLRender2D::createInstance(image_provider); if ((get_ptr_in_map(mSettingGroups, std::string("config")) == NULL) || (get_ptr_in_map(mSettingGroups, std::string("floater")) == NULL) || @@ -170,11 +170,11 @@ mHelpImpl(NULL) LLUICtrl::CommitCallbackRegistry::Registrar& reg = LLUICtrl::CommitCallbackRegistry::defaultRegistrar(); // Callbacks for associating controls with floater visibility: - reg.add("Floater.Toggle", boost::bind(&LLFloaterReg::toggleInstance, _2, LLSD())); - reg.add("Floater.ToggleOrBringToFront", boost::bind(&LLFloaterReg::toggleInstanceOrBringToFront, _2, LLSD())); - reg.add("Floater.Show", boost::bind(&LLFloaterReg::showInstance, _2, LLSD(), FALSE)); - reg.add("Floater.ShowOrBringToFront", boost::bind(&LLFloaterReg::showInstanceOrBringToFront, _2, LLSD())); - reg.add("Floater.Hide", boost::bind(&LLFloaterReg::hideInstance, _2, LLSD())); + reg.add("Floater.Toggle", [](LLUICtrl* ctrl, const LLSD& param) -> void { LLFloaterReg::toggleInstance(param.asStringRef()); }); + reg.add("Floater.ToggleOrBringToFront", [](LLUICtrl* ctrl, const LLSD& param) -> void { LLFloaterReg::toggleInstanceOrBringToFront(param.asStringRef()); }); + reg.add("Floater.Show", [](LLUICtrl* ctrl, const LLSD& param) -> void { LLFloaterReg::showInstance(param.asStringRef(), LLSD(), false); }); + reg.add("Floater.ShowOrBringToFront", [](LLUICtrl* ctrl, const LLSD& param) -> void { LLFloaterReg::showInstanceOrBringToFront(param.asStringRef(), LLSD()); }); + reg.add("Floater.Hide", [](LLUICtrl* ctrl, const LLSD& param) -> void { LLFloaterReg::hideInstance(param.asStringRef()); }); // Button initialization callback for toggle buttons reg.add("Button.SetFloaterToggle", boost::bind(&LLButton::setFloaterToggle, _1, _2)); @@ -189,13 +189,18 @@ mHelpImpl(NULL) reg.add("Button.ToggleFloater", boost::bind(&LLButton::toggleFloaterAndSetToggleState, _1, _2)); // Used by menus along with Floater.Toggle to display visibility as a check-mark - LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.Visible", boost::bind(&LLFloaterReg::instanceVisible, _2, LLSD())); - LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.IsOpen", boost::bind(&LLFloaterReg::instanceVisible, _2, LLSD())); + LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.Visible", [](LLUICtrl* ctrl, const LLSD& param) -> bool { return LLFloaterReg::instanceVisible(param.asStringRef(), LLSD()); }); + LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.IsOpen", [](LLUICtrl* ctrl, const LLSD& param) -> bool { return LLFloaterReg::instanceVisible(param.asStringRef(), LLSD()); }); // Parse the master list of commands LLCommandManager::load(); } +LLUI::~LLUI() +{ + LLRender2D::deleteSingleton(); +} + void LLUI::setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t& remove_popup, const clear_popups_t& clear_popups) { mAddPopupFunc = add_popup; @@ -367,7 +372,7 @@ void LLUI::glRectToScreen(const LLRect& gl, LLRect *screen) } -LLControlGroup& LLUI::getControlControlGroup (const std::string& controlname) +LLControlGroup& LLUI::getControlControlGroup (std::string_view controlname) { for (settings_map_t::iterator itor = mSettingGroups.begin(); itor != mSettingGroups.end(); ++itor) @@ -529,7 +534,7 @@ namespace LLInitParam { if (control.isProvided() && !control().empty()) { - updateValue(LLUIColorTable::instance().getColor(control)); + updateValue(LLUIColorTable::instance().getColor(control())); } else { |