How to change size of button?
How to change size of button?
I try to change current size of a button accessing via 'AbsoluteRect', but that doesn`t change. How to change then?
Re: How to change size of button?
the gui elements are positioned relative to their parent so you have to use setRelativePosition() which then gets updated with updateAbsoutePosition();
Re: How to change size of button?
Thanks, It gets kinda worked, but I have other question: why are the coords of the upper left/lower right corners 's32' type? That is, is it impossible to move e.g. upper left corner to left (negative direction)? Or maybe do the gui elements use some specific coordinate system? And also, the coords can not be fractional.
Re: How to change size of button?
Why would it be impossible? s32 is a signed type, so it can be negative.
Coordinates are pixels, that's why they are not fractional.
Coordinates are pixels, that's why they are not fractional.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: How to change size of button?
i have never had an issue with moving gui elements around.
(i consider my gui use to be fairly extreme - see video to see my irrlicht gui in action)
so i might be able to help with nay other questions you have regarding it. we will see
https://youtu.be/gmqWs9u-XiQ
GUI Coordinates are in screen space and the rootguielement is at recti(0,0,screenSizeX,ScreenSizeY)
children are then placed relative to their parents.
since gui elements are screen aligned, it makes sense to me that they use whole numbers instead of fractions.
the method I use to scale elements is to store the scale, relative to the parent, in the element and then update accordingly.
there is a scale method already in the base gui though that you can use. I just personally wanted to create my own system.
(i consider my gui use to be fairly extreme - see video to see my irrlicht gui in action)
so i might be able to help with nay other questions you have regarding it. we will see

https://youtu.be/gmqWs9u-XiQ
GUI Coordinates are in screen space and the rootguielement is at recti(0,0,screenSizeX,ScreenSizeY)
children are then placed relative to their parents.
since gui elements are screen aligned, it makes sense to me that they use whole numbers instead of fractions.
the method I use to scale elements is to store the scale, relative to the parent, in the element and then update accordingly.
there is a scale method already in the base gui though that you can use. I just personally wanted to create my own system.