This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Object | |
class_name NodeUtils | |
static func get_child_by_class(node : Node, child_class : String, counter : int = 1) -> Node: | |
var match_counter = 0 | |
var node_children = node.get_children() | |
for child in node_children: | |
if (child.get_class() == child_class): | |
match_counter += 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import random | |
from itertools import chain | |
from kivy.uix.effectwidget import AdvancedEffectBase | |
from kivy.animation import Animation | |
from kivy.clock import Clock | |
from kivy.properties import ListProperty | |
from kivy.core.window import Window | |
Window.size = 300, 400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.uix.dropdown import DropDown | |
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy.properties import NumericProperty | |
from kivy.animation import Animation | |
KV = ''' | |
FloatLayout: | |
Spinner: | |
dropdown_cls: 'SlowDown' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
import inspect | |
import itertools | |
import typing | |
class Arg(typing.NamedTuple): | |
name: str | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__all__ = ('get_tree_from_widget', 'get_tree_from_root_rule', 'get_tree_from_cls', ) | |
from kivy.lang import Parser, Builder, BuilderBase | |
from kivy.factory import Factory | |
def _get_children(rule): | |
return [{crule.name: _get_children(crule)} for crule in rule.children] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
from kivy.base import runTouchApp | |
from kivy.lang import Builder | |
from kivy.uix.widget import Widget | |
from kivy.properties import ListProperty | |
from kivy.core.window import Window | |
from colorsys import hls_to_rgb | |
class ColourApp(App): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import sample, randint | |
from string import ascii_lowercase | |
from time import asctime | |
from kivy.app import App | |
from kivy.factory import Factory | |
from kivy.lang import Builder | |
from kivy.properties import NumericProperty, ListProperty | |
from kivy.clock import Clock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from array import array | |
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy.graphics.fbo import Fbo | |
from kivy.graphics.texture import Texture | |
from kivy.uix.widget import Widget | |
from kivy.properties import ListProperty, ObjectProperty | |
KV = ''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy.clock import Clock | |
from kivy.properties import ListProperty | |
from kivy.animation import Animation | |
KV = ''' | |
#:import RGBA kivy.utils.rgba | |
<ImageButton@ButtonBehavior+Image>: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.lang import Builder | |
from kivy.app import App | |
from kivy.properties import ListProperty, NumericProperty | |
KV = ''' | |
#:import RGBA kivy.utils.rgba | |
<Row@BoxLayout>: | |
text: '' | |
rv_key: 0 |
NewerOlder