Should server:createPanel work?

  • It should work, this is the syntax for the function: createPanel(positionx, positiony, width, height, color [0xRRGGBBAA]);
    Note that the width and height are absolute (pixel) values, while positionx and -y are relative values (0-1). Perhaps we should change this mixture of absolute and relative values in the future^^
    Example:
    [lua]-- create a new panel
    local panel = Gui:createPanel(0.1, 0.1, 200, 100, 0xFF0000AA);
    -- display the panel on the player's screen
    event.player:addGuiElement(panel);[/lua]

  • Thanks. I'll try it again tomorrow. Was using relative values like 0.1 and 0.9.


    Not sure how useful it will be without relative values though. :(

Participate now!

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