ScreenManager – selecting colors for the figures
The ScreenManager
class lets us handle different screens in the same window. In Kivy, screens are preferred over windows, because we are programming for different devices with different screen sizes. Therefore, it is difficult (if not impossible) to have windows that adapt properly to all devices. Just imagine yourself juggling windows with your fingers on your mobile phone.
So far, all our figures have been of the same color. Let's allow the user to add some color to make the Comic Creator more versatile. Kivy provides us with a Widget
called ColorPicker
, which is displayed in the following screenshot:
As you can see, this Widget
requires a wide space, so it would be difficult to accommodate it in our current interface.
Tip
There is a bug in Kivy 1.9.0 that prevents ColorPicker
from working in Python 3 (it is already fixed in the development version 1.9.1-dev, which is available at https://github.com/kivy/kivy/). You can use Python 2, or there...