Skip to content

Commit d6f680a

Browse files
clean up UI sample
1 parent bcd7598 commit d6f680a

File tree

1 file changed

+0
-61
lines changed

1 file changed

+0
-61
lines changed

samples/ui/src/main.c

-61
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,6 @@ void labeled_slider(const char* label, f32* value)
163163
}
164164
}
165165

166-
/*
167-
void reset_next_radio_group_to_dark_theme(oc_arena* arena);
168-
169-
*/
170-
171166
ORCA_EXPORT void oc_on_frame_refresh(void)
172167
{
173168
oc_arena_scope scratch = oc_scratch_begin();
@@ -493,7 +488,6 @@ ORCA_EXPORT void oc_on_frame_refresh(void)
493488

494489
oc_ui_style_set_i32(OC_UI_ALIGN_X, OC_UI_ALIGN_CENTER);
495490
oc_ui_style_set_i32(OC_UI_ALIGN_Y, OC_UI_ALIGN_CENTER);
496-
// reset_next_radio_group_to_dark_theme(scratch.arena);
497491

498492
{
499493
oc_str8_list list = { 0 };
@@ -835,58 +829,3 @@ ORCA_EXPORT void oc_on_frame_refresh(void)
835829

836830
oc_scratch_end(scratch);
837831
}
838-
839-
/*
840-
// This makes sure the light theme doesn't break the styling overrides
841-
// You won't need it in a real program as long as your colors come from ui.theme or ui.theme->palette
842-
void reset_next_radio_group_to_dark_theme(oc_arena* arena)
843-
{
844-
oc_ui_tag unselectedTag = oc_ui_tag_make("radio");
845-
oc_ui_pattern unselectedPattern = { 0 };
846-
oc_ui_pattern_push(arena, &unselectedPattern, (oc_ui_selector){ .kind = OC_UI_SEL_TAG, .tag = unselectedTag });
847-
oc_ui_style unselectedStyle = { .borderColor = OC_UI_DARK_THEME.text3,
848-
.borderSize = 1 };
849-
oc_ui_style_mask unselectedMask = OC_UI_STYLE_BORDER_COLOR
850-
| OC_UI_STYLE_BORDER_SIZE;
851-
oc_ui_style_match_after(unselectedPattern, &unselectedStyle, unselectedMask);
852-
853-
oc_ui_pattern unselectedHoverPattern = { 0 };
854-
oc_ui_pattern_push(arena, &unselectedHoverPattern, (oc_ui_selector){ .kind = OC_UI_SEL_TAG, .tag = unselectedTag });
855-
oc_ui_pattern_push(arena, &unselectedHoverPattern, (oc_ui_selector){ .op = OC_UI_SEL_AND, .kind = OC_UI_SEL_STATUS, .status = OC_UI_HOVER });
856-
oc_ui_style hoverStyle = { .bgColor = OC_UI_DARK_THEME.fill0,
857-
.borderColor = OC_UI_DARK_THEME.primary };
858-
oc_ui_style_mask hoverMask = OC_UI_STYLE_BG_COLOR
859-
| OC_UI_STYLE_BORDER_COLOR;
860-
oc_ui_style_match_after(unselectedHoverPattern, &hoverStyle, hoverMask);
861-
862-
oc_ui_pattern unselectedActivePattern = { 0 };
863-
oc_ui_pattern_push(arena, &unselectedActivePattern, (oc_ui_selector){ .kind = OC_UI_SEL_TAG, .tag = unselectedTag });
864-
oc_ui_pattern_push(arena, &unselectedActivePattern, (oc_ui_selector){ .op = OC_UI_SEL_AND, .kind = OC_UI_SEL_STATUS, .status = OC_UI_ACTIVE });
865-
oc_ui_style activeStyle = { .bgColor = OC_UI_DARK_THEME.fill1,
866-
.borderColor = OC_UI_DARK_THEME.primary };
867-
oc_ui_style_mask activeMask = OC_UI_STYLE_BG_COLOR
868-
| OC_UI_STYLE_BORDER_COLOR;
869-
oc_ui_style_match_after(unselectedActivePattern, &activeStyle, activeMask);
870-
871-
oc_ui_tag selectedTag = oc_ui_tag_make("radio_selected");
872-
oc_ui_pattern selectedPattern = { 0 };
873-
oc_ui_pattern_push(arena, &selectedPattern, (oc_ui_selector){ .kind = OC_UI_SEL_TAG, .tag = selectedTag });
874-
oc_ui_style selectedStyle = { .color = OC_UI_DARK_THEME.palette->white,
875-
.bgColor = OC_UI_DARK_THEME.primary };
876-
oc_ui_style_mask selectedMask = OC_UI_STYLE_COLOR
877-
| OC_UI_STYLE_BG_COLOR;
878-
oc_ui_style_match_after(selectedPattern, &selectedStyle, selectedMask);
879-
880-
oc_ui_pattern selectedHoverPattern = { 0 };
881-
oc_ui_pattern_push(arena, &selectedHoverPattern, (oc_ui_selector){ .kind = OC_UI_SEL_TAG, .tag = selectedTag });
882-
oc_ui_pattern_push(arena, &selectedHoverPattern, (oc_ui_selector){ .op = OC_UI_SEL_AND, .kind = OC_UI_SEL_STATUS, .status = OC_UI_HOVER });
883-
oc_ui_style selectedHoverStyle = { .bgColor = OC_UI_DARK_THEME.primaryHover };
884-
oc_ui_style_match_after(selectedHoverPattern, &selectedHoverStyle, OC_UI_STYLE_BG_COLOR);
885-
886-
oc_ui_pattern selectedActivePattern = { 0 };
887-
oc_ui_pattern_push(arena, &selectedActivePattern, (oc_ui_selector){ .kind = OC_UI_SEL_TAG, .tag = selectedTag });
888-
oc_ui_pattern_push(arena, &selectedActivePattern, (oc_ui_selector){ .op = OC_UI_SEL_AND, .kind = OC_UI_SEL_STATUS, .status = OC_UI_ACTIVE });
889-
oc_ui_style selectedActiveStyle = { .bgColor = OC_UI_DARK_THEME.primaryActive };
890-
oc_ui_style_match_after(selectedActivePattern, &selectedActiveStyle, OC_UI_STYLE_BG_COLOR);
891-
}
892-
*/

0 commit comments

Comments
 (0)