type alias refactor
This commit is contained in:
@@ -92,14 +92,14 @@ void ui_set_accent(S32 accent_id);
|
||||
|
||||
extern F32 g_ui_scale;
|
||||
|
||||
// Scale a float value (for CLAY_SIZING_FIXED, corner radii, etc.)
|
||||
static inline float uis(float x) { return x * g_ui_scale; }
|
||||
// Scale a F32 value (for CLAY_SIZING_FIXED, corner radii, etc.)
|
||||
static inline F32 uis(F32 x) { return x * g_ui_scale; }
|
||||
|
||||
// Scale to uint16_t (for Clay_Padding, childGap, etc.)
|
||||
static inline uint16_t uip(float x) { return (uint16_t)(x * g_ui_scale + 0.5f); }
|
||||
// Scale to U16 (for Clay_Padding, childGap, etc.)
|
||||
static inline U16 uip(F32 x) { return (U16)(x * g_ui_scale + 0.5f); }
|
||||
|
||||
// Scale to uint16_t font size
|
||||
static inline uint16_t uifs(float x) { return (uint16_t)(x * g_ui_scale + 0.5f); }
|
||||
// Scale to U16 font size
|
||||
static inline U16 uifs(F32 x) { return (U16)(x * g_ui_scale + 0.5f); }
|
||||
|
||||
////////////////////////////////
|
||||
// Tab styling
|
||||
|
||||
Reference in New Issue
Block a user