Jump to content

guiSetSize Issue


'LinKin

Recommended Posts

Posted

Hello,

I have a window, 400x300

I found an issue, when I try to set its width to 0 using guiSetSize, it doesn't work.

It reaches a point where its width doesn't decrease, why?

I even tried using high negative values as the 2nd argument of guiSetSize (the width).

Posted

Try this:

It won't even work like that, I think this is a bug of MTA.

addCommandHandler("ss", function()  
    local sW, sH = guiGetScreenSize() 
    local width, height = 455, 415 
    local left = sW - width - 1 
    local top = sH/2 - height/2 
    local w = guiCreateWindow(left, top, 10, height, "", false) 
    --guiSetSize(w, 1, height, false) 
end) 

In my case it creates the window, but it's width can't be less than 96

Posted

Tried that, tried using relative GUI, and nothing makes what it should make.

Seems the width and height of a GUI is limited or something like that.....

I tried creating a window with 0 width and 0 height and this is what I got:

test.png

Posted
Tried that, tried using relative GUI, and nothing makes what it should make.

Seems the width and height of a GUI is limited or something like that.....

I tried creating a window with 0 width and 0 height and this is what I got:

test.png

why not create, in DX ( DX Panel )??? :(:(

  • Moderators
Posted

@LekRoots

Because write the code manualy is always better in quality, performance and managing.

and it is hard to move dx gui's.

@'LinKin

What if you try a black static image as background?

But you lose the move/scale ability with the cursor.

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