MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / setMessage

Method setMessage

source/frontend/StarRadioMessagePopup.cpp:85–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void RadioMessagePopup::setMessage(RadioMessage message) {
86 m_message = message;
87
88 if (!message.chatterSound.empty() && message.textSpeed > 0) {
89 if (m_chatterSound)
90 m_chatterSound->stop();
91 auto assets = Root::singleton().assets();
92 m_chatterSound = make_shared<AudioInstance>(*assets->audio(message.chatterSound));
93 m_chatterSound->setLoops(-1);
94 }
95
96 enterStage(PopupStage::AnimateIn);
97
98 updateAnchorOffset();
99}
100
101void RadioMessagePopup::setChatHeight(int chatHeight) {
102 auto endPosition = m_chatOffset + Vec2I(0, chatHeight);

Callers

nothing calls this directly

Calls 6

singletonClass · 0.85
assetsMethod · 0.80
audioMethod · 0.80
setLoopsMethod · 0.80
emptyMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected