Jump to content

[SOLVED] Can't use .ui in framework editor.


photo

Recommended Posts

I could add an ui doc in single level game.

Then I try to add an ui doc in the multi-levels game using the framework editor.

But I got the error:"Interpreter::setvariable(): unknow variable "Man::window"" ,just like the pictures.

Heros, who can help me?

post-1403-0-46171300-1406125418_thumb.png

post-1403-0-04961300-1406125427_thumb.png

post-1403-0-21119000-1406125438_thumb.png

post-1403-0-64719500-1406125444_thumb.png

Link to comment

Hi. The "UserInterface" class constructor has a prefix parameter as a prefix to namespace in which your class implemented. In a game framework all user logic dynamically compiled in expression with specific name. This namespace name you can get from Game::getLogicNamespaceName() function.

void onInit() {
	UserInterface ui = new UserInterface(engine.getGui(),"my_ui.ui",game.getLogicNamespaceName());
}
Link to comment
×
×
  • Create New...