Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_handlers.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 4,509 Lines • ▼ Show 20 Lines | if (tempf != (float)data->value) { | ||||
| data->dragchange = true; | data->dragchange = true; | ||||
| changed = true; | changed = true; | ||||
| } | } | ||||
| } | } | ||||
| return changed; | return changed; | ||||
| } | } | ||||
| static void ui_numslider_set_active(uiBut *but) | |||||
| { | |||||
| uiHandleButtonData *data = but->active; | |||||
| if (!data) { | |||||
| return; | |||||
| } | |||||
| /* Don't change the cursor once pressed. */ | |||||
| if ((but->flag & UI_SELECT) == 0) { | |||||
| if (data->changed_cursor == false) { | |||||
| WM_cursor_modal_set(data->window, CURSOR_X_MOVE); | |||||
| data->changed_cursor = true; | |||||
| } | |||||
| } | |||||
| } | |||||
| static int ui_do_but_SLI( | static int ui_do_but_SLI( | ||||
| bContext *C, uiBlock *block, uiBut *but, | bContext *C, uiBlock *block, uiBut *but, | ||||
| uiHandleButtonData *data, const wmEvent *event) | uiHandleButtonData *data, const wmEvent *event) | ||||
| { | { | ||||
| int mx, my, click = 0; | int mx, my, click = 0; | ||||
| int retval = WM_UI_HANDLER_CONTINUE; | int retval = WM_UI_HANDLER_CONTINUE; | ||||
| mx = event->x; | mx = event->x; | ||||
| my = event->y; | my = event->y; | ||||
| ui_window_to_block(data->region, block, &mx, &my); | ui_window_to_block(data->region, block, &mx, &my); | ||||
| ui_numslider_set_active(but); | |||||
| if (data->state == BUTTON_STATE_HIGHLIGHT) { | if (data->state == BUTTON_STATE_HIGHLIGHT) { | ||||
| int type = event->type, val = event->val; | int type = event->type, val = event->val; | ||||
| if (type == MOUSEPAN) { | if (type == MOUSEPAN) { | ||||
| ui_pan_to_scroll(event, &type, &val); | ui_pan_to_scroll(event, &type, &val); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 5,730 Lines • Show Last 20 Lines | |||||