Commit Graph

86 Commits

Author SHA1 Message Date
79be94bcbd begin refactoring to use square pixels instead of triangles, focusing on functional core first 2025-07-06 01:38:02 +01:00
78905b59f0 allow width and height to have a different number of click points 2025-02-18 11:53:28 +00:00
40c5222621 done adding ability to change different colours in both functional core and imperative shell 2024-12-30 04:32:15 +00:00
fc69a0e4c3 progress with setting rgb (add functions to set in app type) 2024-12-30 04:14:07 +00:00
5dde0517cc progress adding ability to change colour of triangle 2024-12-30 03:41:11 +00:00
b41cb87b41 fix error trying to parse rgb colour data from file (have tested the change works; error was that code was meant to parse 'b' but was parsing 'B' instead) 2024-12-29 20:27:48 +00:00
7c2cc66b5a allow loading of files with or without rgb colour data 2024-12-29 20:22:11 +00:00
43eb5f4448 add [r, g, b] field to triangle, so we can draw coloured objects (next: add ability to change current colour) 2024-12-29 20:18:29 +00:00
13682f1c6c add load functionality (but note that saving is still hardcoded right now) 2024-09-29 22:26:07 +01:00
249247b704 progress for navigqation within file browser 2024-09-29 16:08:04 +01:00
5369f84389 display currently selected file/folder in a different colour, to visually mark which one is currently being focused. 2024-09-29 12:45:13 +01:00
9d44589b9d add fileBrowserIdx field to track which item is selected in the browser 2024-09-29 12:32:11 +01:00
6846d7bd52 change spacing between letters a bit to make text more legible 2024-09-27 21:36:35 +01:00
be379e1fe0 begin drawing file browser text 2024-09-27 10:06:21 +01:00
e3ff121a35 change AppUpdate.update function to return a list, so we can return multiple messages from a single event 2024-09-27 08:27:53 +01:00
57fbf5f1aa add todo note 2024-09-25 20:34:59 +01:00
2528e67375 progress towards adding load functionality' 2024-09-25 10:17:57 +01:00
d49ac2c565 progress towards being able to load files dynamically 2024-09-25 08:08:15 +01:00
c17c573638 add new field to app type, to distinguish between modes (one mode for normal insertion/deleteion, another mode for saving, etc.) 2024-09-24 21:54:19 +01:00
92eec06f5e revert to previous style of grid 2024-09-21 14:41:47 +01:00
967dd2433e change graph lines to draw dots at clickable points rather than lines which are similar to graph paper 2024-09-21 13:23:25 +01:00
2098a4eda7 add 'numClickPoints' field to app type, and add parameter with same name to
ClickPoints.generate function
2024-09-20 21:33:35 +01:00
3472ff3c1c done adding functional-core part of arrow input (now just need to adjust a bit in the imperative shell next) 2024-09-20 14:14:07 +01:00
9ffc19ef24 progress towards supporting arrow input 2024-09-20 12:33:31 +01:00
2d817cc998 adjust app type by adding arrowX and arrowY integer fields, and subsequent refactoring, as preparation for being able to draw with arrow keys 2024-09-20 10:17:57 +01:00
80e1a68843 change ClickPoints.getMousePosition function to return indices to the click points array rather than the click points themselves; this will help adding functionality to use arrows for selecting click points later 2024-09-20 09:07:54 +01:00
415f06f0c0 address second regression mentioned in previous commit, where clicked dots are no longer visible (turns out that I removed a line during refactoring which added the triangle stage coordinates to the dot vector) 2024-09-19 18:54:32 +01:00
6a7f11efe6 address one regression, where triangles were no longer being displayed (because calculation changed) after the previous refactoring. I know of only one more regression, which is that the clicked dots do not persist after moving the mouse. 2024-09-19 17:46:40 +01:00
9153217d5f attempt a little refactoring (but note that this refactoring is untested) 2024-09-16 21:49:05 +01:00
acd68a055d code shortcut to trigger export (with <Ctrl-E>); it outputs syntatically valid .sml, but I am not sure if the output is correct as intended so it needs testing 2024-08-30 02:34:24 +01:00
da2a652506 improve parsing code slightly, with successful parsing when saved .dsc file has inconsistent spacing 2024-08-29 11:18:17 +01:00
24bc45142d slight refactoring (move pure parsing functions to functional core in a separate file) 2024-08-29 09:55:08 +01:00
e69c6b42ef done with loading file into app (loaded triangles are visible, etc.) 2024-08-29 05:38:58 +01:00
2549703dc7 verify that parsing saved file is successful 2024-08-29 05:21:04 +01:00
eb13636993 very basic saving (hardcoded file name, which is fine fow now) 2024-08-29 00:05:30 +01:00
e587c6cf73 preparation for adding new additional threads/mailboxes (namely, the file mailbox) 2024-08-28 20:11:00 +01:00
3f4c52e0d8 upload new dots to GPU when there is a window resize too 2024-08-14 21:35:01 +01:00
30dd9de17a rename 'button' (the coloured square that appears over a clickpoint) to 'dot' throughout codebase, because I may want actual buttons later 2024-08-14 21:24:46 +01:00
abddddbc9e fix minor bug when resizing (resizing caused graph to be drawn and resized, even when graph was toggled off) 2024-08-14 03:54:52 +01:00
9b639c9c53 progress towards toggling graph 2024-08-14 02:31:28 +01:00
0c76edfde2 remove graph lines vector from app type, so the vector can be garbage collected (it is not really needed) 2024-08-13 23:49:34 +01:00
6878f7fa58 a little clean up (make the ClickPoints.getClickPosition easier for callers to use, because fewer arguments need to be passed) 2024-08-13 23:38:04 +01:00
c475a06341 fix minor bug with undo (was meant to call TriangleStage.secondToVector with an initial empty vector in one case, for drawing, but mistakenly used a non-empty vector as initial) 2024-08-11 15:02:04 +01:00
541fdd877f fix minor compiler errors 2024-08-08 23:45:24 +01:00
4d0d8ef0a1 done with functional-core logic for redo (now just need to send REDO_ACTION on key callback when shortcut is pressed) 2024-08-08 23:43:38 +01:00
10b3617689 add redo stack, and adjust functions to clear it when new triangle or triangle_stage is added; when an undo function is called, the undoHd becomes the redoHd, and undo becomes undoTl, which is expected behaviour. Still need to implement REDO_ACTION though. 2024-08-08 23:10:38 +01:00
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
a53c5e1ce3 restore imperative shell 2024-08-08 05:56:20 +01:00