-
Notifications
You must be signed in to change notification settings - Fork 0
StageContent
Rico Schrage edited this page May 9, 2017
·
4 revisions
While implementing the Content
interface might be pretty exhausting, because you have to render everything by yourself, there is a very neat alternative for creating user interfaces (similar approach will exist for the game itself too): StageContent
. The StageContent
provides a very comfortable way to create an UI simply with writing some xml's. Let's start with a minimal example:
public class NiceUiContent extends StageContent {
@Override
protected Resource defineXML() {
return XML_LOADING_SCREEN;
}
@Override
protected Resource defineSkin() {
return SKIN_LOADING_SCREEN;
}
}
You need two different resources to set up a StageContent
:
- You need a
Resource
, which describes a xml and has already been loaded by theResourceHandler
. - You need a
Resource
, which describes a skin and has already been loaded by theResourceHandler
. If you fulfill both requirement you can just return your resource-descriptors in the methods and you are finished.
soon...
© VeryGame