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

Method GetDimensions

Source/TextEntry.cpp:207–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207void TextEntry::GetDimensions(float& width, float& height)
208{
209 if (mFlexibleWidth)
210 width = MAX(30.0f, gFontFixedWidth.GetStringWidth(mString, 12) + 4);
211 else
212 width = mCharWidth * 9;
213
214 if (mDrawLabel)
215 width += mLabelSize;
216
217 height = 15;
218}
219
220void TextEntry::OnClicked(float x, float y, bool right)
221{

Callers

nothing calls this directly

Calls 1

GetStringWidthMethod · 0.80

Tested by

no test coverage detected