Jump to content

Draw image?


Hugos

Recommended Posts

Just now, WorthlessCynomys said:

guiCreateStaticImage makes a CEGUI element.

dxDrawImage draws an image with the lifetime of a frame. You have to call dx functions on every frame.

Well. Can you tell me more about how to make the dimensions of the picture "guiCreateStaticImage" relative?

I have an image with dimensions 400x530, I set "width" - y/2.7, how do I do to have "height" exhibited automatically?
P.S: x, y = guiGetScreenSize()

Edited by Hugos
Link to comment
11 minutes ago, Hugos said:

Well. Can you tell me more about how to make the dimensions of the picture "guiCreateStaticImage" relative?

If you set relative to true, then you have to provide values from 0.0 to 1.0 (think of them as percentages 0-100 of the parent element). So the first element you draw is relative to the parent which is the screen, so the first element is relative to the screen. The second element as the child (part) of the first is relative to the first one. That's all. That applies to all CEGUI elements, including staticImage.

  • Thanks 1
Link to comment
Just now, WorthlessCynomys said:

If you set relative to true, then you have to provide values from 0.0 to 1.0 (think of them as percentages 0-100 of the parent element). So the first element you draw is relative to the parent which is the screen, so the first element is relative to the screen. The second element as the child (part) of the first is relative to the first one. That's all. That applies to all CEGUI elements, including staticImage.

THANKS!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...