Commit Graph

11550 Commits

Author SHA1 Message Date
Émilie Feral
40392fff9c [ion] Simulator: assets declaration is common to all targets 2020-09-30 17:30:34 +02:00
Émilie Feral
815a06adad [ion] Avoid unhighlighting key when the mouse is still on it.
Distinguish with smartphones behaviour.
2020-09-30 17:30:34 +02:00
Émilie Feral
22b585057d [ion] Simulator: key layouts assets are PNG instead of JPG V (fix windows) 2020-09-30 17:30:34 +02:00
Émilie Feral
165b129385 [ion] Simulator: key layouts assets are PNG instead of JPG IV (fix linux) 2020-09-30 17:30:34 +02:00
Émilie Feral
1946c68ef8 [ion] Simulator: key layouts assets are PNG instead of JPG III (fix ios) 2020-09-30 17:30:34 +02:00
Émilie Feral
d2632bff4f [ion] Simulator: key layouts assets are PNG instead of JPG II (fix
android)
2020-09-30 17:30:34 +02:00
Émilie Feral
d4b7b6baf0 [ion] Simulator: key layouts assets are PNG instead of JPG I (fix macos) 2020-09-30 17:30:34 +02:00
Émilie Feral
11236c67cb [ion] Improve key positions 2020-09-30 17:30:34 +02:00
Émilie Feral
0b114abb95 [ion] Simulator windows: fix pixel format typo 2020-09-30 17:30:34 +02:00
Émilie Feral
8000ff733e [ion] Simulator: improve key center positions 2020-09-30 17:30:34 +02:00
Émilie Feral
8b5caeb394 [ion] IonSimulatorLoadImage returns a Texture (otherwise the pixels data
which needs to be deleted when freeing the surface is hard to retrieve)
2020-09-30 17:30:34 +02:00
Émilie Feral
02b648e36d [ion] IonSimulatorLoadImage returns a surface instead of a texture: this
way we can set a transparent color key before turning it into a texture.
2020-09-30 17:30:34 +02:00
Émilie Feral
674703f4dc [ion] Missing include 2020-09-30 17:30:34 +02:00
Émilie Feral
64bcbd708a [ion] Linux: fix images: get the asset addresses instead of consecutive
table addresses
2020-09-30 17:30:34 +02:00
Émilie Feral
2236dcdbed [ion] Fix: unhighlight the key on mouse up event (when you clicked on the key
on a smartphone, you want the key to be deselected)
2020-09-30 17:30:34 +02:00
Émilie Feral
af544a95d1 [ion] Windows: IonSimulatorLoadImage can now load any resource. Enable
to use key layouts jpg files in C/C++ code.
2020-09-30 17:30:34 +02:00
Émilie Feral
22250b4234 [ion] linux: enable to use key layouts jpg files in C/C++ code 2020-09-30 17:30:34 +02:00
Émilie Feral
a27122802d [ion] Macos Makefile: add depencies on keys layouts jpg images 2020-09-30 17:30:34 +02:00
Émilie Feral
ad1ef783ce [ion][escher] Revert previous commit: move inliner back to escher 2020-09-30 17:30:34 +02:00
Émilie Feral
4ae39f56fd [ion] Simulator: Layout uses jpg images instead of image built by the
inliner
2020-09-30 17:30:34 +02:00
Émilie Feral
652d2e6bac TODOs 2020-09-30 17:30:34 +02:00
Émilie Feral
50031c4836 [ion] Unhighlight the key on mouse up event (when you clicked on the key
on a smartphone, you want the key to be deselected)
2020-09-30 17:30:34 +02:00
Émilie Feral
ef363c57ac [ion] Reset the highlighted key once it has been drawn 2020-09-30 17:30:34 +02:00
Émilie Feral
ded2174578 [ion] simulator/shared: fix macro EPSILON_SDL_SCREEN_ONLY 2020-09-30 17:30:34 +02:00
Émilie Feral
c5add52e61 [ion] simulator: move key_layouts to ion/src/simulator/assets 2020-09-30 17:30:34 +02:00
Émilie Feral
1ad55139b4 [ion] simulator/shared/key_layouts: udpate png files 2020-09-30 17:30:34 +02:00
Émilie Feral
db1874fdac [ion] simulator/shared/layout: update the center of keys to centered the
highlight keys
2020-09-30 17:30:34 +02:00
Émilie Feral
23a542e639 [ion/simulator/shared/layout] Round instead of truncate when converting
relative to absolute coordinates
2020-09-30 17:30:34 +02:00
Émilie Feral
a8c318f90f [ion] simulator: move background render methods to layout 2020-09-30 17:30:34 +02:00
Émilie Feral
a3ef7c9234 [ion] simulator: fix magic number in display 2020-09-30 17:30:34 +02:00
Émilie Feral
649fb0bebe [ion] Simulator: highlight keys when the mouse is over 2020-09-30 17:30:34 +02:00
Émilie Feral
94851da7f9 [ion] Add drafts of images reprensenting key shapes 2020-09-30 17:30:34 +02:00
Émilie Feral
fcf4c011cb [ion] simulator/layout: change signature of makeAbsolute 2020-09-30 17:30:34 +02:00
Émilie Feral
8f8f42edd5 [ion] simulator: add forgotten Display::quit 2020-09-30 17:30:34 +02:00
Émilie Feral
f7479e0cf5 [ion][escher] Move image inliner to ion 2020-09-30 17:30:34 +02:00
Émilie Feral
ca56ba6327 [ion] Fix include 2020-09-30 17:30:34 +02:00
Émilie Feral
158afa7a27 [ion] simulator: the key detection distance threshold is responsive to
the frame dimension
2020-09-30 17:30:34 +02:00
Léa Saviot
b020cb2f98 [ion/simulator] Add haptic feedback 2020-09-30 17:30:34 +02:00
Émilie Feral
1c0f6a7913 [ion] Keyboard: don't detect a key down when the mouse is too far away
from a key
2020-09-30 17:30:34 +02:00
Émilie Feral
4c41b1699d [docs] Add/remove dependencies in windows SDK 2020-09-03 15:36:21 +02:00
Gabriel Ozouf
b7c7695707 [apps/code] Remove interruption check
A check for interruption in ConsoleController::printText caused script
to immediately stop when launched after an interrupted script.
This check was used to break out of infinite print loop, but now
becomes redundant with how micropython_port_vm_hook_loop was changed.

Change-Id: Ifa8d415e1b2c2406ad67300eb14ce46889af296f
2020-08-31 15:32:02 +02:00
Gabriel Ozouf
7dcf1662b0 [python/helpers] Change interrupt check delay
Keyboard interruption used to be checked once every 20000 calls to
micropython_port_vm_hook_loop. However, if costly functions were
executed in between calls to this method, the delay for activating
interruptions would increase.
Now, keyboard interruption is checked after a fixed amount of time has
passed. This way, if the process waits a long time between two calls
to micropython_port_vm_hook_loop, it is still interrupted in a timely
manner.

Change-Id: I37ca3bd4a996fa086078f504340dd857526e356a
2020-08-31 15:32:02 +02:00
Gabriel Ozouf
34ebf1e6e0 [python/kandinsky] Remove additional interrupt
Additional checks for interruptions were making the kandinsky module
slower.
/!\ Some scripts are now very difficult to interrupt

Change-Id: I4c18273d8895deaac68084411a52556c8459d52b
2020-08-31 15:32:02 +02:00
Gabriel Ozouf
0a493d1f34 [kandinsky/color] Update comment on blend method
Change-Id: I5fb68608657d2f604c8cb7c9294382ed4a8603ff
2020-08-25 15:51:58 +02:00
Gabriel Ozouf
e33543aacb [kandinsky/color] Add tests on color blending
Change-Id: If1792bd9ec44052238632d28b806f5582b190fe9
2020-08-25 15:51:58 +02:00
Gabriel Ozouf
078bba2fb9 [kandinsky/color] Fix blend method
When computing the barycenter between two colors, the some of the two
factors a and (1-a) was equal to 255/256 instead of 1.

Change-Id: Ia9a779d43470ef42d9430ad730e842da0f007140
2020-08-25 15:51:58 +02:00
Gabriel Ozouf
38e15da5d0 [kandinsky/color] Blend identical colors
KDColor::blend used to produce different colors when blending two
identical colors (ex : use draw_string in Python to print white text on
a white background).
blend now escapes early when its two color arguments are identical.

Change-Id: I01dc5a0d5e4e6a20e09fee0f346dafc313dae97b
2020-08-25 15:51:58 +02:00
Joachim Le Fournis
d154611023 [Ion] Fix broken link 2020-08-24 16:37:03 -04:00
Hugo Saint-Vignes
7eb694822d [python] Add magenta color
Change-Id: I7a5e12f6f3d79da802149a6aeef88387941ccdd8
2020-08-11 17:08:23 +02:00
Hugo Saint-Vignes
0b683b6994 [apps/shared] Handle identical layout in MinimalSizeForOptimalDisplay
Change-Id: I99a523e9e88ea9c3064e4367d96b01edb0020df9
2020-08-11 17:06:07 +02:00