Changeset 136


Ignore:
Timestamp:
May 3, 2018, 11:18:29 PM (6 years ago)
Author:
chronos
Message:
  • Fixed: Update background texture in city dialog after age change.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/CityScreen.pas

    r103 r136  
    9090
    9191uses
    92   Select, Messg, MessgEx, Help, Tribes, Directories,
    93 
    94   Math;
     92  Select, Messg, MessgEx, Help, Tribes, Directories, Math;
    9593
    9694{$R *.lfm}
     
    258256  begin
    259257    AgePrepared := MainTextureAge;
     258
     259    // TODO: FillRect should not be needed as BitBlt is with SRCCOPY
     260    Back.Canvas.FillRect(0, 0, ClientWidth, ClientHeight);
     261
    260262    bitblt(Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    261263      MainTexture.Image.Canvas.Handle, 0, 0, SRCCOPY);
    262264    ImageOp_B(Back, Template, 0, 0, 0, 0, ClientWidth, ClientHeight);
    263   end
     265  end;
    264266end;
    265267
    266268procedure TCityDlg.CloseBtnClick(Sender: TObject);
    267269begin
    268   Close
     270  Close;
    269271end;
    270272
     
    319321            11 + 12 * (i mod 18 div 3)));
    320322          break;
    321         end
     323        end;
    322324    end;
    323325    i := 30;
     
    345347            3 + 12 * (i mod 18 div 3), 13 + 16 * (i mod 3) + 48 * (i div 18),
    346348            11 + 12 * (i mod 18 div 3)));
    347         end
    348       end
     349        end;
     350      end;
    349351    end;
    350352    brush.style := bsClear;
    351   end
     353  end;
    352354end;
    353355
     
    370372        wZoomEnvironment, hZoomMap);
    371373    end;
    372   end
     374  end;
    373375end;
    374376
     
    431433      Sprite(offscreen, HGrSystem, x + xxt - 5 + d * (2 * i + 1 - Total),
    432434        y + yyt - 5, 10, 10, xGr, yGr);
    433     end
     435    end;
    434436  end;
    435437
     
    492494        16 * line, s);
    493495      inc(line)
    494     end
     496    end;
    495497  end;
    496498
     
    602604        LoweredTextout(offscreen.Canvas, -1, MainTexture, xmOpt + 40, ymOpt - 1,
    603605          copy(s, j + 1, 255));
    604       end
    605     end
     606      end;
     607    end;
    606608  end;
    607609
     
    9991001          yView + 5 + 40));
    10001002        brush.style := bsClear;
    1001       end
     1003      end;
    10021004    end
    10031005    else if AllowChange and (c.Status and 7 <> 0) then
     
    13031305                    if WindowMode <> wmModal then
    13041306                      MainScreen.UpdateViews;
    1305                   end
    1306                 end
    1307               end
    1308             end
    1309       end
     1307                  end;
     1308                end;
     1309              end;
     1310            end;
     1311      end;
    13101312    end
    13111313    else if (Mode = mSupp) and (x >= xZoomMap) and (x < xZoomMap + wZoomMap) and
     
    13261328          Close;
    13271329          MainScreen.CityClosed(imix[i], false, true);
    1328         end
     1330        end;
    13291331    end
    13301332    else if (x >= xmArea - 192) and (x < xmArea + 192) and (y >= ymArea - 96)
     
    13751377            if WindowMode <> wmModal then
    13761378              MainScreen.UpdateViews;
    1377           end
    1378         end
     1379          end;
     1380        end;
    13791381    end
    13801382    else if (ClientMode < scContact) and (cGov <> gAnarchy) and
     
    14131415          if WindowMode <> wmModal then
    14141416            MainScreen.UpdateViews;
    1415         end
    1416       end
     1417        end;
     1418      end;
    14171419    end;
    14181420end; { FormMouseDown }
     
    15081510                'MSG_DEFAULT') = mrOK
    15091511          end;
    1510         end
     1512        end;
    15111513      end;
    15121514      if not QueryOk then
     
    15811583        if WindowMode <> wmModal then
    15821584          MainScreen.UpdateViews;
    1583       end
    1584     end
    1585   end
     1585      end;
     1586    end;
     1587  end;
    15861588end;
    15871589
     
    16511653        ImpImage(Canvas, xView + 9, yView + 5, c.Project0 and cpIndex,
    16521654          cGov, true);
    1653     end
    1654   end
     1655    end;
     1656  end;
    16551657end;
    16561658
     
    17411743    ChangeCity(+1)
    17421744  else
    1743     inherited
     1745    inherited;
    17441746end;
    17451747
     
    17581760    dec(Page);
    17591761    SmartUpdateContent
    1760   end
     1762  end;
    17611763end;
    17621764
     
    17671769    inc(Page);
    17681770    SmartUpdateContent
    1769   end
     1771  end;
    17701772end;
    17711773
     
    17851787    if Advice.Tiles <> MyCity[cix].Tiles then
    17861788      Server(sSetCityTiles, me, cix, Advice.Tiles);
    1787   end
     1789  end;
    17881790end;
    17891791
     
    17981800      k := ImpSorted[i];
    17991801      ImpSorted[i] := ImpSorted[j];
    1800       ImpSorted[j] := k
     1802      ImpSorted[j] := k;
    18011803    end;
    18021804
Note: See TracChangeset for help on using the changeset viewer.