Geyser window on startup

Im busy building a GUI and I have noticed that some of the Gui Boxes with its contents are activated on startup and others not.
Then i have to open the scripts one by one before the appear. Why is this the case and how can I fix it?

Comments

  • KlendathuKlendathu Eye of the Storm
    There could be any number of reasons.

    1. Some windows are defined within functions, not just in script blocks. These will not autoload until you run the script.
    2. A script to run in an earlier window is erroring, causing the rest of the functions to not run.
    3. There are dependencies on certain windows which are not established (basing position of another's position before the second window is defined)
    4. etc

    The way I have my GUI set up is to have every window definition in its own script, then a script to run on startup which calls each script in the order I want them to be called.

    Tharos, the Announcer of Delos shouts, "It's near the end of the egghunt and I still haven't figured out how to pronounce Clean-dat-hoo."
  • Klendathu said:

    "then a script to run on startup which calls each script in the order I want them to be called."
    Can you give a basic example of this??


  • KlendathuKlendathu Eye of the Storm
    function setupGUI()
    WindowWidth, WindowHeight = getMainWindowSize();
    gui_h = 175
    gui_w = 220
    gui2h = 303
    GuiContainer = Geyser.Container:new({
    name = "GuiContainer",
    x = WindowWidth - 460, y = 5,
    width = 440, height = WindowHeight - 10, --aim for 800
    })
    InfoContainer = Geyser.Label:new({
    name = "InfoContainer",
    x = gui_w, y = 0,
    width = gui_w, height = gui_h - 70
    },GuiContainer)
    InfoContainer:setStyleSheet(css_border)
    -- row 1
    createScorePane()
    createInfoPane()
    createToggles()
    createRoomList()
    -- row 2
    createFlipPane()
    createHarmonicsPane()
    -- misc
    createLCGUI()
    --createTogglePane()
    createVitalsPane()
    createDefPane()
    createPeoplePane()
    createExitsPane()
    createMapperPane()
    createInfxPane()
    end


    registerAnonymousEventHandler("svo system loaded", "setupGUI")




    function createScorePane()
    ScorePane = Geyser.MiniConsole:new({
    name = "ScorePane",
    x = 5, y = 5,
    width = gui_w - 10, height = 25,
    }, InfoContainer)
    setMiniConsoleFontSize("ScorePane", 14)
    setFgColor("ScorePane", 192,192,192)
    setBgColor("ScorePane", 0, 0, 0)
    setBackgroundColor("ScorePane",0,0,0,255)
    setWindowWrap("ScorePane", 40)
    setTextFormat("ScorePane",255,255,0,0,0,0,0,0,0)
    end



    function createInfoPane()
    InfoPane = Geyser.MiniConsole:new({
    name = "InfoPane",
    x = 5, y = 30,
    width = gui_w - 10, height = tonumber(InfoContainer.height:match("%d+")) - tonumber(ScorePane.height:match("%d+")) - 10,
    }, InfoContainer)
    setBackgroundColor("InfoPane",0,0,0,255)
    setMiniConsoleFontSize("InfoPane", 9)
    setWindowWrap("InfoPane", 40)
    setTextFormat("InfoPane",0,0,0,255,0,0,0,0,0)
    end


    Tharos, the Announcer of Delos shouts, "It's near the end of the egghunt and I still haven't figured out how to pronounce Clean-dat-hoo."
  • *passed out*

  • ok ok I think I got it.Thank you!!

Sign In or Register to comment.