Jump to content

Yue

Members
  • Posts

    2,302
  • Joined

  • Last visited

Posts posted by Yue

  1. 6 minutes ago, reepblue said:

    The GUI gets drawn ON TOP of all post rendering calls within the context layer. This was actually really convenient when I was trying to figure out what should be a HUD element and should be a UI element. You should draw all HUD icons and text to PostRender functions as it'll always get drawn below the UI.

    For your mouse issue, I guess you can try creating a panel and poll the mouse position from the event stack and apply it to the panel. 

    I appreciate the answer, unfortunately the translator does not help much, and I do not understand very well what you recommend me to do. Surely I would have to draw on top of UI, however with the DrawImage command I am doing it behind the UI and not on top of it, at that point I should draw the image with the UI, but I have no idea how.

  2. 1 hour ago, Alienhead said:

    You need to place the the Mouse Draw commands at the very end.  2D is drawn in order you send the draw commands at it. So draw the mouse image LAST and it will overwrite your panels.  As matter of fact, draw the mouse image right before you context:Sync()

    Not Working. 

    image.thumb.png.bd839a01b30a181db2d089ee7801d3f4.png

     

  3. 3 minutes ago, Alienhead said:

    ---Draw Mouse Pointer
        window:HideMouse()
        context:SetColor(1,1,1,1)
        local mousepos = window:GetMousePosition()
        context:DrawImage(img_mouse, mousepos.x, mousepos.y, 40,40 )

    Top secret code ! no sharing !  :) 

    What happens is that for some reason if I do that the image is behind the GUI buttons and panels:

×
×
  • Create New...