snakeware

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

commit c9e5617417a377dade59240fcba6fd332d1961a1
parent 438450a85a013815c521b4bd20b64212d649f0c0
Author: Josh Moore <jxm5210@g.rit.edu>
Date:   Fri,  5 Jun 2020 12:51:04 -0400

Merge pull request #70 from mochidaz/master

Added modulo operator to snakecalc
Diffstat:
Msnakewm/apps/tools/clock/clock.py | 3++-
Msnakewm/apps/tools/snakecalc/calc.py | 4+++-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/snakewm/apps/tools/clock/clock.py b/snakewm/apps/tools/clock/clock.py @@ -41,4 +41,4 @@ class SnakeClock(pygame_gui.elements.UIWindow): def set_text(self, text): self.textbox.html_text = text - self.textbox.rebuild() + self.textbox.rebuild()+ \ No newline at end of file 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<x%" # button dimensions BSIZE = (67, 75) @@ -67,6 +67,7 @@ class SnakeCalc(pygame_gui.elements.UIWindow): self.textbox.html_text = self.textbox.html_text + text self.textbox.rebuild() + def calculate(self, expression): """ Perform the actual calculation based on user input. @@ -80,6 +81,7 @@ class SnakeCalc(pygame_gui.elements.UIWindow): self.set_text(result) + def input_op(self, op): """ Called to append user input ops to the existing input.