kivy

How to rotate two rectangle widgets independently on single screen in kivy?

淺唱寂寞╮ 提交于 2020-01-22 02:30:09
问题 I am learning programming in python and working on one simple gaming application in which I need to rotate two rectangles on click on them on single screen but what's happening is when I am clicking on one of them both the rectangles rotate along the origin of that rectangle that is being clicked but this is not the case with another rectangle, in fact its position is not also that that is supposed to be and when clicking on the assigned position(where that rectangle is not present) it gets

Python3 编译安卓程序

自古美人都是妖i 提交于 2020-01-18 00:46:10
1 找了很久资料,先记录下,不一定可行,平台windows 7。 2 需要的环境: 2.1 kivy的安装 pip install kivy python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew pip install kivyGarden 注:第三个其实我也不知道需不需要,只是cmd装了第一个,在pycharm运行不了,就换做pycharm来装kivy就好了,后来发现多了个这。 3 这个,应该就可以跑起来了。源码来自开源项目 kb ,下面是2048的源码 from __future__ import division import random from kivy . animation import Animation from kivy . app import App from kivy . core . window import Window , Keyboard from kivy . graphics import Color , BorderImage from kivy . properties import ListProperty , NumericProperty from kivy . uix . widget import Widget from

Kivy Digital Clock Issues

。_饼干妹妹 提交于 2020-01-17 13:59:08
问题 I'm trying to add a digital clock to my Kivy program, it seems to be having trouble. Here is the .py: import kivy kivy.require('1.10.0') from kivy.lang import Builder from kivy.uix.screenmanager import ScreenManager, Screen, FadeTransition from kivy.app import App from kivy.uix.label import Label from kivy.uix.image import Image from kivy.uix.floatlayout import FloatLayout from kivy.uix.stacklayout import StackLayout from kivy.clock import Clock from kivy.properties import ObjectProperty from

Kivy-designer is not working

痞子三分冷 提交于 2020-01-17 08:34:11
问题 I'm using a kivy over pycharm. I want to install a kivy designer to take advantage of Kivy's visual interface features. I installed the kivydesigner as written in the document with python3 but when I run it, I get an error like the following below ; the popup comes on the screen and closes immediately. Thank you in advance for your help. stranger@paradise-citys-grasses:~/kivy-designer$ python3 -m designer [INFO ] [Logger ] Record log in /home/stranger/.kivy/logs/kivy_17-09-29_72.txt [INFO ]

using bangla language in label text of kivy app

我们两清 提交于 2020-01-17 01:17:05
问题 i want to add bangla text in a label. im using several font for this. here i used kalpurush.ttf. the bangla text is showing well. but some problem with sequence of bangla letter. i wrote "তিন আস্তানা মাস্তান"। but it shows- "ত িন আসতানা মাসতান" its not showing the conjunct word also. and "ি" sign should be before "ত" but here its after. I'm using pydroid app. in kivy launcher when i use any other font than english it just crashes. so kivy launcher doesnt support any other font. i just want to

Buildozer Unsigned Release APK Saved in Windows Folder, Now Need to Zipalign and Sign It, Windows Environment

懵懂的女人 提交于 2020-01-16 14:07:52
问题 My progress thus far: Built an unsigned release APK with Kivy Buildozer VM, command: "buildozer android release". Moved that APK to a Dropbox folder. Installed Android Studio. Read several bits here, here and here, but could not get any of the commands to work from my Windows command prompt. And that's the whole of it. Several video and text tutorials later, and not one gave a clear-cut, step-by-step process of how to take an already built, unsigned APK and zipalign and sign it. Most assume

Buildozer Unsigned Release APK Saved in Windows Folder, Now Need to Zipalign and Sign It, Windows Environment

允我心安 提交于 2020-01-16 14:07:11
问题 My progress thus far: Built an unsigned release APK with Kivy Buildozer VM, command: "buildozer android release". Moved that APK to a Dropbox folder. Installed Android Studio. Read several bits here, here and here, but could not get any of the commands to work from my Windows command prompt. And that's the whole of it. Several video and text tutorials later, and not one gave a clear-cut, step-by-step process of how to take an already built, unsigned APK and zipalign and sign it. Most assume

Error: In _update_shadow self._shadow = App.get_running_app().theme_cls.quad_shadow

ぃ、小莉子 提交于 2020-01-16 10:34:08
问题 I'm working in Kivy and KivyMD to build a GUI for a login function. My GUI works fine with Kivy code, but the second I change a Button to an MDRaisedButton, I get these two errors (full error code further below): AttributeError: 'NoneType' object has no attribute 'theme_cls' line 118, in _update_shadow self._shadow = App.get_running_app().theme_cls.quad_shadow I'm curious to know if anyone else can pinpoint the problem, and explain it to me. Thank you! I spent the past 8 hours rebuilding the

Kivy: Check if a function is already scheduled

北城余情 提交于 2020-01-16 07:03:10
问题 Is there a way to check if a function has been scheduled already? I was looking at the Clock methods but didn't see anything I could use. I am trying to avoid a rescheduling( Clock.unschedule(func) -> Clock.schedule_interval(func, dt) ) of a function unless it is already scheduled to begin with. 回答1: You can use kivy.clock.Clock.get_events() to get the list of scheduled events: from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.lang import Builder Builder.load_string(

Why do I need to create a new instance of a Line instead of simply update or add and remove it in Kivy

强颜欢笑 提交于 2020-01-16 06:51:07
问题 I am attempting to draw a line with the mouse by dragging from one point to another point of the window. I also want to represent the line while I am dragging. Like drawing a line in an old MS PaintBrush. My problem is that I have only been able to achieve this by constantly removing the old Line and adding a new Vertex Instruction to the canvas. However, I cannot update existing instructions. Not even adding and removing the same instruction. It has to be a new instance of Line. You can see