Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface.c
| Show First 20 Lines • Show All 4,450 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| but->tip_func = func; | but->tip_func = func; | ||||
| if (but->tip_argN) { | if (but->tip_argN) { | ||||
| MEM_freeN(but->tip_argN); | MEM_freeN(but->tip_argN); | ||||
| } | } | ||||
| but->tip_argN = argN; | but->tip_argN = argN; | ||||
| } | } | ||||
| void UI_but_func_pushed_state_set(uiBut *but, uiButPushedStateFunc func, void *arg) | |||||
| { | |||||
| but->pushed_state_func = func; | |||||
| but->pushed_state_arg = arg; | |||||
| } | |||||
| uiBut *uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, int x, int y, short width, short height, const char *tip) | uiBut *uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, int x, int y, short width, short height, const char *tip) | ||||
| { | { | ||||
| uiBut *but = ui_def_but(block, UI_BTYPE_BLOCK, 0, str, x, y, width, height, arg, 0.0, 0.0, 0.0, 0.0, tip); | uiBut *but = ui_def_but(block, UI_BTYPE_BLOCK, 0, str, x, y, width, height, arg, 0.0, 0.0, 0.0, 0.0, tip); | ||||
| but->block_create_func = func; | but->block_create_func = func; | ||||
| ui_but_update(but); | ui_but_update(but); | ||||
| return but; | return but; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 492 Lines • Show Last 20 Lines | |||||