@@ -610,6 +610,7 @@ static void init(void *userdata)
610610
611611 Clay_Initialize (arena , (Clay_Dimensions ) { sapp_widthf (), sapp_heightf () }, (Clay_ErrorHandler ) { HandleClayErrors });
612612 Clay_SetMeasureTextFunction (measureText , NULL );
613+ // Clay__debugViewWidth *=2;
613614}
614615
615616static void threadedMode (App * app )
@@ -762,7 +763,9 @@ static void textCommand(App *app, Clay_BoundingBox b, Clay_TextRenderData data)
762763
763764static void imageCommand (App * app , Clay_BoundingBox b , Clay_ImageRenderData data )
764765{
765- Clay_Color c = data .backgroundColor ;
766+ // white color for all the images by default,
767+ // if you want to tint image use data.backgroundColor instead
768+ Clay_Color c = (Clay_Color ) {.r = 255 , .g = 255 , .b = 255 , .a = 255 };
766769 sgl_c4b (c .r , c .g , c .b , c .a );
767770
768771 // 8x8 tile index
@@ -897,14 +900,12 @@ static void renderLayout(App *app)
897900 CLAY_AUTO_ID (
898901 {
899902 // tile index of pad buttons
900- .image = (void * )8 + i ,
903+ .image = (void * )( intptr_t )( 8 + i ) ,
901904
902905 .layout =
903906 {
904907 .sizing = {CLAY_SIZING_FIXED (100 ), CLAY_SIZING_FIXED (100 )},
905908 },
906-
907- .backgroundColor = COLOR_WHITE ,
908909 }){}
909910 }
910911 }
@@ -924,14 +925,12 @@ static void renderLayout(App *app)
924925 CLAY_AUTO_ID (
925926 {
926927 // tile index of ABXY buttons
927- .image = (void * )12 + i ,
928+ .image = (void * )( intptr_t )( 12 + i ) ,
928929
929930 .layout =
930931 {
931932 .sizing = {CLAY_SIZING_FIXED (100 ), CLAY_SIZING_FIXED (100 )},
932933 },
933-
934- .backgroundColor = COLOR_WHITE ,
935934 }){}
936935 }
937936 }
0 commit comments