Kazafka Posted February 3, 2020 Posted February 3, 2020 (edited) Well, how to make static image, and let it be expanded, even, if it has a parent? Any idea, developers? Edited February 3, 2020 by VaporZ
Moderators Patrick Posted February 3, 2020 Moderators Posted February 3, 2020 Change image size when window resized. local window = guiCreateWindow(500, 500, 200, 200, "Background", false) local image = guiCreateStaticImage(0, 0, 1, 1, "img.png", true, window) addEventHandler("onClientGUISize", window, function() guiSetSize(image, 1, 1, true) end)
Kazafka Posted February 3, 2020 Author Posted February 3, 2020 1 minute ago, stPatrick said: Change image size when window resized. Case is, that my window is set to not be able to resize. Maybe, it will be better to explain with code: window = guiCreateWindow(27, 472, 308, 198, "", false) guiWindowSetSizable(window, false) img1 = guiCreateStaticImage(9, 24, ustawienia.hud.resx, ustawienia.hud.resy, ustawienia.mapa, false) --Here, all parameters like ustawienia.hud.resx has been set, of course. And maybe it is available to zoom into this image, or e x p a n d it? I want to create something like this https://imgur.com/a/evPJJbh but with CEGUI.
Moderators Patrick Posted February 3, 2020 Moderators Posted February 3, 2020 22 minutes ago, VaporZ said: Case is, that my window is set to not be able to resize. Maybe, it will be better to explain with code: window = guiCreateWindow(27, 472, 308, 198, "", false) guiWindowSetSizable(window, false) img1 = guiCreateStaticImage(9, 24, ustawienia.hud.resx, ustawienia.hud.resy, ustawienia.mapa, false) --Here, all parameters like ustawienia.hud.resx has been set, of course. And maybe it is available to zoom into this image, or e x p a n d it? I want to create something like this https://imgur.com/a/evPJJbh but with CEGUI. I think you can't do it with gui. You need to use dxDrawImageSection or renderTarget
Kazafka Posted February 3, 2020 Author Posted February 3, 2020 5 minutes ago, stPatrick said: You need to use dxDrawImageSection or renderTarget Actually, I'm testing it now, and I can't say, that it's bad, because it's cool, but I need to work more with coords on screen, but anyways, thank you very much.
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