Added option to hide decorations with ui.hide_decorations
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
/target/
|
||||||
@@ -170,6 +170,9 @@ public class Application
|
|||||||
/** The path (relative to the appdir) to a single play again image. */
|
/** The path (relative to the appdir) to a single play again image. */
|
||||||
public String playAgainImage;
|
public String playAgainImage;
|
||||||
|
|
||||||
|
public boolean hideDecorations;
|
||||||
|
|
||||||
|
|
||||||
/** The global percentages for each step. A step may have more than one, and
|
/** The global percentages for each step. A step may have more than one, and
|
||||||
* the lowest reasonable one is used if a step is revisited. */
|
* the lowest reasonable one is used if a step is revisited. */
|
||||||
public Map<Step, List<Integer>> stepPercentages =
|
public Map<Step, List<Integer>> stepPercentages =
|
||||||
@@ -725,6 +728,8 @@ public class Application
|
|||||||
ui.playAgain = parseRect(cdata, "ui.play_again", ui.playAgain);
|
ui.playAgain = parseRect(cdata, "ui.play_again", ui.playAgain);
|
||||||
ui.playAgainImage = (String)cdata.get("ui.play_again_image");
|
ui.playAgainImage = (String)cdata.get("ui.play_again_image");
|
||||||
|
|
||||||
|
ui.hideDecorations = Boolean.parseBoolean((String)cdata.get("ui.hide_decorations"));
|
||||||
|
|
||||||
// step progress percentages
|
// step progress percentages
|
||||||
for (UpdateInterface.Step step : UpdateInterface.Step.values()) {
|
for (UpdateInterface.Step step : UpdateInterface.Step.values()) {
|
||||||
String spec = (String)cdata.get("ui.percents." + step.name());
|
String spec = (String)cdata.get("ui.percents." + step.name());
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ public class GetdownApp
|
|||||||
String title = StringUtil.isBlank(_ifc.name) ? "" : _ifc.name;
|
String title = StringUtil.isBlank(_ifc.name) ? "" : _ifc.name;
|
||||||
if (_frame == null) {
|
if (_frame == null) {
|
||||||
_frame = new JFrame(title);
|
_frame = new JFrame(title);
|
||||||
|
_frame.setUndecorated(_ifc.hideDecorations);
|
||||||
|
|
||||||
_frame.addWindowListener(new WindowAdapter() {
|
_frame.addWindowListener(new WindowAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void windowClosing (WindowEvent evt) {
|
public void windowClosing (WindowEvent evt) {
|
||||||
|
|||||||
Reference in New Issue
Block a user