Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_splash_screen.c
| Context not available. | |||||
| return; | return; | ||||
| } | } | ||||
| uiStyle *style = UI_style_get(); | |||||
| BLF_size(style->widgetlabel.uifont_id, style->widgetlabel.points, U.pixelsize * U.dpi); | |||||
| int label_width = BLF_width(style->widgetlabel.uifont_id, label, strlen(label)); | |||||
| label_width = label_width + U.widget_unit; | |||||
| UI_block_emboss_set(block, UI_EMBOSS_NONE); | UI_block_emboss_set(block, UI_EMBOSS_NONE); | ||||
| uiBut *but = uiDefBut(block, | uiBut *but = uiDefBut(block, | ||||
| UI_BTYPE_LABEL, | UI_BTYPE_LABEL, | ||||
| 0, | 0, | ||||
| label, | label, | ||||
| x - label_width, | 0, | ||||
| *y, | *y, | ||||
| label_width, | x, | ||||
| UI_UNIT_Y, | UI_UNIT_Y, | ||||
| NULL, | NULL, | ||||
| 0, | 0, | ||||
| Context not available. | |||||
| 0, | 0, | ||||
| 0, | 0, | ||||
| NULL); | NULL); | ||||
| UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); | |||||
| UI_but_drawflag_enable(but, UI_BUT_TEXT_RIGHT); | |||||
| /* 1 = UI_SELECT, internal flag to draw in white. */ | /* 1 = UI_SELECT, internal flag to draw in white. */ | ||||
| UI_but_flag_enable(but, 1); | UI_but_flag_enable(but, 1); | ||||
| UI_block_emboss_set(block, UI_EMBOSS); | UI_block_emboss_set(block, UI_EMBOSS); | ||||
| Context not available. | |||||
| UI_but_func_set(but, wm_block_splash_close, block, NULL); | UI_but_func_set(but, wm_block_splash_close, block, NULL); | ||||
| UI_block_func_set(block, wm_block_splash_refreshmenu, block, NULL); | UI_block_func_set(block, wm_block_splash_refreshmenu, block, NULL); | ||||
| int x = U.dpi_fac * (ibuf_unit_size[0] + 1); | int x = U.dpi_fac * (ibuf_unit_size[0]); | ||||
| int y = U.dpi_fac * (ibuf_unit_size[1] - 13); | int y = U.dpi_fac * (ibuf_unit_size[1] - 13); | ||||
| wm_block_splash_add_labels(block, x, y); | wm_block_splash_add_labels(block, x, y); | ||||
| Context not available. | |||||