Skip to content

Commit 3f9bd20

Browse files
[wip] box style setters from typed value
1 parent 868e371 commit 3f9bd20

File tree

5 files changed

+276
-79
lines changed

5 files changed

+276
-79
lines changed

samples/ui/src/main.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void column_begin(const char* header, f32 widthFraction)
116116
| OC_UI_STYLE_BORDER_COLOR
117117
| OC_UI_STYLE_BORDER_SIZE
118118
| OC_UI_STYLE_ROUNDNESS);
119-
oc_ui_box_begin(header, OC_UI_FLAG_DRAW_BACKGROUND | OC_UI_FLAG_DRAW_BORDER);
119+
oc_ui_box_begin(header, OC_UI_FLAG_NONE);
120120

121121
oc_ui_style_next(&(oc_ui_style){ .size.width = { OC_UI_SIZE_PARENT, 1 },
122122
.layout.align.x = OC_UI_ALIGN_CENTER },
@@ -230,7 +230,7 @@ ORCA_EXPORT void oc_on_frame_refresh(void)
230230
| OC_UI_STYLE_LAYOUT_MARGINS
231231
| OC_UI_STYLE_LAYOUT_SPACING);
232232

233-
oc_ui_container("background", OC_UI_FLAG_DRAW_BACKGROUND)
233+
oc_ui_container("background", OC_UI_FLAG_NONE)
234234
{
235235
column("Widgets", 1.0 / 3)
236236
{
@@ -410,7 +410,7 @@ ORCA_EXPORT void oc_on_frame_refresh(void)
410410
| OC_UI_STYLE_BORDER_SIZE
411411
| OC_UI_STYLE_ROUNDNESS);
412412

413-
oc_ui_panel("log", OC_UI_FLAG_DRAW_BACKGROUND | OC_UI_FLAG_DRAW_BORDER)
413+
oc_ui_panel("log", OC_UI_FLAG_NONE)
414414
{
415415
oc_ui_style_next(&(oc_ui_style){ .layout.margin.x = 16,
416416
.layout.margin.y = 16 },
@@ -481,7 +481,7 @@ ORCA_EXPORT void oc_on_frame_refresh(void)
481481
| OC_UI_STYLE_LAYOUT_MARGINS
482482
| OC_UI_STYLE_BG_COLOR
483483
| OC_UI_STYLE_ROUNDNESS);
484-
oc_ui_container("styled_radios", OC_UI_FLAG_DRAW_BACKGROUND | OC_UI_FLAG_DRAW_BORDER)
484+
oc_ui_container("styled_radios", OC_UI_FLAG_NONE)
485485
{
486486
reset_next_radio_group_to_dark_theme(scratch.arena);
487487

scripts/dev.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def build_all(args):
8787
ensure_programs()
8888

8989
build_runtime_internal(args.release, args.wasm_backend) # this also builds the platform layer
90-
build_libc_internal(args.release)
90+
# build_libc_internal(args.release)
9191
build_sdk_internal(args.release)
9292
build_tool(args)
9393

src/runtime.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ void log_entry_ui(oc_debug_overlay* overlay, log_entry* entry)
429429

430430
oc_str8 key = oc_str8_pushf(scratch.arena, "%ull", entry->recordIndex);
431431

432-
oc_ui_container_str8(key, OC_UI_FLAG_DRAW_BACKGROUND)
432+
oc_ui_container_str8(key, OC_UI_FLAG_NONE)
433433
{
434434
oc_ui_style_next(&(oc_ui_style){ .size.width = { OC_UI_SIZE_PARENT, 1 },
435435
.size.height = { OC_UI_SIZE_CHILDREN },
@@ -898,7 +898,7 @@ i32 orca_runloop(void* user)
898898
| OC_UI_STYLE_LAYOUT_AXIS
899899
| OC_UI_STYLE_BG_COLOR);
900900

901-
oc_ui_container("log console", OC_UI_FLAG_DRAW_BACKGROUND)
901+
oc_ui_container("log console", OC_UI_FLAG_NONE)
902902
{
903903
oc_ui_style_next(&(oc_ui_style){ .size.width = { OC_UI_SIZE_PARENT, 1 },
904904
.size.height = { OC_UI_SIZE_CHILDREN },

0 commit comments

Comments
 (0)