diff options
Diffstat (limited to 'indra/newview/llnavigationbar.cpp')
-rw-r--r-- | indra/newview/llnavigationbar.cpp | 359 |
1 files changed, 273 insertions, 86 deletions
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index b91e23eace..e11df06d86 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -34,10 +34,14 @@ #include "llnavigationbar.h" -#include <llfloaterreg.h> -#include <llfocusmgr.h> -#include <lliconctrl.h> -#include <llmenugl.h> +#include "v2math.h" + +#include "llregionhandle.h" + +#include "llfloaterreg.h" +#include "llfocusmgr.h" +#include "lliconctrl.h" +#include "llmenugl.h" #include "llagent.h" #include "llviewerregion.h" @@ -49,12 +53,16 @@ #include "llsidetray.h" #include "llslurl.h" #include "llurlsimstring.h" +#include "llurlregistry.h" +#include "llurldispatcher.h" #include "llviewerinventory.h" +#include "llviewermenu.h" #include "llviewerparcelmgr.h" -#include "llworldmap.h" +#include "llworldmapmessage.h" #include "llappviewer.h" #include "llviewercontrol.h" #include "llfloatermediabrowser.h" +#include "llweb.h" #include "llinventorymodel.h" #include "lllandmarkactions.h" @@ -81,9 +89,24 @@ public: struct Params : public LLInitParam::Block<Params, LLMenuItemCallGL::Params> { - Mandatory<EType> item_type; - - Params() {} + Mandatory<EType> item_type; + Optional<const LLFontGL*> back_item_font, + current_item_font, + forward_item_font; + Optional<std::string> back_item_image, + forward_item_image; + Optional<S32> image_hpad, + image_vpad; + Params() + : item_type(), + back_item_font("back_item_font"), + current_item_font("current_item_font"), + forward_item_font("forward_item_font"), + back_item_image("back_item_image"), + forward_item_image("forward_item_image"), + image_hpad("image_hpad"), + image_vpad("image_vpad") + {} }; /*virtual*/ void draw(); @@ -96,33 +119,36 @@ private: static const S32 ICON_WIDTH = 16; static const S32 ICON_HEIGHT = 16; - static const std::string ICON_IMG_BACKWARD; - static const std::string ICON_IMG_FORWARD; LLIconCtrl* mArrowIcon; }; -const std::string LLTeleportHistoryMenuItem::ICON_IMG_BACKWARD("teleport_history_backward.tga"); -const std::string LLTeleportHistoryMenuItem::ICON_IMG_FORWARD("teleport_history_forward.tga"); +static LLDefaultChildRegistry::Register<LLTeleportHistoryMenuItem> r("teleport_history_menu_item"); + LLTeleportHistoryMenuItem::LLTeleportHistoryMenuItem(const Params& p) : LLMenuItemCallGL(p), mArrowIcon(NULL) { // Set appearance depending on the item type. - if (p.item_type == TYPE_CURRENT) + if (p.item_type == TYPE_BACKWARD) + { + setFont( p.back_item_font ); + } + else if (p.item_type == TYPE_CURRENT) { - setFont(LLFontGL::getFontSansSerifBold()); + setFont( p.current_item_font ); } else { - setFont(LLFontGL::getFontSansSerif()); - setLabel(std::string(" ") + std::string(p.label)); + setFont( p.forward_item_font ); } LLIconCtrl::Params icon_params; icon_params.name("icon"); - icon_params.rect(LLRect(0, ICON_HEIGHT, ICON_WIDTH, 0)); + LLRect rect(0, ICON_HEIGHT, ICON_WIDTH, 0); + rect.translate( p.image_hpad, p.image_vpad ); + icon_params.rect( rect ); icon_params.mouse_opaque(false); icon_params.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP); icon_params.visible(false); @@ -131,9 +157,9 @@ LLTeleportHistoryMenuItem::LLTeleportHistoryMenuItem(const Params& p) // no image for the current item if (p.item_type == TYPE_BACKWARD) - mArrowIcon->setValue(ICON_IMG_BACKWARD); + mArrowIcon->setValue( p.back_item_image() ); else if (p.item_type == TYPE_FORWARD) - mArrowIcon->setValue(ICON_IMG_FORWARD); + mArrowIcon->setValue( p.forward_item_image() ); addChild(mArrowIcon); } @@ -157,23 +183,90 @@ void LLTeleportHistoryMenuItem::onMouseLeave(S32 x, S32 y, MASK mask) mArrowIcon->setVisible(FALSE); } -//-- LNavigationBar ---------------------------------------------------------- +static LLDefaultChildRegistry::Register<LLPullButton> menu_button("pull_button"); -/* -TODO: -- Load navbar height from saved settings (as it's done for status bar) or think of a better way. -*/ +LLPullButton::LLPullButton(const LLPullButton::Params& params) : + LLButton(params) +{ + setDirectionFromName(params.direction); +} +boost::signals2::connection LLPullButton::setClickDraggingCallback(const commit_signal_t::slot_type& cb) +{ + return mClickDraggingSignal.connect(cb); +} + +/*virtual*/ +void LLPullButton::onMouseLeave(S32 x, S32 y, MASK mask) +{ + LLButton::onMouseLeave(x, y, mask); + + if (mMouseDownTimer.getStarted()) //an user have done a mouse down, if the timer started. see LLButton::handleMouseDown for details + { + const LLVector2 cursor_direction = LLVector2(F32(x), F32(y)) - mLastMouseDown; + /* For now cursor_direction points to the direction of mouse movement + * Need to decide whether should we fire a signal. + * We fire if angle between mDraggingDirection and cursor_direction is less that 45 degree + * Note: + * 0.5 * F_PI_BY_TWO equals to PI/4 radian that equals to angle of 45 degrees + */ + if (angle_between(mDraggingDirection, cursor_direction) < 0.5 * F_PI_BY_TWO)//call if angle < pi/4 + { + mClickDraggingSignal(this, LLSD()); + } + } -S32 NAVIGATION_BAR_HEIGHT = 60; // *HACK -LLNavigationBar* LLNavigationBar::sInstance = 0; +} -LLNavigationBar* LLNavigationBar::getInstance() +/*virtual*/ +BOOL LLPullButton::handleMouseDown(S32 x, S32 y, MASK mask) { - if (!sInstance) - sInstance = new LLNavigationBar(); + BOOL handled = LLButton::handleMouseDown(x, y, mask); + if (handled) + { + //if mouse down was handled by button, + //capture mouse position to calculate the direction of mouse move after mouseLeave event + mLastMouseDown.set(F32(x), F32(y)); + } + return handled; +} - return sInstance; +/*virtual*/ +BOOL LLPullButton::handleMouseUp(S32 x, S32 y, MASK mask) +{ + // reset data to get ready for next circle + mLastMouseDown.clear(); + return LLButton::handleMouseUp(x, y, mask); } +/** + * this function is setting up dragging direction vector. + * Last one is just unit vector. It points to direction of mouse drag that we need to handle + */ +void LLPullButton::setDirectionFromName(const std::string& name) +{ + if (name == "left") + { + mDraggingDirection.set(F32(-1), F32(0)); + } + else if (name == "right") + { + mDraggingDirection.set(F32(0), F32(1)); + } + else if (name == "down") + { + mDraggingDirection.set(F32(0), F32(-1)); + } + else if (name == "up") + { + mDraggingDirection.set(F32(0), F32(1)); + } +} + +//-- LNavigationBar ---------------------------------------------------------- + +/* +TODO: +- Load navbar height from saved settings (as it's done for status bar) or think of a better way. +*/ LLNavigationBar::LLNavigationBar() : mTeleportHistoryMenu(NULL), @@ -182,10 +275,9 @@ LLNavigationBar::LLNavigationBar() mBtnHome(NULL), mCmbLocation(NULL), mSearchComboBox(NULL), - mPurgeTPHistoryItems(false) + mPurgeTPHistoryItems(false), + mSaveToLocationHistory(false) { - setIsChrome(TRUE); - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_navigation_bar.xml"); // set a listener function for LoginComplete event @@ -198,15 +290,13 @@ LLNavigationBar::LLNavigationBar() LLNavigationBar::~LLNavigationBar() { mTeleportFinishConnection.disconnect(); - sInstance = 0; - - LLSearchHistory::getInstance()->save(); + mTeleportFailedConnection.disconnect(); } BOOL LLNavigationBar::postBuild() { - mBtnBack = getChild<LLButton>("back_btn"); - mBtnForward = getChild<LLButton>("forward_btn"); + mBtnBack = getChild<LLPullButton>("back_btn"); + mBtnForward = getChild<LLPullButton>("forward_btn"); mBtnHome = getChild<LLButton>("home_btn"); mCmbLocation= getChild<LLLocationInputCtrl>("location_combo"); @@ -214,27 +304,28 @@ BOOL LLNavigationBar::postBuild() fillSearchComboBox(); - if (!mBtnBack || !mBtnForward || !mBtnHome || - !mCmbLocation || !mSearchComboBox) - { - llwarns << "Malformed navigation bar" << llendl; - return FALSE; - } - mBtnBack->setEnabled(FALSE); mBtnBack->setClickedCallback(boost::bind(&LLNavigationBar::onBackButtonClicked, this)); - mBtnBack->setHeldDownCallback(boost::bind(&LLNavigationBar::onBackOrForwardButtonHeldDown, this, _2)); - + mBtnBack->setHeldDownCallback(boost::bind(&LLNavigationBar::onBackOrForwardButtonHeldDown, this,_1, _2)); + mBtnBack->setClickDraggingCallback(boost::bind(&LLNavigationBar::showTeleportHistoryMenu, this,_1)); + mBtnForward->setEnabled(FALSE); mBtnForward->setClickedCallback(boost::bind(&LLNavigationBar::onForwardButtonClicked, this)); - mBtnForward->setHeldDownCallback(boost::bind(&LLNavigationBar::onBackOrForwardButtonHeldDown, this, _2)); + mBtnForward->setHeldDownCallback(boost::bind(&LLNavigationBar::onBackOrForwardButtonHeldDown, this, _1, _2)); + mBtnForward->setClickDraggingCallback(boost::bind(&LLNavigationBar::showTeleportHistoryMenu, this,_1)); mBtnHome->setClickedCallback(boost::bind(&LLNavigationBar::onHomeButtonClicked, this)); - mCmbLocation->setSelectionCallback(boost::bind(&LLNavigationBar::onLocationSelection, this)); + mCmbLocation->setCommitCallback(boost::bind(&LLNavigationBar::onLocationSelection, this)); mSearchComboBox->setCommitCallback(boost::bind(&LLNavigationBar::onSearchCommit, this)); + mTeleportFinishConnection = LLViewerParcelMgr::getInstance()-> + setTeleportFinishedCallback(boost::bind(&LLNavigationBar::onTeleportFinished, this, _1)); + + mTeleportFailedConnection = LLViewerParcelMgr::getInstance()-> + setTeleportFailedCallback(boost::bind(&LLNavigationBar::onTeleportFailed, this)); + mDefaultNbRect = getRect(); mDefaultFpRect = getChild<LLFavoritesBarCtrl>("favorite")->getRect(); @@ -245,6 +336,21 @@ BOOL LLNavigationBar::postBuild() return TRUE; } +void LLNavigationBar::setVisible(BOOL visible) +{ + // change visibility of grandparent layout_panel to animate in and out + if (getParent()) + { + //to avoid some mysterious bugs like EXT-3352, at least try to log an incorrect parent to ping about a problem. + if(getParent()->getName() != "nav_bar_container") + { + LL_WARNS("LLNavigationBar")<<"NavigationBar has an unknown name of the parent: "<<getParent()->getName()<< LL_ENDL; + } + getParent()->setVisible(visible); + } +} + + void LLNavigationBar::fillSearchComboBox() { if(!mSearchComboBox) @@ -272,18 +378,39 @@ void LLNavigationBar::draw() onTeleportHistoryChanged(); mPurgeTPHistoryItems = false; } + + if (isBackgroundVisible()) + { + static LLUICachedControl<S32> drop_shadow_floater ("DropShadowFloater", 0); + static LLUIColor color_drop_shadow = LLUIColorTable::instance().getColor("ColorDropShadow"); + gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, + color_drop_shadow, drop_shadow_floater ); + } + LLPanel::draw(); } +BOOL LLNavigationBar::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + BOOL handled = childrenHandleRightMouseDown( x, y, mask) != NULL; + if(!handled && !gMenuHolder->hasVisibleMenu()) + { + show_navbar_context_menu(this,x,y); + handled = true; + } + + return handled; +} + void LLNavigationBar::onBackButtonClicked() { LLTeleportHistory::getInstance()->goBack(); } -void LLNavigationBar::onBackOrForwardButtonHeldDown(const LLSD& param) +void LLNavigationBar::onBackOrForwardButtonHeldDown(LLUICtrl* ctrl, const LLSD& param) { if (param["count"].asInteger() == 0) - showTeleportHistoryMenu(); + showTeleportHistoryMenu(ctrl); } void LLNavigationBar::onForwardButtonClicked() @@ -322,8 +449,20 @@ void LLNavigationBar::onLocationSelection() // Will not teleport to empty location. if (typed_location.empty()) return; - + //get selected item from combobox item LLSD value = mCmbLocation->getSelectedValue(); + if(value.isUndefined() && !mCmbLocation->getTextEntry()->isDirty()) + { + // At this point we know that: there is no selected item in list and text field has NOT been changed + // So there is no sense to try to change the location + return; + } + /* since navbar list support autocompletion it contains several types of item: landmark, teleport hystory item, + * typed by user slurl or region name. Let's find out which type of item the user has selected + * to make decision about adding this location into typed history. see mSaveToLocationHistory + * Note: + * Only TYPED_REGION_SLURL item will be added into LLLocationHistory + */ if(value.has("item_type")) { @@ -353,7 +492,7 @@ void LLNavigationBar::onLocationSelection() case TELEPORT_HISTORY: //in case of teleport item was selected, teleport by position too. - case TYPED_REGION_SURL: + case TYPED_REGION_SLURL: if(value.has("global_pos")) { gAgent.teleportViaLocation(LLVector3d(value["global_pos"])); @@ -365,7 +504,7 @@ void LLNavigationBar::onLocationSelection() break; } } - //Let's parse surl or region name + //Let's parse slurl or region name std::string region_name; LLVector3 local_coords(128, 128, 0); @@ -378,7 +517,17 @@ void LLNavigationBar::onLocationSelection() local_coords.set(x, y, z); else return; - }else + } + // we have to do this check after previous, because LLUrlRegistry contains handlers for slurl too + //but we need to know whether typed_location is a simple http url. + else if (LLUrlRegistry::instance().isUrl(typed_location)) + { + // display http:// URLs in the media browser, or + // anything else is sent to the search floater + LLWeb::loadURL(typed_location); + return; + } + else { // assume that an user has typed the {region name} or possible {region_name, parcel} region_name = typed_location.substr(0,typed_location.find(',')); @@ -386,34 +535,37 @@ void LLNavigationBar::onLocationSelection() // Resolve the region name to its global coordinates. // If resolution succeeds we'll teleport. - LLWorldMap::url_callback_t cb = boost::bind( + LLWorldMapMessage::url_callback_t cb = boost::bind( &LLNavigationBar::onRegionNameResponse, this, typed_location, region_name, local_coords, _1, _2, _3, _4); - // connect the callback each time, when user enter new location to get real location of agent after teleport - mTeleportFinishConnection = LLViewerParcelMgr::getInstance()-> - setTeleportFinishedCallback(boost::bind(&LLNavigationBar::onTeleportFinished, this, _1,typed_location)); - - LLWorldMap::getInstance()->sendNamedRegionRequest(region_name, cb, std::string("unused"), false); + mSaveToLocationHistory = true; + LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name, cb, std::string("unused"), false); +} + +void LLNavigationBar::onTeleportFailed() +{ + mSaveToLocationHistory = false; } -void LLNavigationBar::onTeleportFinished(const LLVector3d& global_agent_pos, const std::string& typed_location) +void LLNavigationBar::onTeleportFinished(const LLVector3d& global_agent_pos) { - // Location is valid. Add it to the typed locations history. + if (!mSaveToLocationHistory) + return; LLLocationHistory* lh = LLLocationHistory::getInstance(); - //TODO*: do we need convert surl into readable format? + //TODO*: do we need convert slurl into readable format? std::string location; /*NOTE: * We can't use gAgent.getPositionAgent() in case of local teleport to build location. * At this moment gAgent.getPositionAgent() contains previous coordinates. * according to EXT-65 agent position is being reseted on each frame. */ - LLAgentUI::buildLocationString(location, LLAgentUI::LOCATION_FORMAT_WITHOUT_SIM, + LLAgentUI::buildLocationString(location, LLAgentUI::LOCATION_FORMAT_NO_MATURITY, gAgent.getPosAgentFromGlobal(global_agent_pos)); std::string tooltip (LLSLURL::buildSLURLfromPosGlobal(gAgent.getRegion()->getName(), global_agent_pos, false)); LLLocationHistoryItem item (location, - global_agent_pos, tooltip,TYPED_REGION_SURL);// we can add into history only TYPED location + global_agent_pos, tooltip,TYPED_REGION_SLURL);// we can add into history only TYPED location //Touch it, if it is at list already, add new location otherwise if ( !lh->touchItem(item) ) { lh->addItem(item); @@ -421,8 +573,7 @@ void LLNavigationBar::onTeleportFinished(const LLVector3d& global_agent_pos, con lh->save(); - if(mTeleportFinishConnection.connected()) - mTeleportFinishConnection.disconnect(); + mSaveToLocationHistory = false; } @@ -474,7 +625,7 @@ void LLNavigationBar::rebuildTeleportHistoryMenu() type = LLTeleportHistoryMenuItem::TYPE_CURRENT; LLTeleportHistoryMenuItem::Params item_params; - item_params.label = item_params.name = hist_items[i].getTitle(); + item_params.label = item_params.name = hist_items[i].mTitle; item_params.item_type = type; item_params.on_click.function(boost::bind(&LLNavigationBar::onTeleportHistoryMenuItemClicked, this, i)); LLTeleportHistoryMenuItem* new_itemp = LLUICtrlFactory::create<LLTeleportHistoryMenuItem>(item_params); @@ -504,7 +655,7 @@ void LLNavigationBar::onRegionNameResponse( gAgent.teleportViaLocation(global_pos); } -void LLNavigationBar::showTeleportHistoryMenu() +void LLNavigationBar::showTeleportHistoryMenu(LLUICtrl* btn_ctrl) { // Don't show the popup if teleport history is empty. if (LLTeleportHistory::getInstance()->isEmpty()) @@ -518,14 +669,43 @@ void LLNavigationBar::showTeleportHistoryMenu() if (mTeleportHistoryMenu == NULL) return; - // *TODO: why to draw/update anything before showing the menu? - mTeleportHistoryMenu->buildDrawLabels(); mTeleportHistoryMenu->updateParent(LLMenuGL::sMenuContainer); - LLRect btnBackRect = mBtnBack->getRect(); - LLMenuGL::showPopup(this, mTeleportHistoryMenu, btnBackRect.mLeft, btnBackRect.mBottom); - + const S32 MENU_SPAWN_PAD = -1; + LLMenuGL::showPopup(btn_ctrl, mTeleportHistoryMenu, 0, MENU_SPAWN_PAD); + LLButton* nav_button = dynamic_cast<LLButton*>(btn_ctrl); + if(nav_button) + { + if(mHistoryMenuConnection.connected()) + { + LL_WARNS("Navgationbar")<<"mHistoryMenuConnection should be disconnected at this moment."<<LL_ENDL; + mHistoryMenuConnection.disconnect(); + } + mHistoryMenuConnection = gMenuHolder->setMouseUpCallback(boost::bind(&LLNavigationBar::onNavigationButtonHeldUp, this, nav_button)); + // pressed state will be update after mouseUp in onBackOrForwardButtonHeldUp(); + nav_button->setForcePressedState(true); + } // *HACK pass the mouse capturing to the drop-down menu - gFocusMgr.setMouseCapture( NULL ); + // it need to let menu handle mouseup event + gFocusMgr.setMouseCapture(gMenuHolder); +} +/** + * Taking into account the HACK above, this callback-function is responsible for correct handling of mouseUp event in case of holding-down the navigation buttons.. + * We need to process this case separately to update a pressed state of navigation button. + */ +void LLNavigationBar::onNavigationButtonHeldUp(LLButton* nav_button) +{ + if(nav_button) + { + nav_button->setForcePressedState(false); + } + if(gFocusMgr.getMouseCapture() == gMenuHolder) + { + // we had passed mouseCapture in showTeleportHistoryMenu() + // now we MUST release mouseCapture to continue a proper mouseevent workflow. + gFocusMgr.setMouseCapture(NULL); + } + //gMenuHolder is using to display bunch of menus. Disconnect signal to avoid unnecessary calls. + mHistoryMenuConnection.disconnect(); } void LLNavigationBar::handleLoginComplete() @@ -535,7 +715,7 @@ void LLNavigationBar::handleLoginComplete() void LLNavigationBar::invokeSearch(std::string search_text) { - LLFloaterReg::showInstance("search", LLSD().insert("category", "all").insert("id", LLSD(search_text))); + LLFloaterReg::showInstance("search", LLSD().with("category", "all").with("id", LLSD(search_text))); } void LLNavigationBar::clearHistoryCache() @@ -547,6 +727,15 @@ void LLNavigationBar::clearHistoryCache() mPurgeTPHistoryItems= true; } +int LLNavigationBar::getDefNavBarHeight() +{ + return mDefaultNbRect.getHeight(); +} +int LLNavigationBar::getDefFavBarHeight() +{ + return mDefaultFpRect.getHeight(); +} + void LLNavigationBar::showNavigationPanel(BOOL visible) { bool fpVisible = gSavedSettings.getBOOL("ShowNavbarFavoritesPanel"); @@ -571,6 +760,8 @@ void LLNavigationBar::showNavigationPanel(BOOL visible) // this is duplicated in 'else' section because it should be called BEFORE fb->reshape reshape(nbRect.getWidth(), nbRect.getHeight()); setRect(nbRect); + // propagate size to parent container + getParent()->reshape(nbRect.getWidth(), nbRect.getHeight()); fb->reshape(fbRect.getWidth(), fbRect.getHeight()); fb->setRect(fbRect); @@ -584,6 +775,7 @@ void LLNavigationBar::showNavigationPanel(BOOL visible) reshape(nbRect.getWidth(), nbRect.getHeight()); setRect(nbRect); + getParent()->reshape(nbRect.getWidth(), nbRect.getHeight()); } } else @@ -598,6 +790,7 @@ void LLNavigationBar::showNavigationPanel(BOOL visible) // this is duplicated in 'else' section because it should be called BEFORE fb->reshape reshape(nbRect.getWidth(), nbRect.getHeight()); setRect(nbRect); + getParent()->reshape(nbRect.getWidth(), nbRect.getHeight()); fb->reshape(fbRect.getWidth(), fbRect.getHeight()); fb->setRect(fbRect); @@ -610,16 +803,12 @@ void LLNavigationBar::showNavigationPanel(BOOL visible) reshape(nbRect.getWidth(), nbRect.getHeight()); setRect(nbRect); + getParent()->reshape(nbRect.getWidth(), nbRect.getHeight()); } } childSetVisible("bg_icon", fpVisible); childSetVisible("bg_icon_no_fav", !fpVisible); - - if(LLSideTray::instanceCreated()) - { - LLSideTray::getInstance()->resetPanelRect(); - } } void LLNavigationBar::showFavoritesPanel(BOOL visible) @@ -654,6 +843,7 @@ void LLNavigationBar::showFavoritesPanel(BOOL visible) reshape(nbRect.getWidth(), nbRect.getHeight()); setRect(nbRect); + getParent()->reshape(nbRect.getWidth(), nbRect.getHeight()); fb->reshape(fbRect.getWidth(), fbRect.getHeight()); fb->setRect(fbRect); @@ -678,14 +868,11 @@ void LLNavigationBar::showFavoritesPanel(BOOL visible) reshape(nbRect.getWidth(), nbRect.getHeight()); setRect(nbRect); + getParent()->reshape(nbRect.getWidth(), nbRect.getHeight()); } childSetVisible("bg_icon", visible); childSetVisible("bg_icon_no_fav", !visible); fb->setVisible(visible); - if(LLSideTray::instanceCreated()) - { - LLSideTray::getInstance()->resetPanelRect(); - } } |