mirror of
https://github.com/nicbarker/clay.git
synced 2025-05-09 11:58:05 +00:00
[Debug] Update Clay__RenderDebugLayoutSizing
to handle more sizing types. (#392)
Some checks are pending
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Waiting to run
Some checks are pending
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Waiting to run
This commit is contained in:
parent
fb4eec93b2
commit
52759cd028
8
clay.h
8
clay.h
@ -3248,9 +3248,11 @@ void Clay__RenderDebugLayoutSizing(Clay_SizingAxis sizing, Clay_TextElementConfi
|
||||
sizingLabel = CLAY_STRING("FIT");
|
||||
} else if (sizing.type == CLAY__SIZING_TYPE_PERCENT) {
|
||||
sizingLabel = CLAY_STRING("PERCENT");
|
||||
} else if (sizing.type == CLAY__SIZING_TYPE_FIXED) {
|
||||
sizingLabel = CLAY_STRING("FIXED");
|
||||
}
|
||||
CLAY_TEXT(sizingLabel, infoTextConfig);
|
||||
if (sizing.type == CLAY__SIZING_TYPE_GROW || sizing.type == CLAY__SIZING_TYPE_FIT) {
|
||||
if (sizing.type == CLAY__SIZING_TYPE_GROW || sizing.type == CLAY__SIZING_TYPE_FIT || sizing.type == CLAY__SIZING_TYPE_FIXED) {
|
||||
CLAY_TEXT(CLAY_STRING("("), infoTextConfig);
|
||||
if (sizing.size.minMax.min != 0) {
|
||||
CLAY_TEXT(CLAY_STRING("min: "), infoTextConfig);
|
||||
@ -3264,6 +3266,10 @@ void Clay__RenderDebugLayoutSizing(Clay_SizingAxis sizing, Clay_TextElementConfi
|
||||
CLAY_TEXT(Clay__IntToString(sizing.size.minMax.max), infoTextConfig);
|
||||
}
|
||||
CLAY_TEXT(CLAY_STRING(")"), infoTextConfig);
|
||||
} else if (sizing.type == CLAY__SIZING_TYPE_PERCENT) {
|
||||
CLAY_TEXT(CLAY_STRING("("), infoTextConfig);
|
||||
CLAY_TEXT(Clay__IntToString(sizing.size.percent * 100), infoTextConfig);
|
||||
CLAY_TEXT(CLAY_STRING("%)"), infoTextConfig);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user