Skip to content

Commit

Permalink
fix for lime 8.1.0 (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
moxie-coder authored Nov 3, 2023
1 parent db15307 commit af76191
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions source/lime/_internal/backend/native/NativeWindow.hx
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,28 @@ class NativeWindow
}
}

#if (lime >= "8.1.0")
public function setMinSize(width:Int, height:Int):Void
{
if (handle != null)
{
#if (!macro && lime_cffi)
NativeCFFI.lime_window_set_minimum_size(handle, width, height);
#end
}
}

public function setMaxSize(width:Int, height:Int):Void
{
if (handle != null)
{
#if (!macro && lime_cffi)
NativeCFFI.lime_window_set_maximum_size(handle, width, height);
#end
}
}
#end

public function setBorderless(value:Bool):Bool
{
if (handle != null)
Expand Down Expand Up @@ -661,6 +683,42 @@ class NativeWindow
return value;
}

#if (lime >= "8.1.0")
public function setVisible(value:Bool):Bool
{
if (handle != null)
{
#if (!macro && lime_cffi)
NativeCFFI.lime_window_set_visible(handle, value);
#end
}

return value;
}

public function getOpacity():Float
{
if (handle != null)
{
#if (!macro && lime_cffi)
return NativeCFFI.lime_window_get_opacity(handle);
#end
}

return 1.0;
}

public function setOpacity(value:Float):Void
{
if (handle != null)
{
#if (!macro && lime_cffi)
NativeCFFI.lime_window_set_opacity(handle, value);
#end
}
}
#end

public function warpMouse(x:Int, y:Int):Void
{
#if (!macro && lime_cffi)
Expand Down

0 comments on commit af76191

Please sign in to comment.