2011-11-14 23:32:55 +01:00
|
|
|
/*
|
2013-01-08 19:21:54 +01:00
|
|
|
* Copyright (c) 2010-2013 OTClient <https://github.com/edubart/otclient>
|
2011-11-14 23:32:55 +01:00
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
* THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef UICREATURE_H
|
|
|
|
#define UICREATURE_H
|
|
|
|
|
|
|
|
#include "declarations.h"
|
|
|
|
#include <framework/ui/uiwidget.h>
|
2012-07-14 03:10:24 +02:00
|
|
|
#include "creature.h"
|
2011-11-14 23:32:55 +01:00
|
|
|
|
|
|
|
class UICreature : public UIWidget
|
|
|
|
{
|
|
|
|
public:
|
2012-06-08 18:58:08 +02:00
|
|
|
void drawSelf(Fw::DrawPane drawPane);
|
2011-11-14 23:32:55 +01:00
|
|
|
|
|
|
|
void setCreature(const CreaturePtr& creature) { m_creature = creature; }
|
2012-02-08 02:33:08 +01:00
|
|
|
void setFixedCreatureSize(bool fixed) { m_fixedCreatureSize = fixed; }
|
2012-08-31 06:56:10 +02:00
|
|
|
void setOutfit(const Outfit& outfit);
|
2011-11-15 03:04:07 +01:00
|
|
|
|
2011-11-14 23:32:55 +01:00
|
|
|
CreaturePtr getCreature() { return m_creature; }
|
2012-02-08 02:33:08 +01:00
|
|
|
bool isFixedCreatureSize() { return m_fixedCreatureSize; }
|
2011-11-14 23:32:55 +01:00
|
|
|
|
2012-01-14 20:31:20 +01:00
|
|
|
protected:
|
2012-02-08 02:33:08 +01:00
|
|
|
void onStyleApply(const std::string& styleName, const OTMLNodePtr& styleNode);
|
|
|
|
|
2011-11-14 23:32:55 +01:00
|
|
|
CreaturePtr m_creature;
|
2012-07-29 12:32:44 +02:00
|
|
|
stdext::boolean<false> m_fixedCreatureSize;
|
2011-11-14 23:32:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|