Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_splash_screen.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| UI_LAYOUT_PANEL, | UI_LAYOUT_PANEL, | ||||
| layout_margin_x, | layout_margin_x, | ||||
| 0, | 0, | ||||
| splash_width - (layout_margin_x * 2), | splash_width - (layout_margin_x * 2), | ||||
| U.dpi_fac * 110, | U.dpi_fac * 110, | ||||
| 0, | 0, | ||||
| style); | style); | ||||
| MenuType *mt = WM_menutype_find("WM_MT_splash", true); | MenuType *mt; | ||||
| bool setup = true; | |||||
| char userpref[FILE_MAX]; | |||||
| const char *const cfgdir = BKE_appdir_folder_id(BLENDER_USER_CONFIG, NULL); | |||||
| if (cfgdir) { | |||||
| BLI_path_join(userpref, sizeof(userpref), cfgdir, BLENDER_USERPREF_FILE, NULL); | |||||
| setup = !BLI_exists(userpref); | |||||
| } | |||||
| /* Draw setup screen if no preferences have been saved yet. */ | |||||
| if (setup) { | |||||
| mt = WM_menutype_find("WM_MT_splash_quick_setup", true); | |||||
| /* For centered text inside buttons; quick setup is not drawn in the menu style. */ | |||||
| UI_block_flag_disable(block, UI_BLOCK_LOOP); | |||||
| } | |||||
| else { | |||||
| mt = WM_menutype_find("WM_MT_splash", true); | |||||
| } | |||||
| if (mt) { | if (mt) { | ||||
| UI_menutype_draw(C, mt, layout); | UI_menutype_draw(C, mt, layout); | ||||
| } | } | ||||
| UI_block_bounds_set_centered(block, 0); | UI_block_bounds_set_centered(block, 0); | ||||
| return block; | return block; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||