1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef CL_BRICK_CONTROL_H
20 #define CL_BRICK_CONTROL_H
23 #include "nel/misc/types_nl.h"
28 #include "bitmap_base.h"
29 #include "base_spell_client.h"
38 * \author David Fleury
39 * \author Nevrax France
42 class CBrickControl
: public CControl
46 /// default Constructor
47 CBrickControl(uint id
= 0);
50 CBrickControl(uint id
, float x
, float y
, float x_pixel
, float y_pixel
, float w
, float h
, float w_pixel
, float h_pixel
, uint numFuncOn
= 0, uint numFuncR
= 0);
53 // CBrickControl( const CBrickControl &b);
60 * get the brick associated to this control
61 * \return CBrickClient* the brick or NULL if no brick is associated with this control
63 inline CBrickClient
*getAssociatedBrick() { return _AssociatedBrick
; }
66 * set the brick associated to this control
67 * \param CBrickClient* brick the brick associated to this control
69 inline void setAssociatedBrick(CBrickClient
*brick
)
74 nlwarning("<CBrickClient::setAssociatedBrick> : param in NULL");
77 _AssociatedBrick
= brick
;
80 /// display the control
81 virtual void display();
84 * set the color of the control
85 * \param CRGBA &color new color of the control
87 inline void rgba( const CRGBA
&color
) { _RGBA
= color
; }
90 * get the color of the control
91 * \return CRGBA& color of the control
93 inline const CRGBA
&rgba() const { return _RGBA
; }
95 /// Manage the click for the control.
96 virtual void click(float x
, float y
, bool &taken
);
98 /// Manage the right click for the control.
99 virtual void clickRight(float x
, float y
, bool &taken
);
106 void init(uint numFuncOn
= 0, uint numFuncR
= 0);
109 /// the brick associated to this control
110 CBrickClient
*_AssociatedBrick
;
112 // color applied on the texture of the brick, default = 255 255 255 255
115 /// function called with a left click on the control
117 /// function called with a right click on the control
123 #endif // CL_BRICK_CONTROL_H
125 /* End of brick_control.h */