Commit Graph

11 Commits

Author SHA1 Message Date
Hajime Hoshi
9ed8279fc8 driver: Add interface Window 2019-12-25 00:24:21 +09:00
Hajime Hoshi
049aa552d4 ui: Add SetWindowResizable
This change also fixes example/windowsize.

Fixes #320
2019-12-22 19:26:04 +09:00
Hajime Hoshi
62bbb8818e ui: Update comments at WindowSize and SetWindowSize
Fixes #1030
2019-12-22 12:52:52 +09:00
Hajime Hoshi
c9863284cf uidriver/glfw: Set a default window size
Now RunGame can be called without SetWindowSize.
2019-12-22 12:51:36 +09:00
Hajime Hoshi
7d56e4335e ui: Add RunGame, WindowSize and SetWindowSize
This change introduces the new APIs RunGame, WindowSize and
SetWindowSize. These new APIs hides the notion of 'scale', and is
more flexible with the outside size change. This means that we can
introduce a resizable window.

This change also adds -legacy flag to examples/windowsize. If the
flag is off, the new APIs are used.

This change deprecates these functions since the notion of 'scale'
is deprecated:

  * ScreenScale
  * ScreenSizeInFullscreen
  * SetScreenScale
  * SetScreenSize

Fixes #943, #571
Updates #320
2019-12-22 03:35:31 +09:00
Hajime Hoshi
dabaf66b81 uidriver: Remove width/height/scale arguments from run
The initial window position is determined on ebiten package side.

Updates #943
2019-12-21 20:10:58 +09:00
Hajime Hoshi
b8a099e354 ui: Bug fix: (Set)WindowPosition didn't work well with fullscreen mode 2019-12-01 00:39:04 +09:00
Hajime Hoshi
e463f9e611 ui: Make (Set)WindowPosition concurrent safe 2019-12-01 00:11:46 +09:00
Hajime Hoshi
9b2f864fc8 ui: Add SetWindowPosition(x, y int)
Fixes #936
2019-11-30 23:22:39 +09:00
Hajime Hoshi
c021d6be6a ui: Add WindowPosition()
Fixes #936
2019-11-30 22:37:56 +09:00
Hajime Hoshi
5ecd010f5a ui: Add window.go 2019-11-27 00:29:30 +09:00