Commit Graph

89 Commits

Author SHA1 Message Date
Hajime Hoshi
2afeb86985 graphicsdriver/metal: Bug fix: Had to set the vsync state again at resetting
Fixes #1364
2020-10-14 01:59:03 +09:00
Hajime Hoshi
dfeb48b154 examples/windowsize: Fix the message 2020-10-10 23:00:49 +09:00
Hajime Hoshi
47065f5f2c Remove supporting jsgo
Updates #1129
2020-10-07 00:46:07 +09:00
Hajime Hoshi
1b816eb249 ebiten: Remove the error returning value from NewImageFromImage
Updates #1380
2020-10-06 01:03:33 +09:00
Hajime Hoshi
fe97e7b0a5 ebiten: Remove the filter argument from NewImage and NewImageFromImage
Updates #503
2020-10-05 01:40:44 +09:00
Hajime Hoshi
8f00c8fbf5 ebiten: Remove the argument from Update
Fixes #1260
2020-10-04 19:33:10 +09:00
Hajime Hoshi
1d4ff9a906 ebiten: Remove the deprecated functions and constants
Updates #1127
2020-10-04 04:47:24 +09:00
Hajime Hoshi
bf515bb594 Update version to v2.0.0-alpha 2020-10-04 04:30:40 +09:00
Hajime Hoshi
77fa0cb9ef ui: Add SetInitFocused
Fixes #769
2020-08-23 02:19:09 +09:00
Tom Lister
65d5b64d29
ebiten: Rename SetClearingScreenSkipped/IsClearingScreenSkipped functions (#1317)
Fixes #1315
2020-08-20 17:12:22 +09:00
Hajime Hoshi
d90edf5826 examples/windowsize: Add an option to skip clearing the screen
Updates #1132
2020-08-15 03:14:38 +09:00
Hajime Hoshi
d98713728a uidriver/glfw: Bug fix: SetVsyncEnabled(false) did not work before the main loop
Fixes #1197
2020-06-14 11:50:58 +09:00
Hajime Hoshi
161d8aae8f ui: Forbid RestoreWindow when the window is not maximized nor minimized
Fixes #1124
2020-03-31 02:48:22 +09:00
Hajime Hoshi
b470dace1a examples/windowsize: Bug fix: Nothing was rendered with -legacy mode 2020-03-31 02:22:21 +09:00
Hajime Hoshi
569f684d9b examples/windowsize: Improve messages 2020-03-29 02:36:14 +09:00
Hajime Hoshi
4fe5acd711 ui: Panic on MaximizeWindow when the window is not resizable
On Windows, the window could be maximized even when the window was
not resizable. This behavior is confusing. Forbid it so that the
behavior will be clearer.
2020-03-28 22:08:48 +09:00
Hajime Hoshi
e9508f8fbd examples/windowsize: Bug fix: Key I was assigned for multiple purposes 2020-03-28 15:29:02 +09:00
Hajime Hoshi
844dbc4a9b examples/windowsize: Better instruction message 2020-03-28 15:27:31 +09:00
Hajime Hoshi
237498e51f
ui: Add an optional function Draw function to Game interface (#1107)
This change adds an optional function Draw to the Game interface.
With Draw function, the game logic and rendering are separate.
There are some benefits:

  * The API is clearer and easier to understand.
  * When TPS < FPS, smoother rendering can be performed without
    changing the game logic depending on TPS.
  * Porting to XNA, which has separate functions Update and Draw,
    would be a little easier.

Draw is optional due to backward compatibility. Game interface was
already used before v1.11.x in mobile packages, and adding a
function would break existing code unfortunately. Then, we adopted
switching the behavior based on whether Draw is implemented or not
by type assertions.

IsDrawingSkipped will always return false when Draw is implemented.

Fixes #1104
2020-03-24 12:01:37 +09:00
Hajime Hoshi
f317f3b5fd ui: Add fuctions to maximize or minimize the window
This change adds these functions:

  * MaximizeWindow
  * IsWindowMaximized
  * MinimizeWIndow
  * IsWindowMinimized
  * RestoreWindow

Fixes #994
2020-03-21 22:13:58 +09:00
Hajime Hoshi
978ee26898 ui: Add function aliases *OnUnfocused for *InBackground
Now a window can be floating with SetWindowFloating, the functions
that have suffix 'IsBackground' seems misleading. However, we
cannot rename them due to backward compatibility. Then, let's add
aliases and revisit them when updating the major version of Ebiten.

Fixes #1102
2020-03-21 00:42:00 +09:00
Hajime Hoshi
56358fd0c4 ui: Rename IsForeground -> IsFocused
Updates #1102
2020-03-21 00:12:47 +09:00
Hajime Hoshi
4ef3b3e804 ui: Add SetWindowFloating / IsWindowFloating
Fixes #880
2020-03-20 22:16:27 +09:00
Hajime Hoshi
099ce1b3b4 Revert "ui: Add SetInitFocused"
This reverts commit bb04fc8a29.

Reason: glfw.Focused / glfw.FocusOnShow did not work

Updates #769
2020-02-10 01:10:40 +09:00
Hajime Hoshi
bb04fc8a29 ui: Add SetInitFocused
Updates #769
2020-02-09 23:45:59 +09:00
Hajime Hoshi
db40554715 examples/windowsize: Add usage of IsForeground
Updates #1037
2020-01-21 23:34:03 +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
4aa80de34d examples/windowsize: Bug fix: screenScale can be 0 on browsers 2019-12-22 19:20:31 +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
aad5db8939 examples/windowsize: Change the delta of moving the window 2019-12-21 17:08:04 +09:00
Hajime Hoshi
bda11b0e17 driver: Add UI.SetWindowSize and UIContext.Layout
This is a preparation to introduce RunGame function.

Updates # 943 (Fix this line before committing)
2019-12-15 02:29:43 +09:00
Hajime Hoshi
0ec447e0d0 ui: Add SetScreenTransparent / IsScreenTransparent
Fixes #1001
2019-12-01 03:31:32 +09:00
Hajime Hoshi
d78b4d7ffd examples/windowsize: Add messages about moving the window 2019-11-30 23:59:45 +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
e0d780b029 uidriver/glfw: Enable to call SetWindowDecorated after Run
Fixes #556
2019-11-26 11:46:18 +09:00
Hajime Hoshi
49a5a2bf4e uidriver/js: Bug fix: Needed to initialize pseudoScale with the given scale
Updates #960, #973
2019-10-27 17:16:49 +09:00
Hajime Hoshi
75721e6fc1 ui: Auto scaling on browsers
This change forces Ebiten apps on browsers 'fullscreen' mode.
After this change, 'scale' value is no longer used on browsers.

Note that this breaks backward compatibility, but as long as the
game works in an iframe, this should not be problematic.

Fixes #960
2019-10-15 00:02:02 +09:00
Hajime Hoshi
726de29f36 examples/windowsize: Remove Q key to terminate
Not having a way to terminate the app is more portable. Browsers
and mobiles don't have the notion of 'termination'.
2019-10-14 23:49:42 +09:00
Hajime Hoshi
f56c3bd096 ui: Unexport SetWindowResizable (#320) 2019-02-25 02:19:47 +09:00
Hajime Hoshi
ae84e79d16 ui: Add IsWindowResizable and SetWindowResizable (again)
Fixes #320
2019-01-09 00:24:16 +09:00
Hajime Hoshi
0d4e903b7a Revert "ui: Add IsWindowResizable and SetWindowResizable"
This reverts commit f403e0716f.

Reason: Compilation error on browsers
2019-01-09 00:12:57 +09:00
Hajime Hoshi
f403e0716f ui: Add IsWindowResizable and SetWindowResizable
Fixes #320
2019-01-08 23:52:53 +09:00
Hajime Hoshi
b6f7a0043c examples/windowsize: Show DeviceScaleFactor 2018-10-14 19:15:26 +09:00
Hajime Hoshi
443e3ae3a4 examples/windowsize: Bug fix: Strange delta of window size 2018-10-14 17:34:02 +09:00
Hajime Hoshi
c758a1f8c6 ui: Rename MonitorSize -> ScreenSizeInFullscreen (#708) 2018-10-09 23:42:03 +09:00
Hajime Hoshi
2923bec0dc examples: Use TPS instead of FPS to indicate how fast the app works 2018-09-30 02:27:33 +09:00
Hajime Hoshi
0593b77eb8 ui: Implement CurrentTPS 2018-07-18 02:11:00 +09:00
Hajime Hoshi
e99f2f9f69 ui: Rename TPS -> MaxTPS 2018-07-17 22:41:27 +09:00
Hajime Hoshi
eadbabffd9 examples/windowsize: Use more consts 2018-07-17 22:36:55 +09:00