v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
65
source/frontend/StarRadioMessagePopup.hpp
Normal file
65
source/frontend/StarRadioMessagePopup.hpp
Normal file
|
@ -0,0 +1,65 @@
|
|||
#ifndef STAR_RADIO_MESSAGE_POPUP_HPP
|
||||
#define STAR_RADIO_MESSAGE_POPUP_HPP
|
||||
|
||||
#include "StarGameTimers.hpp"
|
||||
#include "StarPane.hpp"
|
||||
#include "StarAiTypes.hpp"
|
||||
#include "StarRadioMessageDatabase.hpp"
|
||||
|
||||
namespace Star {
|
||||
|
||||
STAR_CLASS(LabelWidget);
|
||||
STAR_CLASS(ImageWidget);
|
||||
STAR_CLASS(AudioInstance);
|
||||
|
||||
class RadioMessagePopup : public Pane {
|
||||
public:
|
||||
RadioMessagePopup();
|
||||
|
||||
void update() override;
|
||||
void dismissed() override;
|
||||
|
||||
bool messageActive();
|
||||
|
||||
void setMessage(RadioMessage message);
|
||||
void setChatHeight(int chatHeight);
|
||||
void interrupt();
|
||||
|
||||
private:
|
||||
enum PopupStage { AnimateIn, ScrollText, Persist, AnimateOut, Hidden };
|
||||
|
||||
void updateAnchorOffset();
|
||||
void nextPopupStage();
|
||||
void enterStage(PopupStage newStage);
|
||||
|
||||
PopupStage m_popupStage;
|
||||
GameTimer m_stageTimer;
|
||||
|
||||
LabelWidgetPtr m_messageLabel;
|
||||
ImageWidgetPtr m_portraitImage;
|
||||
|
||||
RadioMessage m_message;
|
||||
|
||||
String m_backgroundImage;
|
||||
|
||||
float m_animateInTime;
|
||||
String m_animateInImage;
|
||||
int m_animateInFrames;
|
||||
|
||||
float m_animateOutTime;
|
||||
String m_animateOutImage;
|
||||
int m_animateOutFrames;
|
||||
|
||||
Vec2I m_chatOffset;
|
||||
Vec2I m_chatStartPosition;
|
||||
Vec2I m_chatEndPosition;
|
||||
|
||||
float m_slideTimer;
|
||||
float m_slideTime;
|
||||
|
||||
AudioInstancePtr m_chatterSound;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue