Hajime Hoshi
6f72b15912
internal/driver: move some definitions to internal/ui
...
Updates #1983
2022-02-06 18:13:45 +09:00
Hajime Hoshi
149736c3cf
internal/uidriver/*: integrate the packages into internal/ui
...
Updates #1983
2022-02-06 17:23:04 +09:00
Hajime Hoshi
ee1b5e2044
internal/uidriver/mobile: stop requesting a frame on gamepads
...
In general, it is impossible to treat gamepad inputtings as events.
With FPSModeVsyncOffMinimum, the application cannot update with
gamepad inputtings.
2022-02-04 22:46:41 +09:00
Changkun Ou
626c91e360
ebiten: add RunOnMainThread(func()) ( #1927 )
...
Closes #1926
2022-01-03 03:30:29 +09:00
Hajime Hoshi
b7cd990bc3
ebiten: Make it explicit about the goroutine for Game functions
2021-11-26 02:17:04 +09:00
Hajime Hoshi
f08aea7b9c
ebiten: Update comments about CurrentFPS and CurrentTPS
2021-09-08 22:45:26 +09:00
Trevor Slocum
3406430956
Minor typo fixes ( #1793 )
2021-09-01 17:17:54 +09:00
Hajime Hoshi
1706d9436a
ebiten: Add FPSModeType, FPSMode, SetFPSMode, and ScheduleFrame
...
This change adds these APIs:
* type FPSModeType
* func FPSMode
* func SetFPSMode
* func ScheduleFrame
and deprecates these APIs:
* func SetVsyncEnabled
* func IsVsyncEnabled
Closes #1556
2021-07-24 16:09:13 +09:00
Hajime Hoshi
cf8aa0a7b2
ebiten: Fix old and wrong comments
2021-07-24 15:47:11 +09:00
Hajime Hoshi
52567c459f
ebiten: Remove unnecessary casts
2021-07-23 00:57:17 +09:00
Hajime Hoshi
2503323557
internal/driver: Add FPSMode
...
Updates #1556
2021-07-23 00:47:09 +09:00
Hajime Hoshi
c28bcc26fc
internal/clock: Rename UncappedTPS -> SyncWithFPS
...
Closes #1726
2021-07-22 22:46:24 +09:00
Hajime Hoshi
da2db2f54e
ebiten: Add comments about SetCursorShape / CursorShape
2021-07-22 19:17:14 +09:00
Hajime Hoshi
1c3eaba6e3
ebiten: Fix wrong comments
2021-07-22 19:15:11 +09:00
Hajime Hoshi
12960a31ab
ebiten: Refactoring: Move RunWithoutMainLoop to another file
2021-07-04 04:23:41 +09:00
Hajime Hoshi
b51c692e50
ebiten: Fix a comment
2021-05-29 14:35:28 +09:00
Tom Lister
5d3a76cbe6
internal/uidriver/js: Implement {Set,}Fullscreen for browsers ( #1623 )
...
Closes #1611
2021-04-27 23:58:32 +09:00
Hajime Hoshi
c4c331b0d5
Fix misspellings
2021-04-21 22:50:00 +09:00
Hajime Hoshi
78732d93f6
internal/uidriver/glfw: Bug fix: Crash on some operations on native fullscreen mode (macOS)
...
This change forbids some operations when the wiindow is natively
fullscreened on macOS in order to avoid crashes.
Closes #1578
2021-04-18 18:11:33 +09:00
Hajime Hoshi
2661c769ef
ebiten: Update comments
2021-04-17 22:22:51 +09:00
Hajime Hoshi
150b780ebe
ebiten: Add comments about #1575
...
Updates #1575
2021-04-17 17:33:33 +09:00
Hajime Hoshi
54ac6bed1e
ebiten: Refactoring
2021-04-17 17:30:48 +09:00
Hajime Hoshi
5255a54e20
ebiten: Fix the comment about SetCursorMode (again)
...
Updates #1572
2021-04-16 11:57:53 +09:00
Hajime Hoshi
ad8830d2b7
ebiten: Fix the comment about SetCursorMode
...
Updates #1572
2021-04-16 03:27:52 +09:00
Hajime Hoshi
d00d0c8556
ebiten: Add CursorShape/SetCursorShape/CursorShapeType
...
This change adds APIs to enable to use system cursor shapes other
than the default shape (an arrow).
This change doesn't add these cursors since they seem a little
different on macOS from the other platforms.
* GLFW_HRESIZE_CURSOR
* GLFW_VRESIZE_CURSOR
Closes #995
2021-04-16 01:09:19 +09:00
Hajime Hoshi
5c8d8ab2eb
ebiten: Make NewImage/NewImageFromImage panic when RunGame finishes
...
Closes #1149
2021-04-03 18:44:43 +09:00
Hajime Hoshi
d6ee55cb22
ebiten: Update comments
2021-04-03 18:05:36 +09:00
Hajime Hoshi
8d951ea024
ebiten: Update comments
2021-04-03 17:56:34 +09:00
Hajime Hoshi
160441bb07
ebiten: Bug fix: Wrong documentation about SetScreenClearedEveryFrame
...
Closes #1555
2021-03-30 00:32:17 +09:00
Hajime Hoshi
ce24640da8
ebiten: Ensure that Layout is called before Update in the first frame
2020-12-20 21:10:47 +09:00
Hajime Hoshi
eedb947471
Update comments
2020-10-21 03:17:40 +09:00
Hajime Hoshi
2b7362a66b
ebiten: Fix comments
2020-10-18 01:29:35 +09:00
Hajime Hoshi
294f4364da
ebiten: Rename imageDumperGameWithDraw -> imageDumperGame
2020-10-17 18:16:20 +09:00
Hajime Hoshi
d49d8db15d
ebiten: Refactoring: Remove scaleForWindow
2020-10-15 02:29:04 +09:00
Hajime Hoshi
00f3d83d4c
Remove supporting GopherJS
...
Fixes #1129
2020-10-07 01:10:09 +09:00
Hajime Hoshi
41cf90a321
ebiten: Change the default value of IsRunningOnUnfocused to be true
...
Fixes #1180
2020-10-07 00:30:49 +09:00
Hajime Hoshi
83ead375a4
ebiten: Update comments
2020-10-05 02:00:50 +09:00
Hajime Hoshi
8f00c8fbf5
ebiten: Remove the argument from Update
...
Fixes #1260
2020-10-04 19:33:10 +09:00
Hajime Hoshi
81f336ac46
ebiten: Remove IsDrawingSkipped
...
Fixes #1127
2020-10-04 17:21:44 +09:00
Hajime Hoshi
ad07e31727
ebiten: Add Draw function to Game interface
...
Fixes #1368
2020-10-04 17:13:51 +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
Bui Quoc Trong
0d29979296
Fix the comment style cause heading in pkgsite ( #1369 )
2020-09-29 16:55:39 +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
7ec63acd1d
ebiten: Bug fix: Set the state of being volatile on SetClearingScreenSkipped
...
Fixes #1309
2020-08-19 01:23:30 +09:00
Tom Lister
e96a1fb1c7
ebiten: Implement SetClearingScreenSkipped/IsClearingScreenSkipped ( #1302 )
...
Fixes #1132
2020-08-13 18:19:56 +09:00
Hajime Hoshi
afef032acc
ebiten: Deprecate Run
...
Fixes #1184
2020-06-22 03:45:19 +09:00
Marios Nikolaou
ee8d0c3479
ebiten: Correct spelling of game in function comment ( #1203 )
2020-06-19 21:12:02 +09:00
Hajime Hoshi
a1ac574a60
docs: Use 'Deprecated:' annotation
...
Fixes #1160
2020-05-19 01:50:55 +09:00
Hajime Hoshi
b519ad2853
ebiten: Update comments
...
Updates #1155
2020-05-15 04:07:23 +09:00
Hajime Hoshi
f7f507e912
ebiten: Ensure that Update is called at least once before Draw in the first frame
...
Fixes #1155
2020-05-15 04:04:29 +09:00
Hajime Hoshi
41213108ba
docs: Improve comments about Game
2020-04-01 14:44:56 +09:00
Hajime Hoshi
6429c7aee0
docs: Fix wrong comments about RunGame
2020-04-01 14:40:43 +09:00
Hajime Hoshi
a0b9df7f4e
docs: Improve the comments about Game
2020-04-01 14:35:21 +09:00
Hajime Hoshi
de786035c7
docs: Draw function's signature was wrong
2020-04-01 04:23:55 +09:00
Hajime Hoshi
5300b0f498
docs: Draw function definition was ommitted on godoc.org
2020-04-01 04:22:38 +09:00
Hajime Hoshi
35eb9e77a0
ui: Improve comments about Game interface
...
This change also fixes comments in uiConttext, which seems pretty
old.
2020-03-31 02:04:27 +09:00
Hajime Hoshi
9fe4191a6a
mobile: Game object without Draw didn't draw anything
...
Fixes #1123
2020-03-30 03:35:07 +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
4eedeb6ab7
example: Add mascot
...
This change also revert ScreenSizeInFullscree from the deprecated
state.
Fixes #1108
2020-03-22 16:30:48 +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
d59aea1db1
driver: Remove the return value from RunWithoutMainLoop
2020-02-11 23:56:53 +09:00
Hajime Hoshi
c927d33457
mobile/ebitenmobileview: Use the common uiContext for layouting
...
This means that the whole offscreen is cleared correctly.
This change is a little breaking change: SetScreenSize or other
functions no longer works on ebitenmobile. Use Layout instead.
Fixes #1019
2020-02-11 19:40:47 +09:00
Hajime Hoshi
024fc48647
Refactoring: Add init.go
2020-02-11 11:14:19 +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
90dba581e2
ui: Fix comments
2020-02-09 21:56:48 +09:00
Hajime Hoshi
74cb080c6f
ui: Bug fix: Images were not dumped with RunGame
...
Fixes #1071
2020-02-06 03:32:05 +09:00
Hajime Hoshi
145f9f9588
ui: Update the comments
2020-01-24 11:32:56 +09:00
Zachary Burkett
6686044452
ui: Add IsForeground API to glfw driver ( #1058 )
...
Updates #1037
2020-01-16 10:47:23 +09:00
Hajime Hoshi
982b7d6ddc
driver: Let UI have Graphics
...
Now UIs own the implementation of Graphics.
Updates #1026
2020-01-03 18:32:27 +09:00
Hajime Hoshi
9ed8279fc8
driver: Add interface Window
2019-12-25 00:24:21 +09:00
Hajime Hoshi
1d9c00688c
ui: Panic if Layout returns non-positive numbers
2019-12-23 04:43:04 +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
812a29bf07
ui: Refactoring: theUIContext is always non-nil
2019-12-22 18:53:23 +09:00
Hajime Hoshi
4c6006343e
ui: Refactoring
2019-12-22 17:22:54 +09:00
Hajime Hoshi
1566bb1cd3
ui: Update comments of RunGame
2019-12-22 13:21:15 +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
0e63241bcb
Update comments
2019-12-22 03:50:30 +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
57d527bea2
driver: Remove 'title' argument from UI.Run
2019-12-22 01:41:51 +09:00
Hajime Hoshi
8b995b086b
driver: Remove some arguments from UI.Run
2019-12-21 22:52:23 +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
6a8013ed37
ui: Reduce arguments from newUIContext
2019-12-16 11:12:38 +09:00
Hajime Hoshi
46a7ae6175
ui: Define and use defaultGame
...
This is a pareparation for Game interface and RunGame.
Updates #943
2019-12-16 01:21:16 +09:00
Hajime Hoshi
12a13892cd
ui: Protect uiContext.scaleForWindow by mutex
2019-12-15 20:15:13 +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
Zachary Burkett
ed19d6fae9
Add cursor capture functionality ( #1016 )
...
Fixes #1016
2019-12-14 12:30:03 +09:00
Hajime Hoshi
7f88732cc5
ui: Fix comments
2019-12-12 12:00:45 +09:00
Hajime Hoshi
0ec447e0d0
ui: Add SetScreenTransparent / IsScreenTransparent
...
Fixes #1001
2019-12-01 03:31:32 +09:00
Hajime Hoshi
5ecd010f5a
ui: Add window.go
2019-11-27 00:29:30 +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
b5d8be96a6
mobile: Move Game definition to package ebiten
...
Updates #943
2019-11-25 00:49:13 +09:00
Hajime Hoshi
3c51ee0991
ui: Remove theUIContext, which is not used anywhere
2019-11-17 22:24:17 +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
2f7ccf17f5
docs: Fix comments
2019-10-22 04:15:15 +09:00
Hajime Hoshi
e391d7241d
docs: Add backward compatibility notes
2019-10-22 04:07:14 +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