snakeware

Python-based Linux distro for x86-64 and RPi
git clone git://squid-tech.com/snakeware.git
Log | Files | Refs | README

commit fe468130d1d5019c78ca3bdbc4b105371b4baf7e
parent 4a821c2a0dc7762c4ab35053286f5e23125386d0
Author: Tim <4258783+dargonforce@users.noreply.github.com>
Date:   Fri,  5 Jun 2020 11:13:33 -0400

Merge pull request #73 from AdityaJ7/master

Added pi button to the snakecalc and updated the screenshot image
Diffstat:
Mscreenshot.png | 0
Msnakewm/apps/tools/snakecalc/calc.py | 7+++++--
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/screenshot.png b/screenshot.png Binary files differ. diff --git a/snakewm/apps/tools/snakecalc/calc.py b/snakewm/apps/tools/snakecalc/calc.py @@ -4,7 +4,7 @@ import pygame_gui class SnakeCalc(pygame_gui.elements.UIWindow): # operations to be converted to buttons - OPS = "789+" "456-" "123*" "p0=/" "C<" + OPS = "789+" "456-" "123*" "p0=/" "C<π" # button dimensions BSIZE = (67, 75) @@ -43,7 +43,8 @@ class SnakeCalc(pygame_gui.elements.UIWindow): pygame_gui.elements.UIButton( relative_rect=pygame.Rect( - (i % 4 * self.BSIZE[0], 40 + int(i / 4) * self.BSIZE[1]), self.BSIZE + (i % 4 * self.BSIZE[0], 40 + int(i / 4) + * self.BSIZE[1]), self.BSIZE ), text="." if op == "p" else op, manager=manager, @@ -94,5 +95,7 @@ class SnakeCalc(pygame_gui.elements.UIWindow): self.append_text(".") elif op == "<": self.set_text(self.textbox.html_text[:-1]) + elif op == "π": + self.set_text("3.14") else: self.append_text(op)