Book Image

Kivy - Interactive Applications and Games in Python

By : Roberto Ulloa
Book Image

Kivy - Interactive Applications and Games in Python

By: Roberto Ulloa

Overview of this book

Table of Contents (13 chapters)
Kivy – Interactive Applications and Games in Python Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Style – decorating the interface


In this section, we will redecorate our interface to improve the look and feel of it. With very few strategic changes, we will completely renovate the way our application looks with a few steps. Let's start changing the background color from black to white. We will do this in the comicreator.py file, and here is its new header:

326. # File name: comiccreator.py
327. import kivy
328. from kivy.app import App
329. from kivy.lang import Builder
330. from kivy.uix.screenmanager import ScreenManager
331. from kivy.core.window import Window
332. 
333. Window.clearcolor = (1, 1, 1, 1)
334. 
335. Builder.load_file('style.kv')

We imported the Window class that manages the configurations of the application window, and controls some global parameters and events, such as the keyboard events, which will be covered in Chapter 5, Invaders Revenge – an Interactive Multitouch Game. We use the Window class to change the background color of the application to white with the clearcolor...