Rev 1157 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1157 | Rev 1163 | ||
---|---|---|---|
Line 274... | Line 274... | ||
274 | { |
274 | { |
275 | if (CheckCrossBox((struct HEADER*)button,x,y)==TRUE) |
275 | if (CheckCrossBox((struct HEADER*)button,x,y)==TRUE) |
276 | { |
276 | { |
277 | if (message->arg3==MOUSE_LEFT_BUTTON_DOWN) |
277 | if (message->arg3==MOUSE_LEFT_BUTTON_DOWN) |
278 | { |
278 | { |
- | 279 | if ((button->btn_flags & FLAG_PRESSED_BUTTON_ON)==FALSE) |
|
- | 280 | {if (button->flags & FLAG_SHOW_CONTROL) |
|
- | 281 | DrawPressedButton(button);} |
|
279 | button->btn_flags=button->btn_flags | FLAG_PRESSED_BUTTON_ON; |
282 | button->btn_flags=button->btn_flags | FLAG_PRESSED_BUTTON_ON; |
280 | } |
283 | } |
281 | } |
284 | } |
Line 282... | Line 285... | ||
282 | 285 | ||
Line 289... | Line 292... | ||
289 | (DWORD*)button; |
292 | (DWORD*)button; |
290 | main_parent->callback_for_control_callback[main_parent->number_callbacks]= |
293 | main_parent->callback_for_control_callback[main_parent->number_callbacks]= |
291 | (DWORD*)ControlCheckCallbackEvent(button,(DWORD)BUTTON_PRESSED_EVENT); |
294 | (DWORD*)ControlCheckCallbackEvent(button,(DWORD)BUTTON_PRESSED_EVENT); |
292 | main_parent->number_callbacks++; |
295 | main_parent->number_callbacks++; |
293 | } |
296 | } |
294 | if (button->flags & FLAG_SHOW_CONTROL) DrawPressedButton(button); |
- | |
295 | } |
297 | } |
296 | } |
298 | } |
297 | break; |
299 | break; |
298 | } |
300 | } |
299 | case MESSAGE_CHANGE_POSITION_EVENT: |
301 | case MESSAGE_CHANGE_POSITION_EVENT: |
Line 397... | Line 399... | ||
397 | txtdata.color=0; |
399 | txtdata.color=0; |
398 | txtdata.text=malloc(len); |
400 | txtdata.text=malloc(len); |
399 | memmove(txtdata.text,txt,len); |
401 | memmove(txtdata.text,txt,len); |
400 | text=CreateText(&txtdata); |
402 | text=CreateText(&txtdata); |
Line 401... | Line 403... | ||
401 | 403 | ||
402 | if (text->ctrl_sizex>Button->ctrl_sizex) Button->ctrl_sizex=text->ctrl_sizex+6; |
404 | if (text->ctrl_sizex>Button->ctrl_sizex) Button->ctrl_sizex=text->ctrl_sizex+10; |
Line 403... | Line 405... | ||
403 | if (text->ctrl_sizey>Button->ctrl_sizey) Button->ctrl_sizey=text->ctrl_sizey+6; |
405 | if (text->ctrl_sizey>Button->ctrl_sizey) Button->ctrl_sizey=text->ctrl_sizey+6; |
404 | 406 | ||
405 | text->ctrl_x=(Button->ctrl_sizex/2)-(text->ctrl_sizex/2); |
407 | text->ctrl_x=(Button->ctrl_sizex/2)-(text->ctrl_sizex/2); |