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

Method displayMessage

source/frontend/StarPopupInterface.cpp:21–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21void PopupInterface::displayMessage(String const& message, String const& title, String const& subtitle, Maybe<String> const& onShowSound) {
22 setTitleString(title, subtitle);
23 fetchChild<LabelWidget>("message")->setText(message);
24 show();
25 auto sound = onShowSound.value(Random::randValueFrom(Root::singleton().assets()->json("/interface/windowconfig/popup.config:onShowSound").toArray(), "").toString());
26 if (!sound.empty())
27 context()->playAudio(sound);
28}
29
30}

Callers 1

handleInteractActionMethod · 0.80

Calls 9

singletonClass · 0.85
toArrayMethod · 0.80
jsonMethod · 0.80
assetsMethod · 0.80
playAudioMethod · 0.80
setTextMethod · 0.45
valueMethod · 0.45
toStringMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected