[Feature Request]: Expanded Display/Windowing System
lucasstarsz opened this issue · comments
Origins of the Feature
FastJ currently locks the user into using specifically its windowing system, which also means a lack of ability to create libraries that change or improve its functionality (such as adding accessibility support, multiple top-level windows -- see #57, etc).
The New Feature Idea(s)
FastJ could create a windowing system with the following features:
-
Base
Display
interface providing the most basic functions: methods to get the display'sjava.awt.Window
,DisplayState
, and methods toopen
andclose
said window.
Every other function of that window should be left up to implementor(s) to provide -- resizing, full-screen support, accessibility, multiple window support, and so on and so forth. -
Abstract current canvas use into separate class --
FastJCanvas
-- instantiated with instance ofDisplay
. -
Display
implementation containing the following features:- window resizing (enable/disable for player)
- windowed/fullscreen/borderless support (store original window size when iconified/fullscreen)
- AWT keyboard/mouse support
- title & title changing
- icon & icon changing
- background color
- create/control child windows/dialogue sequences
- access to
FastJCanvas
instance
and the following niceties:
- get window size
- get center of window
- get window scale (window size / canvas size)
-
Option to provide a custom window (instantiated by user beforehand):
FastJEngine.configureCustomDisplay(myDisplay);
-
access display instance using "generics":
FastJEngine.getDisplay(MyDisplay.class);
Progress and PRs will be submitted first to the 1.6.0-display
branch. Suggestions and comments welcome!
Alternatives
No response
Code of Conduct
- I agree to follow this project's Code of Conduct