Defos Versions Save

Extra native OS functions for games written using the Defold game engine

v2.2.3

4 years ago

Dependency URL:

Add this to your game.project:

https://github.com/subsoap/defos/archive/v2.2.3.zip

Bug fixes:

  • Fix cursor hide/show on XFCE

v2.2.2

4 years ago

Dependency URL:

Add this to your game.project:

https://github.com/subsoap/defos/archive/v2.2.2.zip

Bug fixes:

  • Fix missing NULL terminator in get_bundle_root() on Linux (though you should use sys.get_application_path() instead).

v2.2.1

5 years ago

Dependency URL:

Add this to your game.project:

https://github.com/subsoap/defos/archive/v2.2.1.zip

Bug fixes:

  • High-DPI cursors are loaded correctly on Linux

v2.2.0

5 years ago

Dependency URL:

Add this to your game.project:

https://github.com/subsoap/defos/archive/v2.2.0.zip

New features:

  • load_cursor() function to load a cursor once and reuse it many times without reloading it each time

v2.1.0

5 years ago

Dependency URL:

Add this to your game.project:

https://github.com/subsoap/defos/archive/v2.1.0.zip

Deprecations:

  • move_cursor_to() has been renamed to set_cursor_pos_view(). Old name still available.

New features:

  • Linux support.
  • Query attached displays, their placement on the desktop and supported resolution modes.
  • Get the current cursor position with get_cursor_pos()/get_cursor_pos_view().
  • Get the path to the game installation directory.
  • Get the command line arguments passed to the game's executable.
  • Toggle "always on top" for the game window.
  • Minimize the window.
  • Set the window icon programatically.

Bug fixes:

  • Fix wrong reporting of window size and position on Windows when window was maximized.
  • Fix cursor locking and clipping handling when window is unfocused on Windows.
  • Fix passing nil for x and y in set_window_size() and set_view_size() centered the window in the middle of the primary display instead of the current display.

v2.0.0

6 years ago

Dependency URL:

Add this to your game.project:

https://github.com/subsoap/defos/archive/v2.0.0.zip

Breaking changes:

  • enable_mouse_cursor() and disable_mouse_cursor() have been renamed to set_cursor_visible().
  • toggle_maximize() has been renamed to toggle_maximized().
  • If you want to center the window in the center of the screen, use set_window_size(nil, nil, width, height) instead of set_window_size(-1, -1, width, height).

New features:

  • Precisely set/get the position and resolution of the game view only (without the containing window).
  • Change the mouse cursor type between a selection of system cursors and even set custom hardware cursors.
  • Programatically move the mouse cursor to an arbitrary position.
  • Lock the mouse cursor to a position while still receiving dx and dy (useful for FPS controls).
  • Clip the cursor within the screen bounds.
  • Additional getters and setters for existing features.
  • A callback for onclick on HTML5 to work around permission issues when using toggle_fullscreen() and the likes.

v1.0.0

6 years ago

Breaking API changes may happen soon so if your project breaks and you don't want change function names you can use this release directly instead.