Some minor changes in the library required changes in the example. (Ocemp GUI is alpha, and API changes are to be expected.**see second comment) The list-change signal was renamed, and the mouse signals now pass the pygame mouse event in addition to the connect method parameters.

ocemp2.png

I changed several widgets to use SIG_TOGGLE in lieu of SIG_CLICK since the click signal was acting too early, before the button/checkbox state had been set, and thus the wrong state was read. The toggle signal acts after state is set.

The new ImageMap widget allowed me to add an image map to the example; this was the last unimplemented feature of the example. Actually, now that the mouse signals include the event, any button could be used as an image map. The ImageMap widget does the job nicely, using an image file for the background of the map, and adding a thin border.

The example is no longer a single file, requiring a separate theme file and the image map file. The theme file brings the color scheme in line with the example template. I did not remember to change the font size (headers and subheads should be larger than labels), but that is doable, and documented in the manual. I may add that later.

Advertisements