henryksloan / sugarcubes

A library and tool for automata and formal languages, inspired by JFLAP
https://henryksloan.github.io/sugarcubes/
GNU Affero General Public License v3.0
26 stars 2 forks source link

Context menu for state editing #5

Closed henryksloan closed 3 years ago

henryksloan commented 3 years ago

Right-clicking a state now opens up a context menu with checkboxes to toggle a state being initial or final, and a button to delete the state. Implementing this also required expanding the Automaton API (and the underlying TransitionSet API) to allow removing states.

This PR also fixes minor bugs. Now, clicks overlapping the egui TopPanel (as well as the context menu) will not register as a click in the editor screen.