You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

49m 37s logged

Adding Licence Information

The main feature of this session was to add a popup box bound to “l” that displays the licence info. I opted to use the short licence info text that was designed to be at the top of source files, as I won’t have a popup on startup, and having multiple commands is not very user friendly. To go along with another bound command, I added the Footer widget to all menus, as it lists avaliabel commands. I also added licence comments to the top of my source files, including the dart files on the main branch.

The Licence Box

The texutal docs explain that the ModalScreen class can be used as the base of a popup message. Some tcss is used to centre and align everything; this took multiple attempts to figure out where in the container hierarchy to put the align properties. You can see that the button on the bottom is still not centred, but after failing for a bit, I decided that it looks fine. Another UI element to revisit later?

Binding the Box

I bound the box to “l”, as it makes sense for “licence”. i spent a little bit trying to figure out why the hotkey didn’t do anyhting; turns out it was a typo. It appears textual does not throw an error if you bind a function that does not exist to a key, maybe because you pass a string to it not ana actual function. Another feature I added was to make “l” close the popup box; whatever screen is on top takes priority.

0
1

Comments 0

No comments yet. Be the first!