mirror of
https://gitlab.com/AutumnMeowMeow/jexer
synced 2024-09-19 03:40:20 -06:00
Cute XTermVideoPlayer
This commit is contained in:
parent
b5c955c947
commit
b1d568e253
1 changed files with 18 additions and 0 deletions
|
@ -37,6 +37,15 @@ public class XtermVideoPlayer extends TApplication {
|
||||||
addFileMenu();
|
addFileMenu();
|
||||||
addWindowMenu();
|
addWindowMenu();
|
||||||
|
|
||||||
|
// Make it cute.
|
||||||
|
getTheme().setFemme();
|
||||||
|
System.setProperty("jexer.TWindow.borderStyleForeground", "round");
|
||||||
|
System.setProperty("jexer.TWindow.borderStyleModal", "round");
|
||||||
|
System.setProperty("jexer.TWindow.borderStyleMoving", "round");
|
||||||
|
System.setProperty("jexer.TWindow.borderStyleInactive", "round");
|
||||||
|
setDesktop(null);
|
||||||
|
setHideStatusBar(true);
|
||||||
|
|
||||||
// Create a window for the image. The resize event is overridden so
|
// Create a window for the image. The resize event is overridden so
|
||||||
// that the internal image field changes in size with the window.
|
// that the internal image field changes in size with the window.
|
||||||
TWindow window = new TWindow(this, filename, 0, 0,
|
TWindow window = new TWindow(this, filename, 0, 0,
|
||||||
|
@ -53,6 +62,7 @@ public class XtermVideoPlayer extends TApplication {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
window.setAlpha(255);
|
||||||
|
|
||||||
// Add the image field. We will load frames into this.
|
// Add the image field. We will load frames into this.
|
||||||
image = window.addImage(0, 0, window.getWidth() - 2,
|
image = window.addImage(0, 0, window.getWidth() - 2,
|
||||||
|
@ -149,6 +159,14 @@ public class XtermVideoPlayer extends TApplication {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show FPS.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void onPreDraw() {
|
||||||
|
menuTrayText = String.format("FPS %d", getFramesPerSecond());
|
||||||
|
}
|
||||||
|
|
||||||
// Main entry point.
|
// Main entry point.
|
||||||
public static void main(String [] args) throws Exception {
|
public static void main(String [] args) throws Exception {
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
|
|
Loading…
Reference in a new issue