diff options
| author | Erik Kundiman <erik@megapahit.org> | 2023-10-04 07:00:54 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2023-10-04 07:00:54 +0800 |
| commit | 5daccb743f50c7bca066d737ee18295ed38279de (patch) | |
| tree | a0cd5bd3378b2fc44143658bf2677526bae4c505 /indra/llui/llmenugl.cpp | |
| parent | dcdd85e4342305bf363c76e6de1e8f8e0ea8840d (diff) | |
| parent | 5d7b1b09ff195611548bababf36d412ef76ed924 (diff) | |
Merge remote-tracking branch 'secondlife/DRTVWR-559' into DRTVWR-559
Diffstat (limited to 'indra/llui/llmenugl.cpp')
| -rw-r--r-- | indra/llui/llmenugl.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 16c27da56a..cebca70b59 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -573,13 +573,13 @@ void LLMenuItemGL::onVisibilityChange(BOOL new_visibility) // // This class represents a separator. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -LLMenuItemSeparatorGL::Params::Params() -{ -} - LLMenuItemSeparatorGL::LLMenuItemSeparatorGL(const LLMenuItemSeparatorGL::Params& p) : LLMenuItemGL( p ) { + if (p.on_visible.isProvided()) + { + mVisibleSignal.connect(initEnableCallback(p.on_visible)); + } } //virtual @@ -596,6 +596,15 @@ void LLMenuItemSeparatorGL::draw( void ) gl_line_2d( PAD, y, getRect().getWidth() - PAD, y ); } +void LLMenuItemSeparatorGL::buildDrawLabel( void ) +{ + if (mVisibleSignal.num_slots() > 0) + { + bool visible = mVisibleSignal(this, LLSD()); + setVisible(visible); + } +} + BOOL LLMenuItemSeparatorGL::handleMouseDown(S32 x, S32 y, MASK mask) { LLMenuGL* parent_menu = getMenu(); |
