Results 1 to 1 of 1
  1. #1
    marcelo380
    marcelo380 is offline
    New member marcelo380's Avatar
    Join Date
    2012 Mar
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Smile [Tutorial] Simple menu d3d

    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:

    Code:
    var 
             sc: Tcanvas;
    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);

Similar Threads

  1. [Source] Evo Button Menu
    By Dwar in forum D3D Programming
    Replies: 3
    Last Post: 2012-07-19, 08:20 AM
  2. Replies: 0
    Last Post: 2010-12-15, 01:40 PM
  3. [Source] Keyboard Menu
    By Dwar in forum D3D Programming
    Replies: 0
    Last Post: 2010-12-15, 01:15 PM
  4. [C++] Simple DLL Programming Video Tutorial
    By Dwar in forum Programming Tutorials
    Replies: 0
    Last Post: 2010-11-29, 04:10 PM
  5. [C++] Simple menu class
    By Dwar in forum D3D Programming
    Replies: 0
    Last Post: 2010-11-09, 07:51 AM
Visitors found this page by searching for:

delphi d3d draw menu

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •