mirror of
https://github.com/TheOfficialFloW/bd-jb
synced 2024-11-24 18:02:19 -05:00
46 lines
992 B
Java
46 lines
992 B
Java
/*
|
|
* Copyright (C) 2021 Andy Nguyen
|
|
*
|
|
* This software may be modified and distributed under the terms
|
|
* of the MIT license. See the LICENSE file for details.
|
|
*/
|
|
|
|
package com.bdjb;
|
|
|
|
import java.awt.BorderLayout;
|
|
import javax.tv.xlet.Xlet;
|
|
import javax.tv.xlet.XletContext;
|
|
import org.havi.ui.HScene;
|
|
import org.havi.ui.HSceneFactory;
|
|
|
|
public class ExploitXlet implements Xlet {
|
|
private HScene scene;
|
|
private Screen screen;
|
|
|
|
public void initXlet(XletContext context) {
|
|
Exploit.init();
|
|
|
|
screen = Screen.getInstance();
|
|
screen.setSize(1920, 1080); // BD screen size
|
|
|
|
scene = HSceneFactory.getInstance().getDefaultHScene();
|
|
scene.add(screen, BorderLayout.CENTER);
|
|
scene.validate();
|
|
}
|
|
|
|
public void startXlet() {
|
|
screen.setVisible(true);
|
|
scene.setVisible(true);
|
|
Exploit.start();
|
|
}
|
|
|
|
public void pauseXlet() {
|
|
screen.setVisible(false);
|
|
}
|
|
|
|
public void destroyXlet(boolean unconditional) {
|
|
scene.remove(screen);
|
|
scene = null;
|
|
}
|
|
}
|