Hajime Hoshi
be1836339b
internal/ui: define the common struct UserInterface for all the environments
...
The existing UserInterface structs became userInterfaceImpl structs.
2022-03-21 23:10:27 +09:00
Hajime Hoshi
12ce5ae83a
internal/ui: remove the call of graphicsDriver() from the context
2022-03-21 16:48:33 +09:00
Hajime Hoshi
871121abe3
internal/ui: refactoring: remove (*contextImpl).layout
2022-02-14 02:59:02 +09:00
Hajime Hoshi
cffa123405
internal/ui: refactoring: remove sizeChanged for js
...
It is safe to call Layout every frame.
2022-02-14 02:50:32 +09:00
Hajime Hoshi
b695cb928a
internal/ui: remove RunWithoutMainLoop in non-mobile environments
2022-02-13 22:31:48 +09:00
Hajime Hoshi
0c1c40995c
internal/ui: rename types and members: uiContext -> gameForUI
2022-02-13 20:20:46 +09:00
Hajime Hoshi
08defeeded
internal/ui: move more logics to internal/ui
2022-02-13 20:02:49 +09:00
Hajime Hoshi
9b2f0b6c56
internal/ui: rename ResetForFrame -> ResetForTick
...
Resetting happens every tick, not every frame.
2022-02-13 19:54:40 +09:00
Hajime Hoshi
6a8e45e6c1
internal/ui: refactoring: simplify ResetForFrame
...
Updating the layout is already done every frame, so doing this in
ResetForFrame is not needed.
Updates #490
2022-02-13 19:31:35 +09:00
Hajime Hoshi
7b164882fc
internal/ui: refactoring: move AdjustPosition to the package internal/ui
2022-02-13 19:14:29 +09:00
Hajime Hoshi
2609d73a1a
internal/ui: refactoring: move some logics to internal/ui
2022-02-13 18:01:18 +09:00
Hajime Hoshi
b282b1805b
internal/ui: refactoring: add ui.SetError
...
This is a preparation to move uiContext to the package internal/ui.
2022-02-13 17:17:08 +09:00
Hajime Hoshi
9c8b4db81f
internal/ui: separate 'vibrate' part to internal/vibrate
2022-02-08 14:48:55 +09:00
Hajime Hoshi
0f09ddfbd2
internal/driver: remove Window
...
Closes #1983
2022-02-06 20:12:40 +09:00
Hajime Hoshi
2fbfa5444b
internal/driver: remove Input
2022-02-06 18:34:31 +09:00
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
7e5085f15b
Add uidriver package and move UI implementation to this packaage
2019-04-07 18:21:16 +09:00
Hajime Hoshi
a4a129e3af
ui: Rename currentUI -> theUI
2019-04-07 11:10:55 +09:00
Hajime Hoshi
1b8d4abfdb
driver: Move ui.GraphicsContext to driver
2019-04-07 10:48:18 +09:00
Hajime Hoshi
6cdcd1ee62
input: Refactoring: Remove input dependencies from ui
2019-04-06 23:42:55 +09:00
Hajime Hoshi
a980de8326
ui: Take the Input driver
2019-04-06 23:29:13 +09:00
Hajime Hoshi
de9f54fd9d
driver: Add Input
2019-04-06 21:48:54 +09:00
Hajime Hoshi
e273618081
input: Rename Reset -> ResetForFrame
2019-03-31 18:49:00 +09:00
Hajime Hoshi
0536efd95f
ui: Remove AdjustedCursorPosition
2019-03-31 02:06:42 +09:00
Hajime Hoshi
dec6be1a11
ui: Remove AdjustedTouches
2019-03-31 02:03:59 +09:00
Hajime Hoshi
5d6f66935a
ui: Remove UpdateTouches
2019-03-31 01:54:38 +09:00
Hajime Hoshi
853dbdf19d
input: Refactoring
2019-03-31 00:45:52 +09:00
Hajime Hoshi
7445144194
Move graphicsdriver.GrapahicsDriver to driver.Graphics
2019-03-30 22:38:02 +09:00
Hajime Hoshi
f2e42c3ea1
ui: Remove dependencies on driver package
2019-03-30 21:59:11 +09:00
Hajime Hoshi
dbc3461628
ui: Use flexbox for centering
2019-03-20 01:44:36 +09:00
Hajime Hoshi
5be567d58f
ui: Implement restoring context lost on browsers correctly
...
Fixes #734
2019-02-01 01:20:40 +09:00
Hajime Hoshi
248f51cc02
ui: Fix comments
2019-01-17 23:40:33 +09:00
Hajime Hoshi
6ed4bbc0a2
ui: Fix comments
2019-01-13 22:51:24 +09:00
Hajime Hoshi
607186859d
ui: Run returns immediately on GopherJS
...
Fixes #778
2019-01-13 22:16:33 +09:00
Hajime Hoshi
ae84e79d16
ui: Add IsWindowResizable and SetWindowResizable (again)
...
Fixes #320
2019-01-09 00:24:16 +09:00
Hajime Hoshi
e24f6b7848
graphicsdriver/opengl: Rename GetDriver -> Get
2018-11-13 00:01:26 +09:00
Hajime Hoshi
241716d0e6
Add package graphicsdriver; Move opengl to graphicsdriver/opengl
2018-11-10 22:52:37 +09:00
Hajime Hoshi
07ae1db0dd
opengl: Add Driver
2018-11-07 01:43:07 +09:00
Hajime Hoshi
4090258904
opengl: Remove Init (except for mobile)
2018-11-05 00:21:39 +09:00
Hajime Hoshi
7e29a81177
ui: Refactoring
2018-10-14 18:28:27 +09:00
Hajime Hoshi
b56061281d
ui: Add comments
2018-10-13 22:41:21 +09:00
Hajime Hoshi
a073f48faf
input: Bug fix: keypress event were not fired
...
This change suspends to 'preventDefault' on keydown events.
Now preventing navigation by pressing backspace is deprecated in
Chrome. For other keys, it looks like keyup's preventDefault is
enough to disable the browser default behavior.
2018-10-13 19:18:13 +09:00
Hajime Hoshi
c758a1f8c6
ui: Rename MonitorSize -> ScreenSizeInFullscreen ( #708 )
2018-10-09 23:42:03 +09:00
Hajime Hoshi
f6c2d899f1
ui: Bug fix: compile error on browsers and mobiles
2018-10-08 01:26:05 +09:00
Hajime Hoshi
16a9bac487
ui: Remove deviceScale struct
2018-10-08 01:03:18 +09:00
Hajime Hoshi
c494b53822
ui: Refactoring: Add deviceScale struct
2018-10-02 23:06:56 +09:00
Hajime Hoshi
635d624b77
ui: Update device scale on browsers ( #644 )
2018-10-02 11:43:45 +09:00
Hajime Hoshi
803e42714e
input: Implement wheel event on browsers
...
Fixes #630
2018-09-30 17:08:18 +09:00
Hajime Hoshi
09c93ac86d
ui: Avoid using eval
2018-07-14 23:47:31 +09:00