src/industry_gui.cpp
changeset 7922 a7e266f966d9
parent 7889 e74ce8853ba7
child 7928 63e18de69e50
equal deleted inserted replaced
7921:3437fdd5c0a8 7922:a7e266f966d9
   581 	case WE_ON_EDIT_TEXT:
   581 	case WE_ON_EDIT_TEXT:
   582 		if (e->we.edittext.str[0] != '\0') {
   582 		if (e->we.edittext.str[0] != '\0') {
   583 			Industry* i = GetIndustry(w->window_number);
   583 			Industry* i = GetIndustry(w->window_number);
   584 			int line = WP(w, indview_d).editbox_line;
   584 			int line = WP(w, indview_d).editbox_line;
   585 
   585 
   586 			i->production_rate[line] = clampu(atoi(e->we.edittext.str), 0, 255);
   586 			i->production_rate[line] = ClampU(atoi(e->we.edittext.str), 0, 255);
   587 			UpdateIndustryProduction(i);
   587 			UpdateIndustryProduction(i);
   588 			SetWindowDirty(w);
   588 			SetWindowDirty(w);
   589 		}
   589 		}
   590 	}
   590 	}
   591 }
   591 }