X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Feditor.c;h=fef23e2b5d3ba6fb172af8e1205a82aa10320606;hp=17677e8dec42d4520c39a2d481f87a50c5f0f030;hb=c4baa69cc8d5e8398425e67498b49f4b77f8e477;hpb=1256664ceac31f448a0139edd3bd0dc8fa5a8697 diff --git a/src/editor.c b/src/editor.c index 17677e8d..fef23e2b 100644 --- a/src/editor.c +++ b/src/editor.c @@ -19,6 +19,8 @@ #include "buttons.h" #include "files.h" +#define CHOICE_DELAY_VALUE 100 + static int level_xpos,level_ypos; static BOOL edit_mode; static BOOL name_typing; @@ -676,7 +678,7 @@ void LevelEd(int mx, int my, int button) if (((choice == ED_BUTTON_EUP && element_shift>0) || (choice == ED_BUTTON_EDOWN && element_shift=0) { - if (!DelayReached(&choice_delay,10)) + if (!DelayReached(&choice_delay, CHOICE_DELAY_VALUE)) break; if (lev_fieldx<2*SCR_FIELDX-2) break; @@ -763,7 +765,7 @@ void LevelEd(int mx, int my, int button) case ED_BUTTON_RIGHT: if (level_xpos<=lev_fieldx-2*SCR_FIELDX) { - if (!DelayReached(&choice_delay,10)) + if (!DelayReached(&choice_delay, CHOICE_DELAY_VALUE)) break; if (lev_fieldx<2*SCR_FIELDX-2) break; @@ -780,7 +782,7 @@ void LevelEd(int mx, int my, int button) case ED_BUTTON_UP: if (level_ypos>=0) { - if (!DelayReached(&choice_delay,10)) + if (!DelayReached(&choice_delay, CHOICE_DELAY_VALUE)) break; if (lev_fieldy<2*SCR_FIELDY-2) break; @@ -797,7 +799,7 @@ void LevelEd(int mx, int my, int button) case ED_BUTTON_DOWN: if (level_ypos<=lev_fieldy-2*SCR_FIELDY) { - if (!DelayReached(&choice_delay,10)) + if (!DelayReached(&choice_delay, CHOICE_DELAY_VALUE)) break; if (lev_fieldy<2*SCR_FIELDY-2) break; @@ -864,7 +866,8 @@ void LevelEd(int mx, int my, int button) int choice = CheckCountButtons(mx,my,button); int step = (button==1 ? 1 : button==2 ? 5 : button==3 ? 10 : 0); - if (choice>=0 && choice<36 && DelayReached(&choice_delay,10)) + if (choice >= 0 && choice < 36 && + DelayReached(&choice_delay, CHOICE_DELAY_VALUE)) { if (!(choice % 2)) step = -step;