Reader small image

You're reading from  Kivy - Interactive Applications and Games in Python

Product typeBook
Published inJun 2015
Reading LevelBeginner
Publisher
ISBN-139781785286926
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Roberto Ulloa
Roberto Ulloa
author image
Roberto Ulloa

Roberto Ulloa has a diverse academic record in multiple disciplines within the field of computer science. Currently, he is working with artificial societies as part of his PhD thesis at the University of Western Ontario. He obtained an MSc degree from the University of Costa Rica and taught programming and computer networking there. He has earned a living as a web developer, working with Python/Django and PHP/Wordpress. He collaborates with various researchers while also working on his own projects, including his blog (http://robertour.com). He constantly worries that the Internet has already become aware of itself and that we are not able to communicate with it because of the improbability of it being able to speak any of the 6,000-plus odd human languages that exist on the planet.
Read more about Roberto Ulloa

Right arrow

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...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Kivy - Interactive Applications and Games in Python
Published in: Jun 2015Publisher: ISBN-13: 9781785286926

Author (1)

author image
Roberto Ulloa

Roberto Ulloa has a diverse academic record in multiple disciplines within the field of computer science. Currently, he is working with artificial societies as part of his PhD thesis at the University of Western Ontario. He obtained an MSc degree from the University of Costa Rica and taught programming and computer networking there. He has earned a living as a web developer, working with Python/Django and PHP/Wordpress. He collaborates with various researchers while also working on his own projects, including his blog (http://robertour.com). He constantly worries that the Internet has already become aware of itself and that we are not able to communicate with it because of the improbability of it being able to speak any of the 6,000-plus odd human languages that exist on the planet.
Read more about Roberto Ulloa