MCPcopy Create free account
hub / github.com/ddnet/ddnet / DoToolbarImages

Method DoToolbarImages

src/game/editor/editor.cpp:702–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

700}
701
702void CEditor::DoToolbarImages(CUIRect ToolBar)
703{
704 CUIRect ToolBarTop, ToolBarBottom;
705 ToolBar.HSplitMid(&ToolBarTop, &ToolBarBottom, 5.0f);
706
707 std::shared_ptr<CEditorImage> pSelectedImage = Map()->SelectedImage();
708 if(pSelectedImage != nullptr)
709 {
710 char aLabel[64];
711 str_format(aLabel, sizeof(aLabel), "Size: %" PRIzu " × %" PRIzu, pSelectedImage->m_Width, pSelectedImage->m_Height);
712 Ui()->DoLabel(&ToolBarBottom, aLabel, 12.0f, TEXTALIGN_ML);
713 }
714}
715
716void CEditor::DoToolbarSounds(CUIRect ToolBar)
717{

Callers

nothing calls this directly

Calls 6

MapFunction · 0.85
str_formatFunction · 0.85
UiFunction · 0.85
HSplitMidMethod · 0.80
SelectedImageMethod · 0.80
DoLabelMethod · 0.80

Tested by

no test coverage detected