MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / OnFormat

Method OnFormat

Descent3/mmItem.cpp:179–188  ·  view source on GitHub ↗

override: called when resized or before drawing.

Source from the content-addressed store, hash-verified

177
178// override: called when resized or before drawing.
179void mmItem::OnFormat() {
180 if (m_Flags & UIF_FIT) {
181 ui_DrawSetFont(MMITEM_FONT);
182
183 m_W = (m_text ? ui_GetTextWidth(m_text) : 0);
184 m_H = (m_text ? ui_GetTextHeight(m_text) : 0);
185 }
186
187 UIGadget::OnFormat();
188}
189
190// override: behavior when gadget is destroyed.
191void mmItem::OnDestroy() {

Callers

nothing calls this directly

Calls 3

ui_DrawSetFontFunction · 0.85
ui_GetTextWidthFunction · 0.85
ui_GetTextHeightFunction · 0.85

Tested by

no test coverage detected