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

Method show

source/frontend/StarBookmarkInterface.cpp:37–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void EditBookmarkDialog::show() {
38 Pane::show();
39
40 if (m_isNew) {
41 fetchChild<LabelWidget>("lblTitle")->setText("NEW BOOKMARK");
42 fetchChild<ButtonWidget>("remove")->hide();
43 } else {
44 fetchChild<LabelWidget>("lblTitle")->setText("EDIT BOOKMARK");
45 fetchChild<ButtonWidget>("remove")->show();
46 }
47
48 auto assets = Root::singleton().assets();
49 fetchChild<ImageWidget>("imgIcon")->setImage(strf("/interface/bookmarks/icons/{}.png", m_bookmark.icon));
50
51 fetchChild<LabelWidget>("lblPlanetName")->setText(m_bookmark.targetName);
52 fetchChild<TextBoxWidget>("name")->setText(m_bookmark.bookmarkName, false);
53 fetchChild<TextBoxWidget>("name")->focus();
54}
55
56void EditBookmarkDialog::ok() {
57 m_bookmark.bookmarkName = fetchChild<TextBoxWidget>("name")->getText();

Callers

nothing calls this directly

Calls 7

singletonClass · 0.85
strfFunction · 0.85
assetsMethod · 0.80
setImageMethod · 0.80
focusMethod · 0.80
setTextMethod · 0.45
hideMethod · 0.45

Tested by

no test coverage detected