2
// C++ Interface: IconBase
7
// Author: Erik Hjortsberg <erik.hjortsberg@gmail.com>, (C) 2005
9
// This program is free software; you can redistribute it and/or modify
10
// it under the terms of the GNU General Public License as published by
11
// the Free Software Foundation; either version 2 of the License, or
12
// (at your option) any later version.
14
// This program is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
// GNU General Public License for more details.
19
// You should have received a copy of the GNU General Public License
20
// along with this program; if not, write to the Free Software
21
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.//
23
#ifndef EMBEROGREICONBASE_H
24
#define EMBEROGREICONBASE_H
26
#include "components/ogre/EmberOgrePrerequisites.h"
33
Use this class as base for more advanced buttons where you want a "roll over" effect.
35
@author Erik Hjortsberg
41
* Default constructor.
42
* @param name the name of the icon
43
* @param background the image for the background, will always be shown
44
* @param foreground the image for the foreground, will always be shown
45
* @param borderInactive the image for the border when active (i.e. rolled over). Will only be active when rolled over.
46
* @param borderActive the image for the border when inactive (i.e. not rolled over). Will only be active when not rolled over.
47
* @param size The size of the icon. Defaults to 48x48px.
50
IconBase(const std::string& name, const CEGUI::Image* background, const CEGUI::Image* foreground, const CEGUI::Image* borderInactive, const CEGUI::Image* borderActive, CEGUI::UVector2 size = CEGUI::UVector2(CEGUI::UDim(0, 48), CEGUI::UDim(0, 48)));
55
* Returns a pointer to the container which holds the button. If you want to attach to event etc. use this one.
58
CEGUI::Window* getContainer();
59
CEGUI::PushButton* getButton();
61
void setForeground(const CEGUI::Image* image);
63
static const CEGUI::Image* loadImageFromImageset(const std::string & imagesetName, const std::string & image);
66
CEGUI::Window* mContainer;
67
CEGUI::PushButton* mButton;