MCPcopy Create free account
hub / github.com/cococry/leif / lf_button_dimension

Function lf_button_dimension

leif.c:2837–2842  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2835}
2836
2837vec2s lf_button_dimension(const char* text) {
2838 LfUIElementProps props = get_props_for(state.theme.button_props);
2839 float padding = props.padding;
2840 vec2s text_dimension = lf_text_dimension(text);
2841 return (vec2s){text_dimension.x + padding * 2.0f, text_dimension.y + padding};
2842}
2843
2844float lf_get_text_end(const char* str, float start_x) {
2845 LfFont font = get_current_font();

Callers

nothing calls this directly

Calls 2

get_props_forFunction · 0.85
lf_text_dimensionFunction · 0.85

Tested by

no test coverage detected