MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / UpdateWidth

Method UpdateWidth

Source/ClickButton.cpp:62–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62void ClickButton::UpdateWidth()
63{
64 if (mDisplayStyle == ButtonDisplayStyle::kText || mDisplayStyle == ButtonDisplayStyle::kSampleIcon || mDisplayStyle == ButtonDisplayStyle::kFolderIcon)
65 {
66 mWidth = GetStringWidth(GetDisplayName()) + 3 + .25f * strnlen(GetDisplayName().c_str(), 50);
67 if (mDisplayStyle == ButtonDisplayStyle::kSampleIcon || mDisplayStyle == ButtonDisplayStyle::kFolderIcon)
68 mWidth += 20;
69 }
70}
71
72void ClickButton::Render()
73{

Callers

nothing calls this directly

Calls 1

GetStringWidthFunction · 0.85

Tested by

no test coverage detected