Hugos Posted November 7, 2019 Share Posted November 7, 2019 What is the difference between "guiCreateStaticImage" and "dxDrawImage." For example, I draw panel and buttons using images. What 's best to use? Link to comment
WorthlessCynomys Posted November 7, 2019 Share Posted November 7, 2019 guiCreateStaticImage makes a CEGUI element. dxDrawImage draws an image with the lifetime of a frame. You have to call dx functions on every frame. 1 Link to comment
Hugos Posted November 7, 2019 Author Share Posted November 7, 2019 (edited) 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 November 7, 2019 by Hugos Link to comment
WorthlessCynomys Posted November 7, 2019 Share Posted November 7, 2019 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. 1 Link to comment
Hugos Posted November 7, 2019 Author Share Posted November 7, 2019 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now