pour afficher (un compteur par exemple) quelque chose au dessus du labyrinthe afin que lorsque le joueur se déplace , elle reste affichée à son emplacement

 
Merci

 
			
 

 
			unit CounterOnView;
components
  CounterOnViewPlugin: TCounterOnViewPlugin;
plugin TCounterOnViewPlugin
  hint 'Plugin qui affiche un compteur en haut à gauche de l''écran';
  property MsgFormat: string;
  property Counter: Integer;
  property BackColor: TColor32;
  property FontColor: TColor32;
  on AfterConstruction do
  begin
    inherited;
    MsgFormat := '%d';
    BackColor := clWhite32;
    FontColor := clBlack32;
  end;
  on DrawView do
  var
    Text: string;
    Extent: TSize;
    TextX, TextY: Integer;
  begin
    Bitmap.Font.Name := 'Arial'; {don't localize}
    Text := Format(MsgFormat, [Counter]);
    Extent := Bitmap.TextExtent(Text);
    TextX := 8;
    TextY := 8;
    Bitmap.FillRectTS(TextX-2, TextY, TextX+Extent.cx+2, TextY+Extent.cy,
      BackColor);
    Bitmap.RenderText(TextX, TextY, Text, 0, FontColor);
  end;
end;
end.Text := Format(MsgFormat, [Counter]);Text := Format(MsgFormat, [Player.Tag]);Player receives 1 Tag;Player.Tag := Player.Tag + 1;CounterOnViewPlugin.Counter := CounterOnViewPlugin.Counter + 1;