1306 i++; |
1306 i++; |
1307 |
1307 |
1308 // prefix |
1308 // prefix |
1309 DrawFrameRect(10, y+1, 29, y+9, 0, ((clk >> (i*2)) & 0x03)?0x20:0x00); |
1309 DrawFrameRect(10, y+1, 29, y+9, 0, ((clk >> (i*2)) & 0x03)?0x20:0x00); |
1310 x = DrawString(x, y + 1, STR_CURRENCY_PREFIX, 0); |
1310 x = DrawString(x, y + 1, STR_CURRENCY_PREFIX, 0); |
1311 DoDrawString(_currency_specs[23].pre, x + 4, y + 1, 6); |
1311 DoDrawString(_currency_specs[23].prefix, x + 4, y + 1, 6); |
1312 x = 35; |
1312 x = 35; |
1313 y+=12; |
1313 y+=12; |
1314 i++; |
1314 i++; |
1315 |
1315 |
1316 // postfix |
1316 // suffix |
1317 DrawFrameRect(10, y+1, 29, y+9, 0, ((clk >> (i*2)) & 0x03)?0x20:0x00); |
1317 DrawFrameRect(10, y+1, 29, y+9, 0, ((clk >> (i*2)) & 0x03)?0x20:0x00); |
1318 x = DrawString(x, y + 1, STR_CURRENCY_POSTFIX, 0); |
1318 x = DrawString(x, y + 1, STR_CURRENCY_SUFFIX, 0); |
1319 DoDrawString(_currency_specs[23].post, x + 4, y + 1, 6); |
1319 DoDrawString(_currency_specs[23].suffix, x + 4, y + 1, 6); |
1320 x = 35; |
1320 x = 35; |
1321 y+=12; |
1321 y+=12; |
1322 i++; |
1322 i++; |
1323 |
1323 |
1324 // switch to euro |
1324 // switch to euro |
1367 edittext = true; |
1367 edittext = true; |
1368 break; |
1368 break; |
1369 case 2: // prefix |
1369 case 2: // prefix |
1370 if ( IS_INT_INSIDE(x, 10, 30) ) // clicked button |
1370 if ( IS_INT_INSIDE(x, 10, 30) ) // clicked button |
1371 WP(w,def_d).data_1 = (1 << (line * 2 + 1)); |
1371 WP(w,def_d).data_1 = (1 << (line * 2 + 1)); |
1372 str = AllocateName(_currency_specs[23].pre, 0); |
1372 str = AllocateName(_currency_specs[23].prefix, 0); |
1373 len = 12; |
1373 len = 12; |
1374 edittext = true; |
1374 edittext = true; |
1375 break; |
1375 break; |
1376 case 3: // postfix |
1376 case 3: // suffix |
1377 if ( IS_INT_INSIDE(x, 10, 30) ) // clicked button |
1377 if ( IS_INT_INSIDE(x, 10, 30) ) // clicked button |
1378 WP(w,def_d).data_1 = (1 << (line * 2 + 1)); |
1378 WP(w,def_d).data_1 = (1 << (line * 2 + 1)); |
1379 str = AllocateName(_currency_specs[23].post, 0); |
1379 str = AllocateName(_currency_specs[23].suffix, 0); |
1380 len = 12; |
1380 len = 12; |
1381 edittext = true; |
1381 edittext = true; |
1382 break; |
1382 break; |
1383 case 4: // to euro |
1383 case 4: // to euro |
1384 if ( IS_INT_INSIDE(x, 10, 30) ) { // clicked buttons |
1384 if ( IS_INT_INSIDE(x, 10, 30) ) { // clicked buttons |
1429 case 1: |
1429 case 1: |
1430 _currency_specs[23].separator = b[0]; |
1430 _currency_specs[23].separator = b[0]; |
1431 ttd_strlcpy(str_separator, b, 16); |
1431 ttd_strlcpy(str_separator, b, 16); |
1432 break; |
1432 break; |
1433 case 2: |
1433 case 2: |
1434 ttd_strlcpy(_currency_specs[23].pre, b, 16); |
1434 ttd_strlcpy(_currency_specs[23].prefix, b, 16); |
1435 break; |
1435 break; |
1436 case 3: |
1436 case 3: |
1437 ttd_strlcpy(_currency_specs[23].post, b, 16); |
1437 ttd_strlcpy(_currency_specs[23].suffix, b, 16); |
1438 break; |
1438 break; |
1439 case 4: |
1439 case 4: |
1440 val = atoi(b); |
1440 val = atoi(b); |
1441 val = clamp(val, 1999, 2090); |
1441 val = clamp(val, 1999, 2090); |
1442 if (val == 1999) val = 0; |
1442 if (val == 1999) val = 0; |