Jump to content

[Help] How to let static image be expanded, with parent?


Kazafka

Recommended Posts

  • Moderators

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)

 

Link to comment
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.

Link to comment
  • Moderators
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

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...