Revision 152:2c10e1ad6647 Client/UfrmMain.pas
| b/Client/UfrmMain.pas | ||
|---|---|---|
| 1285 | 1285 |
begin |
| 1286 | 1286 |
edSearchID.Visible := False; |
| 1287 | 1287 |
edSearchID.Text := ''; |
| 1288 |
//edSearchID.Font.Color := clWindowText; |
|
| 1289 | 1288 |
end; |
| 1290 | 1289 |
|
| 1291 | 1290 |
procedure TfrmMain.edSearchIDKeyPress(Sender: TObject; var Key: char); |
| ... | ... | |
| 1316 | 1315 |
tileID := 0; |
| 1317 | 1316 |
if not TryStrToInt(enteredText, tileID) then |
| 1318 | 1317 |
begin |
| 1319 |
//edSearchID.Font.Color := clRed; |
|
| 1320 | 1318 |
MessageDlg('Error', 'The specified TileID is invalid.', mtError, [mbOK], 0);
|
| 1321 | 1319 |
vdtTiles.SetFocus; |
| 1322 | 1320 |
Exit; |
| ... | ... | |
| 1341 | 1339 |
|
| 1342 | 1340 |
if node = nil then |
| 1343 | 1341 |
begin |
| 1344 |
//edSearchID.Font.Color := clRed; |
|
| 1345 | 1342 |
MessageDlg('Error', 'The tile with the specified ID could not be found.' +
|
| 1346 | 1343 |
LineEnding + 'Check for conflicting filter settings.', mtError, [mbOK], 0); |
| 1347 | 1344 |
vdtTiles.SetFocus; |
| 1348 | 1345 |
Exit; |
| 1349 | 1346 |
end; |
| 1350 |
//edSearchID.Font.Color := clWindowText; |
|
| 1351 | 1347 |
edSearchID.Visible := False; |
| 1352 | 1348 |
end else if Key = #27 then |
| 1353 | 1349 |
begin |
| 1354 | 1350 |
edSearchID.Visible := False; |
| 1355 |
//edSearchID.Font.Color := clWindowText; |
|
| 1356 | 1351 |
Key := #0; |
| 1357 | 1352 |
end else if not (Key in ['$', '0'..'9', 'a'..'f', 'A'..'F', 's', 'S', |
| 1358 | 1353 |
't', 'T', #8]) then |
| ... | ... | |
| 1549 | 1544 |
|
| 1550 | 1545 |
procedure TfrmMain.vdtTilesClick(Sender: TObject); |
| 1551 | 1546 |
begin |
| 1552 |
{if vdtTiles.GetFirstSelected <> nil then
|
|
| 1553 |
begin |
|
| 1554 |
if not tbDrawTile.Down then |
|
| 1555 |
begin |
|
| 1556 |
frmDrawSettings.rbTileList.Checked := True; |
|
| 1557 |
tbDrawTileClick(Sender); |
|
| 1558 |
end else |
|
| 1559 |
ProcessToolState; |
|
| 1560 |
end;} |
|
| 1561 | 1547 |
if acDraw.Checked then |
| 1562 | 1548 |
ProcessToolState; |
| 1563 | 1549 |
end; |
| ... | ... | |
| 1566 | 1552 |
HintCanvas: TCanvas; Node: PVirtualNode; const R: TRect; Column: TColumnIndex |
| 1567 | 1553 |
); |
| 1568 | 1554 |
begin |
| 1555 |
HintCanvas.Font.Assign(Sender.Font); |
|
| 1569 | 1556 |
HintCanvas.Font.Style := [fsBold]; |
| 1570 | 1557 |
DrawText(HintCanvas.Handle, PChar(FTileHint.Name), Length(FTileHint.Name), |
| 1571 | 1558 |
FTileHint.NameRect, 0); |
| ... | ... | |
| 1941 | 1928 |
lblTileInfo.Caption := Format('Terrain TileID: $%x, X: %d, Y: %d, Z: %d',
|
| 1942 | 1929 |
[FCurrentTile.TileID, FCurrentTile.X, FCurrentTile.Y, FCurrentTile.Z]) |
| 1943 | 1930 |
else if FCurrentTile is TStaticItem then |
| 1944 |
lblTileInfo.Caption := Format('Static TileID: $%x, X: %d, Y: %d, Z: %d, Hue: $%x',
|
|
| 1931 |
{lblTileInfo.Caption := Format('Static TileID: $%x, X: %d, Y: %d, Z: %d, Hue: $%x',
|
|
| 1945 | 1932 |
[FCurrentTile.TileID, FCurrentTile.X, FCurrentTile.Y, FCurrentTile.Z, |
| 1946 |
TStaticItem(FCurrentTile).Hue]); |
|
| 1933 |
TStaticItem(FCurrentTile).Hue]);} |
|
| 1934 |
lblTileInfo.Caption := Format('Static TileID: $%x, X: %d, Y: %d, Z: %d, Hue: $%x, Priority: %d, Bonus: %d, Solver: %d',
|
|
| 1935 |
[FCurrentTile.TileID, FCurrentTile.X, FCurrentTile.Y, FCurrentTile.Z, |
|
| 1936 |
TStaticItem(FCurrentTile).Hue, FCurrentTile.Priority, FCurrentTile.PriorityBonus, |
|
| 1937 |
FCurrentTile.PrioritySolver]); |
|
| 1947 | 1938 |
end; |
| 1948 | 1939 |
|
| 1949 | 1940 |
UpdateSelection; |
| ... | ... | |
| 2446 | 2437 |
procedure TfrmMain.OnMapChanged(AMapCell: TMapCell); |
| 2447 | 2438 |
begin |
| 2448 | 2439 |
PrepareMapCell(AMapCell); |
| 2449 |
InvalidateFilter; |
|
| 2440 |
ForceUpdateCurrentTile; |
|
| 2441 |
InvalidateFilter |
|
| 2450 | 2442 |
end; |
| 2451 | 2443 |
|
| 2452 | 2444 |
procedure TfrmMain.OnNewBlock(ABlock: TBlock); |
| ... | ... | |
| 2457 | 2449 |
procedure TfrmMain.OnStaticDeleted(AStaticItem: TStaticItem); |
| 2458 | 2450 |
begin |
| 2459 | 2451 |
FScreenBuffer.Delete(AStaticItem); |
| 2460 |
UpdateCurrentTile; |
|
| 2461 | 2452 |
FRepaintNeeded := True; |
| 2462 | 2453 |
ForceUpdateCurrentTile; |
| 2454 |
InvalidateFilter |
|
| 2463 | 2455 |
end; |
| 2464 | 2456 |
|
| 2465 | 2457 |
procedure TfrmMain.OnStaticElevated(AStaticItem: TStaticItem); |
| ... | ... | |
| 2472 | 2464 |
begin |
| 2473 | 2465 |
PrepareScreenBlock(blockInfo); |
| 2474 | 2466 |
Exclude(FScreenBufferState, sbsIndexed); |
| 2475 |
InvalidateFilter; |
|
| 2467 |
ForceUpdateCurrentTile; |
|
| 2468 |
InvalidateFilter |
|
| 2476 | 2469 |
end; |
| 2477 | 2470 |
end; |
| 2478 | 2471 |
|
| ... | ... | |
| 2487 | 2480 |
begin |
| 2488 | 2481 |
PrepareScreenBlock(blockInfo); |
| 2489 | 2482 |
FRepaintNeeded := True; |
| 2490 |
InvalidateFilter;
|
|
| 2483 |
ForceUpdateCurrentTile;
|
|
| 2491 | 2484 |
Break; |
| 2492 | 2485 |
end; |
| 2493 | 2486 |
end; |
| ... | ... | |
| 2503 | 2496 |
AStaticItem.PrioritySolver := FScreenBuffer.GetSerial; |
| 2504 | 2497 |
PrepareScreenBlock(FScreenBuffer.Insert(AStaticItem)); |
| 2505 | 2498 |
FRepaintNeeded := True; |
| 2506 |
InvalidateFilter; |
|
| 2499 |
ForceUpdateCurrentTile; |
|
| 2500 |
InvalidateFilter |
|
| 2507 | 2501 |
end; |
| 2508 | 2502 |
end; |
| 2509 | 2503 |
|
| ... | ... | |
| 2743 | 2737 |
end; |
| 2744 | 2738 |
Include(FScreenBufferState, sbsFiltered); |
| 2745 | 2739 |
|
| 2746 |
ForceUpdateCurrentTile; |
|
| 2747 |
|
|
| 2748 | 2740 |
if (FLightManager.LightLevel > 0) and not acFlat.Checked then |
| 2749 | 2741 |
FLightManager.UpdateLightMap(FX + FLowOffsetX, FRangeX + 1, FY + FLowOffsetY, |
| 2750 | 2742 |
FRangeY + 1, FScreenBuffer); |
Also available in: Unified diff