Lua Fix radio buttons that can't be re-checked if they are at top of inputbox
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1421 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
							parent
							
								
									a31a6bebd1
								
							
						
					
					
						commit
						bf53a167ec
					
				@ -13,13 +13,13 @@ messagebox(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ok, w, h = inputbox("Modify brush",
 | 
			
		||||
  "RGB",    1, 0, 1,  -1,
 | 
			
		||||
  "HSV",    0, 0, 1,  -1,
 | 
			
		||||
  "HSL",    0, 0, 1,  -1,
 | 
			
		||||
  "Width",  w, -900.0,900.0, 3,
 | 
			
		||||
  "Height", h, -900.0,900.0, 4,
 | 
			
		||||
  "X Flip", 0, 0, 1,  0,
 | 
			
		||||
  "Y Flip", 0, 0, 1,  0,
 | 
			
		||||
  "RGB",    1, 0, 1,  -1,
 | 
			
		||||
  "HSV",    0, 0, 1,  -1,
 | 
			
		||||
  "HSL",    0, 0, 1,  -1,
 | 
			
		||||
  "Degrees",1, 0, 1,  -2,
 | 
			
		||||
  "Radians",0, 0, 1,  -2  
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
@ -592,6 +592,10 @@ int L_InputBox(lua_State* L)
 | 
			
		||||
 | 
			
		||||
  Open_window(115+max_label_length*8,44+nb_settings*17,window_caption);
 | 
			
		||||
 | 
			
		||||
  // Normally this index is unused, but this initialization avoids
 | 
			
		||||
  // any weird behavior if it was used by mistake.
 | 
			
		||||
  control[0]=0;
 | 
			
		||||
  
 | 
			
		||||
  // OK
 | 
			
		||||
  Window_set_normal_button( 7, 25 + 17 * nb_settings, 51,14,"OK" , 0,1,SDLK_RETURN);
 | 
			
		||||
  control[Window_nb_buttons] = CONTROL_OK;
 | 
			
		||||
@ -725,7 +729,7 @@ int L_InputBox(lua_State* L)
 | 
			
		||||
            if (decimal_places[setting]<0)
 | 
			
		||||
            {
 | 
			
		||||
              byte button;
 | 
			
		||||
              for (button=0; button<=Window_nb_buttons; button++)
 | 
			
		||||
              for (button=3; button<=Window_nb_buttons; button++)
 | 
			
		||||
              {
 | 
			
		||||
                if (button != clicked_button && control[button] & CONTROL_CHECKBOX)
 | 
			
		||||
                {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user