Skip to content

Instantly share code, notes, and snippets.

View tshirtman's full-sized avatar

Gabriel Pettier tshirtman

View GitHub Profile
#:kivy 1.0
#:import SomeWidget main.SomeWidget
# rules for the widget
<SomeWidget>:
BoxLayout:
pos: root.pos
size: root.size
orientation: "vertical"
#!/usr/bin/env python
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty
from kivy.graphics import Color, Line
class ArrowPointer(Widget):
arrow_tip = ObjectProperty(None)
#!/usr/bin/env python
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty, NumericProperty
from kivy.lang import Builder
from kivy.animation import Animation
Builder.load_string('''
<ArrowPointer>:
canvas:
#!/usr/bin/env python
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty, NumericProperty
from kivy.lang import Builder
Builder.load_string('''
<ArrowPointer>:
canvas:
Color:
#!/usr/bin/env python
from kivy.app import App
from kivy.animation import Animation
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.button import Button
from kivy.uix.textinput import TextInput
class TestB(App):
def build(self):
self.f = FloatLayout()
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.interactive import InteractiveLauncher
class TestApp(App):
def build(self):
return FloatLayout()
i = InteractiveLauncher(TestApp())
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
package org.renpy.android;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.ActivityNotFoundException;
import android.content.pm.ActivityInfo;
import android.content.res.AssetManager;
void android_set_env(char *key, char *value) {
static JNIEnv *env = NULL;
static jclass *cls = NULL;
static jmethodID mid = NULL;
if (env == NULL) {
env = SDL_ANDROID_GetJNIEnv();
aassert(env);
cls = (*env)->FindClass(env, "org/renpy/android/SDLSurfaceView");
aassert(cls);
#: Blacklisted element from the node editor
blacklist = (
'outgoing',
'incoming',
#'default',
'property',
'auditing',
'monitoring',
#'extensionElements',
# lanes (tPartitionElement is not known)