Many want to create your menu within the game screen, the most frequently used mode is Direct3D, I'll teach a simple way to draw, is using the canvas.
Well, let's begin.
In the global variables add:
Now add a timer:
Code:
var
Marcelo1 : TPoint;
begin
sc := TCanvas.Create;
try
sc.Handle:=GetDC(0);
sc.Brush.Style := bsClear;
sc.TextOut(10, 10, 'www.programercity.net');
GetCursorPos(Marcelo1);
if (Marcelo1.X = 10) and (Marcelo1.Y = 10) then begin
sc.TextOut(10, 15, 'Menu aberto');
end;
ReleaseDC(0, sc.handle);
finally
sc.free;
end;
Example use:
Code:
imgPaintCanvas(Form1.Canvas, 'Programercity', 10, 6, 4);