Page 1 of 1

Creating an Interface - help

Posted: Mon Dec 16, 2013 8:04 am
by radiant
Hello guys,

So i want to get a basic interface set up going in lua however since I'm a novice its a bit frustrating.
Within the Browse API there is the gui in models then in members there is the create,
which shows

Code: Select all

octane.gui.create

  component = octane.gui.create(PROPS_GUI_COMPONENT)
However since it would be to easy to just punch this in and get a interface happening i would think, you would have to use the
"showWindow" or the "props_gui_Window" but agian, i dont know the work arounds.

So i was wondering if someone can get a blank gui set up with height/width and a few strings and such with comments for each code so I can manipulate it myself.

Thanks :oops:

Re: Creating an Interface - help

Posted: Mon Dec 16, 2013 10:40 pm
by roeland
The gui creation works like this:

Code: Select all

animationWindow = octane.gui.create
{
    type     = octane.gui.componentType.WINDOW,
    text     = "my title bar text",
    children = { },      -- fill in children here
    width    = myWidth,  -- typically you should get the size via some GROUP component which does some automatic layout.
    height   = myHeight,
}
For a more complete example check our turntable and animation rendering scripts.

--
Roeland