Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bugfix: propagate mouse press if any button would | Kartik K. Agaram | 2022-08-24 | 1 | -4/+6 |
| | | | | | Before this commit I was propagating press events only if _all_ buttons would. | ||||
* | pass all button params to the icon | Kartik K. Agaram | 2022-08-23 | 1 | -1/+1 |
| | |||||
* | allow buttons to nest as well | Kartik K. Agaram | 2022-08-23 | 1 | -2/+11 |
| | |||||
* | flip return value of button handlers | Kartik K. Agaram | 2022-08-23 | 1 | -4/+3 |
| | | | | | | This is compatible with Javascript, and it also seems like a better default; when people forget to think about return values in click handlers, they should be consumed. | ||||
* | stop putting button state in a global | Kartik K. Agaram | 2022-08-23 | 1 | -6/+10 |
| | | | | | | | | | | | | | | | | Symptom: a test (test_click_to_create_drawing) started randomly failing after I inserted a `return` 2 commits ago. Cause: my tests call edit.draw, but button handlers only get cleared in app.draw. So my tests weren't clearing button handlers, and every call to edit.draw was accumulating states. Still unclear why those were going to different state objects after the `return`, but anyway. I'm not going to understand every last thing that happens when things go wrong, just guarantee they can't go wrong. And the way to do that is to decentralize button handlers to each state that receives them. The State object in buttons.lua doesn't have to be Editor_state. It just has to be some table that provides a Schelling Point for shared state. | ||||
* | improve explanation for buttons | Kartik K. Agaram | 2022-08-23 | 1 | -1/+4 |
| | |||||
* | allow buttons to interrupt events | Kartik K. Agaram | 2022-08-23 | 1 | -1/+1 |
| | | | | Most button onpress1 handlers will want to return true. | ||||
* | indent | Kartik K. Agaram | 2022-08-23 | 1 | -1/+3 |
| | |||||
* | highlight another global | Kartik K. Agaram | 2022-05-17 | 1 | -3/+3 |
| | |||||
* | . | Kartik K. Agaram | 2022-05-17 | 1 | -2/+4 |
| | |||||
* | fix a typo | Kartik K. Agaram | 2022-05-12 | 1 | -1/+1 |
| | |||||
* | intermingle freehand line drawings with text | Kartik K. Agaram | 2022-05-11 | 1 | -0/+18 |