2020-06-28 16:39:18 +00:00
|
|
|
//
|
|
|
|
// BusyComponent.h
|
|
|
|
//
|
|
|
|
// Animated busy indicator.
|
|
|
|
//
|
|
|
|
|
2017-10-31 17:12:50 +00:00
|
|
|
#pragma once
|
|
|
|
#ifndef ES_CORE_COMPONENTS_BUSY_COMPONENT_H
|
|
|
|
#define ES_CORE_COMPONENTS_BUSY_COMPONENT_H
|
|
|
|
|
2014-06-20 01:30:09 +00:00
|
|
|
#include "components/ComponentGrid.h"
|
|
|
|
#include "components/NinePatchComponent.h"
|
2017-11-01 22:21:10 +00:00
|
|
|
#include "GuiComponent.h"
|
2014-04-19 18:37:10 +00:00
|
|
|
|
|
|
|
class AnimatedImageComponent;
|
|
|
|
class TextComponent;
|
|
|
|
|
|
|
|
class BusyComponent : public GuiComponent
|
|
|
|
{
|
|
|
|
public:
|
2020-06-28 16:39:18 +00:00
|
|
|
BusyComponent(Window* window);
|
2014-04-19 18:37:10 +00:00
|
|
|
|
2020-06-28 16:39:18 +00:00
|
|
|
void onSizeChanged() override;
|
2014-04-19 18:37:10 +00:00
|
|
|
|
2020-06-28 16:39:18 +00:00
|
|
|
void reset(); // Reset to frame 0.
|
2014-04-19 18:37:10 +00:00
|
|
|
|
|
|
|
private:
|
2020-06-28 16:39:18 +00:00
|
|
|
NinePatchComponent mBackground;
|
|
|
|
ComponentGrid mGrid;
|
2014-04-19 18:37:10 +00:00
|
|
|
|
2020-06-28 16:39:18 +00:00
|
|
|
std::shared_ptr<AnimatedImageComponent> mAnimation;
|
|
|
|
std::shared_ptr<TextComponent> mText;
|
2014-04-19 18:37:10 +00:00
|
|
|
};
|
2017-10-31 17:12:50 +00:00
|
|
|
|
|
|
|
#endif // ES_CORE_COMPONENTS_BUSY_COMPONENT_H
|