Commit Graph

31 Commits

Author SHA1 Message Date
4243e4c679 refactor a little bit, making signature of app-update.sml simpler to use by storing mouseX and mouseY inside the app_type 2024-08-08 21:58:50 +01:00
89f4ae3b13 undo implemented and working fine 2024-08-08 21:35:48 +01:00
5c7c61586a scaffolding in preparation for implementing undo 2024-08-08 06:34:40 +01:00
d9607d27d8 done refactoring functional core 2024-08-08 00:58:59 +01:00
2dd0ec5c66 additional refactoring (almost 100/home/humza/Downloads/sml/dotscape/dotscape.mlb done refactoring functional core) 2024-08-08 00:50:36 +01:00
894dca2017 begin refactoring 2024-08-08 00:18:03 +01:00
ea5bbe2075 change clickable range 2024-08-06 07:38:46 +01:00
7a6722cf60 done with resize functionality 2024-08-03 07:10:38 +01:00
ee2274ffbc improve generated graph lines, so it aligns perfectly with clickPoints (but there are two 'todo' notes: one when the height is greather than the width, and also the constant vector when the program starts is an empty vector) 2024-08-03 04:40:53 +01:00
6c444696d4 progress with resizing (triangle and button are always horizontally centred if windowWidth is greater than windowHeight, or windowHeight is greather than windowWidth) 2024-08-02 13:35:48 +01:00
7a584fea3c progress towards resizing 2024-08-02 12:46:00 +01:00
cff2b4f8df progress towards resizing 2024-08-02 05:58:22 +01:00
98f6c63b05 correctly generate click points dynamically, even when window resolution is not a square 2024-08-02 03:09:59 +01:00
b01637ba3b a little refactoring 2024-08-02 00:05:24 +01:00
13063ea2c6 add framebufferSize callback (FFI scaffolding and creating new variant of input_message type but don't react to this message in a meaningful way yet) 2024-08-01 23:33:54 +01:00
c5d9ed4c69 add clickPoints to app-type so we are able to change those points at runtime 2024-08-01 21:39:09 +01:00
0fc6201231 reduce number of type conversoins required for mouse move callback (and fix the other code which uses it too) 2024-08-01 21:17:39 +01:00
818503d0ac formatting 2024-07-31 22:28:42 +01:00
16fa1e49af get drawing of triangles implemented 2024-07-31 22:25:15 +01:00
cf38d160d5 minor optimisation (do not have to branch on NO_TRIANGLE | FIRST | SECOND twice in update function; update function was branching on this itself, and call to 'getTriangleStageVector' was branching again which was redundant) 2024-07-31 21:21:45 +01:00
6e6de41889 keep triangle stages (clicked positions) drawn on screen, until triangle stages resets to NO_TRIANGLE 2024-07-31 21:15:39 +01:00
bd41e7d24d code function to turn work-in-progress triangle (of triangle_stage of) into a square, so user can see where they have already clicked 2024-07-31 20:58:33 +01:00
087998ac6b return normalised device coordinates together with vector, from getClickPos function 2024-07-31 14:52:12 +01:00
a2c499c933 a bit of fiddling to support different resolutions (as long as aspect ratio of window is 1:1) 2024-07-31 14:02:23 +01:00
d90ed8afa2 minor improvement (using vector literals in 'helpGetTrianglesVector', which is in functional-core/app-update.sml 2024-07-31 13:34:10 +01:00
95345131ab refinements to 'getClickPos' function (and helper functions) in app-update.sml 2024-07-31 13:32:22 +01:00
6a2fe3ed18 a bit of formatting (no other changes in this commit) 2024-07-31 12:30:12 +01:00
29793cccbe refactoring and scaffolding 2024-07-31 12:00:07 +01:00
b1b929e055 add function which generates a drawable vector given a mouse position 2024-07-30 19:30:59 +01:00
b8ab605c90 code function that indicates which area, if any, was clicked 2024-07-30 19:04:36 +01:00
e97768b18a add callbacks for mouse movement and mouse clicking 2024-07-30 17:10:48 +01:00