Use getters and setters for Window.opacity.

This commit is contained in:
player-03
2022-08-12 12:41:43 -04:00
committed by GitHub
parent 13c33d83f4
commit 6b2724b147

View File

@@ -80,6 +80,7 @@ class Window
public var onRestore(default, null) = new Event<Void->Void>(); public var onRestore(default, null) = new Event<Void->Void>();
public var onTextEdit(default, null) = new Event<String->Int->Int->Void>(); public var onTextEdit(default, null) = new Event<String->Int->Int->Void>();
public var onTextInput(default, null) = new Event<String->Void>(); public var onTextInput(default, null) = new Event<String->Void>();
public var opacity(get, set):Float;
public var parameters:Dynamic; public var parameters:Dynamic;
public var resizable(get, set):Bool; public var resizable(get, set):Bool;
public var scale(get, null):Float; public var scale(get, null):Float;
@@ -413,14 +414,6 @@ class Window
__backend.warpMouse(x, y); __backend.warpMouse(x, y);
} }
public function getOpacity():Float {
return __backend.getOpacity();
}
public function setOpacity(opacity:Float):Void {
__backend.setOpacity(opacity);
}
// Get & Set Methods // Get & Set Methods
@:noCompletion private function get_cursor():MouseCursor @:noCompletion private function get_cursor():MouseCursor
{ {
@@ -526,6 +519,17 @@ class Window
return value; return value;
} }
@:noCompletion private function get_opacity():Float
{
return __backend.getOpacity();
}
@:noCompletion private function set_opacity(value:Float):Float
{
__backend.setOpacity(value);
return value;
}
@:noCompletion private inline function get_resizable():Bool @:noCompletion private inline function get_resizable():Bool
{ {
return __resizable; return __resizable;