Skip to Content
Kivy - Interactive Applications and Games in Python
book

Kivy - Interactive Applications and Games in Python

by Roberto Ulloa
June 2015
Intermediate to advanced
206 pages
4h 32m
English
Packt Publishing
Content preview from Kivy - Interactive Applications and Games in Python

Factory – replacing a vertex instruction

This final section of this chapter teaches a valuable trick to change the default properties of the vertex instructions. We want to change the width of all the lines on our interface. This includes the circles, lines, and stickmen. Of course, we could revisit all the classes that create the Line vertex instructions (remember that the circles are also Line instances, and the stickmen are composed of Line instances as well), and change the width property in all of them. Needless to say, that would be tedious.

Instead, we will replace the default Line class. Indeed, this is equivalent to what we just did in the previous section when we changed the label and button default properties. We have a problem in that ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Creating Apps in Kivy

Creating Apps in Kivy

Dusty Phillips
Kivy Cookbook

Kivy Cookbook

Hugo Solis
Kivy Blueprints

Kivy Blueprints

Mark Vasilkov

Publisher Resources

ISBN: 9781785286926