76 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			76 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
#include "application.h"
 | 
						|
 | 
						|
#include "defs.h"
 | 
						|
#include "style.h"
 | 
						|
#include <SDL3/SDL.h>
 | 
						|
#include <clay/clay.h>
 | 
						|
 | 
						|
static inline
 | 
						|
void DiceContainer() {
 | 
						|
	CLAY(CLAY_ID("DiceContainer"), {
 | 
						|
		.layout = {
 | 
						|
			.sizing = { CLAY_SIZING_GROW(0), CLAY_SIZING_PERCENT(0.2) },
 | 
						|
			.padding = CLAY_PADDING_ALL(16),
 | 
						|
		},
 | 
						|
		.backgroundColor = containerColors[0],
 | 
						|
		.cornerRadius = defaultRadiusAll,
 | 
						|
	}) {
 | 
						|
		CLAY_TEXT(CLAY_STRING("Text data"), CLAY_TEXT_CONFIG({
 | 
						|
			TEXT_BODY,
 | 
						|
			.textColor = textColors[0]
 | 
						|
		}));
 | 
						|
	}
 | 
						|
}
 | 
						|
 | 
						|
static inline
 | 
						|
void DiceLogContainer() {
 | 
						|
	CLAY(CLAY_ID("LogContainer"), {
 | 
						|
		.layout = {
 | 
						|
			.sizing = layoutExpand,
 | 
						|
			.padding = CLAY_PADDING_ALL(16),
 | 
						|
		},
 | 
						|
		.backgroundColor = containerColors[0],
 | 
						|
		.cornerRadius = defaultRadiusAll
 | 
						|
	}) {}
 | 
						|
}
 | 
						|
 | 
						|
static inline
 | 
						|
void InitiativeListContainer() {
 | 
						|
	CLAY(CLAY_ID("InitiativeListContainer"), {
 | 
						|
		.layout = {
 | 
						|
			.sizing = layoutExpand,
 | 
						|
			.padding = CLAY_PADDING_ALL(16),
 | 
						|
		},
 | 
						|
		.backgroundColor = containerColors[0],
 | 
						|
		.cornerRadius = defaultRadiusAll,
 | 
						|
	}) {}
 | 
						|
}
 | 
						|
 | 
						|
Clay_RenderCommandArray RenderApplication() {
 | 
						|
	Clay_BeginLayout();
 | 
						|
	CLAY(CLAY_ID("OuterContainer"), {
 | 
						|
		.layout = {
 | 
						|
			.layoutDirection = CLAY_TOP_TO_BOTTOM,
 | 
						|
			.sizing = layoutExpand,
 | 
						|
			.padding = CLAY_PADDING_ALL(windowPadding),
 | 
						|
			.childGap = containerGap,
 | 
						|
		},
 | 
						|
		.backgroundColor = windowBackground
 | 
						|
	}) {
 | 
						|
		DiceContainer();
 | 
						|
		CLAY(CLAY_ID("LowerSplitContainer"), {
 | 
						|
			.layout = {
 | 
						|
				.sizing = layoutExpand,
 | 
						|
				.childGap = containerGap
 | 
						|
			},
 | 
						|
		}) {
 | 
						|
			DiceLogContainer();
 | 
						|
			InitiativeListContainer();
 | 
						|
		}
 | 
						|
	}
 | 
						|
	return Clay_EndLayout();
 | 
						|
}
 | 
						|
 | 
						|
void HandleEvent(SDL_Event event) {
 | 
						|
}
 |