mirror of
https://github.com/nicbarker/clay.git
synced 2025-04-20 13:18:03 +00:00
Add border color to debug view
This commit is contained in:
parent
7cfc00a0af
commit
9dfe0732c4
7
clay.h
7
clay.h
@ -2371,9 +2371,9 @@ void Clay__CalculateFinalLayout(void) {
|
|||||||
else {
|
else {
|
||||||
// DFS is returning upwards backwards
|
// DFS is returning upwards backwards
|
||||||
bool closeScrollElement = false;
|
bool closeScrollElement = false;
|
||||||
if (Clay__ElementHasConfig(currentElement, CLAY__ELEMENT_CONFIG_TYPE_SCROLL)) {
|
|
||||||
closeScrollElement = true;
|
|
||||||
Clay_ScrollElementConfig *scrollConfig = Clay__FindElementConfigWithType(currentElement, CLAY__ELEMENT_CONFIG_TYPE_SCROLL).scrollElementConfig;
|
Clay_ScrollElementConfig *scrollConfig = Clay__FindElementConfigWithType(currentElement, CLAY__ELEMENT_CONFIG_TYPE_SCROLL).scrollElementConfig;
|
||||||
|
if (scrollConfig) {
|
||||||
|
closeScrollElement = true;
|
||||||
for (int32_t i = 0; i < context->scrollContainerDatas.length; i++) {
|
for (int32_t i = 0; i < context->scrollContainerDatas.length; i++) {
|
||||||
Clay__ScrollContainerDataInternal *mapping = Clay__ScrollContainerDataInternalArray_Get(&context->scrollContainerDatas, i);
|
Clay__ScrollContainerDataInternal *mapping = Clay__ScrollContainerDataInternalArray_Get(&context->scrollContainerDatas, i);
|
||||||
if (mapping->layoutElement == currentElement) {
|
if (mapping->layoutElement == currentElement) {
|
||||||
@ -3067,6 +3067,9 @@ void Clay__RenderDebugView(void) {
|
|||||||
CLAY_TEXT(Clay__IntToString(borderConfig->width.bottom), infoTextConfig);
|
CLAY_TEXT(Clay__IntToString(borderConfig->width.bottom), infoTextConfig);
|
||||||
CLAY_TEXT(CLAY_STRING(" }"), infoTextConfig);
|
CLAY_TEXT(CLAY_STRING(" }"), infoTextConfig);
|
||||||
}
|
}
|
||||||
|
// .textColor
|
||||||
|
CLAY_TEXT(CLAY_STRING("Border Color"), infoTitleConfig);
|
||||||
|
Clay__RenderDebugViewColor(borderConfig->color, infoTextConfig);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user