Skip to content

Improvements to Simple Test #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions examples/display_button_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
for i, filename in enumerate(fonts):
fonts[i] = cwd+"/fonts/"+filename
print(fonts)
THE_FONT = "/fonts/Chicago-12.bdf"
THE_FONT = "/fonts/Arial-12.bdf"
DISPLAY_STRING = "Button Text"

# Make the display context
Expand Down Expand Up @@ -74,29 +74,26 @@
buttons.append(button_3)

# a roundrect
button_4 = Button(x=BUTTON_MARGIN, y=BUTTON_MARGIN*2+BUTTON_HEIGHT,
button_4 = Button(x=BUTTON_MARGIN*2+BUTTON_WIDTH, y=BUTTON_MARGIN*2+BUTTON_HEIGHT,
width=BUTTON_WIDTH, height=BUTTON_HEIGHT,
label="button4", label_font=font, style=Button.ROUNDRECT)
buttons.append(button_4)

# a shadowrect
button_5 = Button(x=BUTTON_MARGIN*2+BUTTON_WIDTH, y=BUTTON_MARGIN*2+BUTTON_HEIGHT,
button_5 = Button(x=BUTTON_MARGIN*3+BUTTON_WIDTH*2, y=BUTTON_MARGIN*2+BUTTON_HEIGHT,
width=BUTTON_WIDTH, height=BUTTON_HEIGHT,
label="button5", label_font=font, style=Button.SHADOWRECT)
buttons.append(button_5)

# a shadowroundrect
button_6 = Button(x=BUTTON_MARGIN*3+2*BUTTON_WIDTH, y=BUTTON_MARGIN*2+BUTTON_HEIGHT,
button_6 = Button(x=BUTTON_MARGIN, y=BUTTON_MARGIN*3+BUTTON_HEIGHT*2,
width=BUTTON_WIDTH, height=BUTTON_HEIGHT,
label="button5", label_font=font, style=Button.SHADOWROUNDRECT)
label="button6", label_font=font, style=Button.SHADOWROUNDRECT)
buttons.append(button_6)



for b in buttons:
splash.append(b.group)


while True:
p = ts.touch_point
if p:
Expand Down