snakeware

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

commit 0099622c68b6683a446bee5d1791406b64fda98f
parent 0559d8336f7a0e326dc69d660699f94d9afb67f2
Author: Josh Moore <jxm5210@g.rit.edu>
Date:   Thu,  4 Jun 2020 13:30:50 -0400

Merge pull request #66 from AdityaJ7/master

Fixed a typo in line 28 of the README.md file and added backspace button to the snakecalc
Diffstat:
MREADME.md | 2+-
Msnakewm/apps/tools/snakecalc/calc.py | 7+++++--
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md @@ -27,7 +27,7 @@ You can burn the image file to a flash drive and boot it. Instructions to run it ### QEMU -To run it snakeware on QEMU: +To run snakeware on QEMU: 1. [Download and Install QEMU](https://www.qemu.org/download/). Supports Linux, OSX, and Windows. 2. Open your terminal/command prompt. 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, @@ -92,5 +93,7 @@ class SnakeCalc(pygame_gui.elements.UIWindow): self.set_text("") elif op == "p": self.append_text(".") + elif op == "<": + self.set_text(self.textbox.html_text[:-1]) else: self.append_text(op)