Note that there are some explanatory texts on larger screens.

plurals
  1. POPlayN Tripleplay not working with Android Nexus 7
    primarykey
    data
    text
    <p>i have defined the main menus of my game using the Tripleplay framework for PlayN. unfortunately I cannot get it to display on my Nexus 7.</p> <p>What's really strange about this - if i run the Java version everything works fine - yet whenever I run the Android version nothing displays - the logs state that the whole UI is built</p> <p>Has anybody had any problem using the Tripleplay framework on Android - the Java works fine.</p> <p>Here is the code:</p> <pre><code>public class MainMenuStateImpl extends AbstractState implements MenuState { private Interface ui; private GroupLayer groupLayer; @Inject public MainMenuStateImpl(StateManager stateManager) { super(stateManager); } @Override public void initialize() { PlayN.log().debug("initializing main menu"); groupLayer = graphics().createGroupLayer(); graphics().rootLayer().add(groupLayer); ui = new Interface(); final Root root = ui.createRoot(AxisLayout.vertical().gap(15), SimpleStyles.newSheet()); PlayN.log().debug("setting root to size " + graphics().width() + ", " + graphics().height()); root.setSize(graphics().width(), graphics().height()); stateManager.getImageCache().cache("img/menu_background.png", new Callback.Default&lt;Image&gt;() { @Override public void onSuccess(Image image) { // groupLayer.add(graphics().createImageLayer(image)); root.addStyles(Style.BACKGROUND.is(Background.image(image))); groupLayer.add(root.layer); // graphics().rootLayer().add(root.layer); final Group buttons = new Group(AxisLayout.vertical().offStretch()); root.add(new Label("RunRun:"), buttons); PlayN.log().debug("adding level groups to menu"); final LevelGroupMetadataCache cache = (LevelGroupMetadataCache) stateManager.getContext() .get(ContextKeys.LEVEL_GROUP_METADATA_CACHE); for (final LevelGroupMetadata levelGroup : cache) { final Button button = new Button(levelGroup.getName()); buttons.add(button); button.clicked().connect(new UnitSlot() { @Override public void onEmit() { stateManager.getContext().set(ContextKeys.LEVEL_GROUP, cache.get(levelGroup.getName())); stateManager.goTo(stateManager.getLevelGroupMenuState()); } }); } PlayN.log().debug("finished creating ui for main menu"); PlayN.log().debug("ui = " + ui); } }); } @Override public void destroy() { groupLayer.destroy(); } @Override public void update(float delta) { ui.update(delta); } @Override public void paint(float alpha) { ui.paint(alpha); } } </code></pre> <p>all the log statements appear in my logcat - but nothing is rendering - in Android only - everything works fine when i run the java version... </p> <p>I'm completely at a loss as to how to fix this or what to do.</p> <p>Any help would be greatly appreciated</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload