Clean up pie menu and inherit directly from LLMenuGL instead of LLContextMenu

Fri, 15 Apr 2016 18:30:37 +0200

author
Ansariel
date
Fri, 15 Apr 2016 18:30:37 +0200
changeset 48945
8e3e37734f4b
parent 48944
32e8b304bc22
child 48946
7b33ffa61648

Clean up pie menu and inherit directly from LLMenuGL instead of LLContextMenu

indra/newview/piemenu.cpp file | annotate | diff | revisions
indra/newview/piemenu.h file | annotate | diff | revisions
     1.1 --- a/indra/newview/piemenu.cpp	Fri Apr 15 16:05:57 2016 +0200
     1.2 +++ b/indra/newview/piemenu.cpp	Fri Apr 15 18:30:37 2016 +0200
     1.3 @@ -54,8 +54,8 @@
     1.4  const S32 PIE_X[] = {64, 45,  0, -45, -63, -45,   0,  45};
     1.5  const S32 PIE_Y[] = { 0, 44, 73,  44,   0, -44, -73, -44};
     1.6  
     1.7 -PieMenu::PieMenu(const LLContextMenu::Params& p) :
     1.8 -	LLContextMenu(p),
     1.9 +PieMenu::PieMenu(const LLMenuGL::Params& p) :
    1.10 +	LLMenuGL(p),
    1.11  	mCurrentSegment(-1)
    1.12  {
    1.13  	LL_DEBUGS() << "PieMenu::PieMenu()" << LL_ENDL;
    1.14 @@ -163,10 +163,6 @@
    1.15  	// make sure the menu is always the correct size
    1.16  	reshape(PIE_OUTER_SIZE * 2, PIE_OUTER_SIZE * 2, FALSE);
    1.17  
    1.18 -	// remember our center point
    1.19 -	mCenterX = x;
    1.20 -	mCenterY = y;
    1.21 -
    1.22  	// get the 3D view rectangle
    1.23  	LLRect screen = LLMenuGL::sMenuContainer->getMenuRect();
    1.24  
     2.1 --- a/indra/newview/piemenu.h	Fri Apr 15 16:05:57 2016 +0200
     2.2 +++ b/indra/newview/piemenu.h	Fri Apr 15 18:30:37 2016 +0200
     2.3 @@ -35,11 +35,11 @@
     2.4  struct PieChildRegistry : public LLChildRegistry<PieChildRegistry>
     2.5  {};
     2.6  
     2.7 -class PieMenu : public LLContextMenu
     2.8 +class PieMenu : public LLMenuGL
     2.9  {
    2.10  	public:
    2.11  		// parameter block for the XUI factory
    2.12 -		struct Params : public LLInitParam::Block<Params, LLContextMenu::Params>
    2.13 +		struct Params : public LLInitParam::Block<Params, LLMenuGL::Params>
    2.14  		{
    2.15  			Optional<std::string> name;
    2.16  
    2.17 @@ -52,7 +52,7 @@
    2.18  		// PieChildRegistry contains a list of allowed child types for the XUI definition
    2.19  		typedef PieChildRegistry child_registry_t;
    2.20  
    2.21 -		PieMenu(const LLContextMenu::Params& p);
    2.22 +		PieMenu(const LLMenuGL::Params& p);
    2.23  
    2.24  		/*virtual*/ void setVisible(BOOL visible);
    2.25  
    2.26 @@ -100,9 +100,7 @@
    2.27  
    2.28  		// timer for visual popup effect
    2.29  		LLFrameTimer mPopupTimer;
    2.30 -		// center position, used for popup effect
    2.31 -		S32 mCenterX;
    2.32 -		S32 mCenterY;
    2.33 +
    2.34  		// this is TRUE when the first mouseclick came to display the menu, used for borderless menu
    2.35  		bool mFirstClick;
    2.36  

mercurial