Finally have the mouse cursor sticking to the scrollbar grip.
Working on a panel with scrollbars. so far so good needs some adjustments, but it has functionality.
I have been playing more and more with the pixel game library. More and more I want some controls to use in my development. Simple buttons or checkboxes. I have started a library of my own for just such a task. It is in the very early stages, but I am having fun building it so far.
So far I have buttons and checkboxes and would like to build on that. I would like dropdowns and a file dialog. I will work away in my spare time and I am making good progress. Not enough to make public, soon when I have enough code that will be the idea.
Here are some screenshots of buttons and checkboxes:
Writing a function to make sure text always fits the control.
Stay tuned, I will try to update my progress as I go.
global.Text struct helps us pin-point the position of our text. This will help when trying to place labels on controls.
global.Text does not have a matrix, it will always start at
pixel.ZV the zero vector. In the examples below the cross hair is
There is also a method called
Shorten(r pixel.Rect), this menthod will shorten text to fit a rectangle, as you can see in the images above
Width 3 p... is long text but it was shortened and
... is the indicator that this line was shortened. The other lines fit the rectangle without the need to be shortened.