<SOLVED> 'Ox.Gui.Component.GuiComponent<T>'

Mar 9, 2010 at 8:50 AM
Edited Mar 9, 2010 at 9:23 AM

I did a quick search and didn't find anything on this, I am guessing I am missing something simple -- or just too tired to figure it out -- I am working through the "Loading and Scripting GUI Screens" document and I am trying to add the:

// set the title screen as the current screen
    var guiSystem = Engine.GetService<GuiSystem>();
var titleScreen = Engine.GetComponent<GuiComponent>("TitleScreen.Root");
guiSystem.Screen = titleScreen;

however VS8 is not finding the correct GuiComponent I assume, I am getting the following error:

Using the generic type 'Ox.Gui.Component.GuiComponent<T>' requires '1' type arguments

I am sure I am just missing something. Any help or advice would be appreciated, I'll keep working at it tomorrow when I am more awake if I don't get a response.




Mar 9, 2010 at 9:45 AM

found that is I change GuiComponent to GuiComponent<GuiView> it will compile, but it wont switch between the screens.


Mar 9, 2010 at 10:57 AM

Sorry, this is because I didn't update the documentation properly on the last release. You should use BaseGuiComponent, not GuiComponent.


Mar 10, 2010 at 3:48 AM

Cool thanks,  at least it wasn't me be stupid.  =)

I learned a lot trying to figure it out, so no time wasted.