This commit is contained in:
Aria 2025-03-21 22:23:30 +11:00
commit 9c94d113d3
Signed by untrusted user who does not match committer: aria
GPG key ID: 19AB7AA462B8AB3B
10260 changed files with 1237388 additions and 0 deletions

View 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