2015-04-16 16:55:32 +00:00
|
|
|
/*
|
|
|
|
GWEN
|
|
|
|
Copyright (c) 2010 Facepunch Studios
|
|
|
|
See license in Gwen.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#ifndef GWEN_CONTROLS_PROGRESSBAR_H
|
|
|
|
#define GWEN_CONTROLS_PROGRESSBAR_H
|
|
|
|
#include "Gwen/Controls/Base.h"
|
|
|
|
#include "Gwen/Controls/Label.h"
|
|
|
|
#include "Gwen/Gwen.h"
|
|
|
|
#include "Gwen/Skin.h"
|
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
namespace Gwen
|
2015-04-16 16:55:32 +00:00
|
|
|
{
|
2018-09-23 21:17:31 +00:00
|
|
|
namespace Controls
|
|
|
|
{
|
|
|
|
class GWEN_EXPORT ProgressBar : public Label
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GWEN_CONTROL(ProgressBar, Label);
|
2015-04-16 16:55:32 +00:00
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
virtual void Render(Skin::Base* skin);
|
2015-04-16 16:55:32 +00:00
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
virtual void SetVertical() { m_bHorizontal = false; }
|
|
|
|
virtual void SetHorizontal() { m_bHorizontal = true; }
|
2015-04-16 16:55:32 +00:00
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
virtual void SetValue(float val);
|
|
|
|
virtual float GetValue() const { return m_fProgress; }
|
2015-04-16 16:55:32 +00:00
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
virtual void SetAutoLabel(bool b) { m_bAutoLabel = b; }
|
2015-04-16 16:55:32 +00:00
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
protected:
|
|
|
|
float m_fProgress;
|
2015-04-16 16:55:32 +00:00
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
bool m_bHorizontal;
|
|
|
|
bool m_bAutoLabel;
|
|
|
|
};
|
|
|
|
} // namespace Controls
|
|
|
|
} // namespace Gwen
|
2015-04-16 16:55:32 +00:00
|
|
|
#endif
|