GuiLabel: setting one propertty changes other properties too

  • I noticed a strange effect: while changing the colour and/or the 'clickability' of a GuiLabel (possibly of other GuiElements too?), the colour and the position of the label change in unexpected ways.


    I am adding the sources of a very small plug-in; it only has one chat command: /test which displays a panel with the three boxes, numbered from 1 to 3, the first is blue ('active') and clickable, the other are red (inactive) and non-clickable: clicking on the active box displays a short message in the chat; two clickable buttons (left and right) move the 'selection' to the prev/next box, they also are can become inactive if there are no more previous or next boxes.


    What actually happens is that any change to the colour or to the 'clickability' of a GUI element, displaces it slightly to the right and up and turn its colour to fully transparent; debug statements confirm that the actual colour and position values in the element are correct, but the display is wrong.


    If the element is removed from the player GUI before the change and re-added after, the display is correct; in the test plug-in, this is done for the PREV button, and not for the other elements. This might work as a work-around, but seems a sub-optimal solution.


    Any suggestion?

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!