MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / ui_theme_visuals_update

Function ui_theme_visuals_update

StereoKitC/ui/ui_theming.cpp:965–1070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

963material_t theme_mat_carat = nullptr;
964
965void ui_theme_visuals_update() {
966 color32 white = {255,255,255,255};
967 color32 black = {0,0,0,0};
968 color32 gray = {200, 200, 200, 255};
969 color32 shadow_center = {0, 0, 0, 200};
970 color32 shadow_edge = {0, 0, 0, 50 };
971 const ui_lathe_pt_t lathe_button[] = {
972 { {0, -0.5f}, {0, 1}, white, true },
973 { {0.95f,-0.5f}, {0, 1}, white, true },
974 { {1, -0.45f}, {1, 0}, white, true },
975 { {1, -0.1f}, {1, 0}, white, false },
976 { {1.2f, 0.49f}, {0, 1}, black, true, true },
977 { {0.0f, 0.49f}, {0, 1}, shadow_center, true, true } };
978 const ui_lathe_pt_t lathe_input[] = {
979 { {0, -0.1f }, { 0, 1}, gray, true },
980 { {0.8f, -0.1f }, { 0, 1}, gray, false },
981 { {0.8f, -0.1f }, {-1, 0}, gray, true },
982 { {0.8f, -0.5f }, {-1, 0}, white, false },
983 { {0.8f, -0.5f }, { 0, 1}, white, true },
984 { {0.95f,-0.5f }, { 0, 1}, white, true },
985 { {1, -0.45f}, { 1, 0}, white, true },
986 { {1, -0.1f }, { 1, 0}, white, false },
987 { {1.2f, 0.49f}, { 0, 1}, black, true, true },
988 { {0, 0.49f}, { 0, 1}, shadow_center, true, true }, };
989 const ui_lathe_pt_t lathe_plane[] = {
990 { {0, 0}, {0, 1}, white, true },
991 { {1, 0}, {0, 1}, white, false } };
992 const ui_lathe_pt_t lathe_panel[] = {
993 { {0, -0.5f}, {0, 1}, white, true },
994 { {1, -0.5f}, {0, 1}, white, false },
995 { {1, -0.5f}, {1, 0}, white, true },
996 { {1, 0.5f}, {1, 0}, white, false },
997 { {1, 0.5f}, {0,-1}, white, true },
998 { {0, 0.5f}, {0,-1}, white, true } };
999 const ui_lathe_pt_t lathe_slider[] = {
1000 { {0, -0.5f}, {0, 1}, white, true },
1001 { {1, -0.5f}, {0, 1}, white, false },
1002 { {1, -0.5f}, {1, 0}, white, true },
1003 { {1, 0.5f}, {1, 0}, white, false },
1004 { {1, 0.49f}, {0, 1}, shadow_edge, true },
1005 { {2.0f, 0.49f}, {0, 1}, black, false } };
1006 const ui_lathe_pt_t lathe_slider_btn[] = {
1007 { {0, -0.5f}, {0, 1}, white, true },
1008 { {0.8f, -0.5f}, {0, 1}, white, true },
1009 { {1, -0.4f}, {1, 0}, white, true },
1010 { {1, 0.5f}, {1, 0}, white, false },
1011 { {1, 0.49f}, {0, 1}, shadow_edge, true },
1012 { {2.0f, 0.49f}, {0, 1}, black, false } };
1013
1014 bool needs_id = theme_mesh_button == nullptr;
1015
1016 _ui_gen_quadrant_mesh(&theme_mesh_button, ui_corner_all, skui_settings.rounding, 8, false, lathe_button, _countof(lathe_button));
1017 _ui_gen_quadrant_mesh(&theme_mesh_input, ui_corner_all, skui_settings.rounding, 8, false, lathe_input, _countof(lathe_input ));
1018 _ui_gen_quadrant_mesh(&theme_mesh_plane, ui_corner_all, skui_settings.rounding - (skui_settings.margin - skui_settings.gutter), 8, false, lathe_plane, _countof(lathe_plane));
1019
1020 _ui_gen_quadrant_mesh(&theme_mesh_panel, ui_corner_all, skui_settings.rounding, 8, false, lathe_panel, _countof(lathe_panel));
1021 _ui_gen_quadrant_mesh(&theme_mesh_panel_top, ui_corner_top, skui_settings.rounding, 8, true, lathe_panel, _countof(lathe_panel));
1022 _ui_gen_quadrant_mesh(&theme_mesh_panel_bot, ui_corner_bottom, skui_settings.rounding, 8, true, lathe_panel, _countof(lathe_panel));

Callers 1

ui_settingsFunction · 0.85

Calls 10

_ui_gen_quadrant_meshFunction · 0.85
ui_default_aura_meshFunction · 0.85
mesh_findFunction · 0.85
material_copy_idFunction · 0.85
material_set_idFunction · 0.85
material_set_depth_testFunction · 0.85
material_findFunction · 0.85
mesh_set_idFunction · 0.85

Tested by

no test coverage detected