touch screen shifted again...
This commit is contained in:
parent
cff85aff3f
commit
a8f5e73a88
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
12
photobox.py
12
photobox.py
@ -231,8 +231,8 @@ def waitForBegin():
|
|||||||
|
|
||||||
# wait
|
# wait
|
||||||
pos = waitForTouch()
|
pos = waitForTouch()
|
||||||
if pos[0] > 720 and pos[1] > 400:
|
# if pos[0] > 720 and pos[1] > 400:
|
||||||
maintainance()
|
# maintainance()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -301,7 +301,7 @@ def chooseImages():
|
|||||||
img = pygame.transform.scale(img, (THUMB_WIDTH, THUMB_HEIGHT))
|
img = pygame.transform.scale(img, (THUMB_WIDTH, THUMB_HEIGHT))
|
||||||
rect = img.get_rect()
|
rect = img.get_rect()
|
||||||
rect.x = x
|
rect.x = x
|
||||||
rect.y = 146
|
rect.y = 120
|
||||||
|
|
||||||
img_tmp.append(img)
|
img_tmp.append(img)
|
||||||
rect_tmp.append(rect)
|
rect_tmp.append(rect)
|
||||||
@ -337,7 +337,7 @@ def chooseImages():
|
|||||||
(img, rect) = gfx["no"]
|
(img, rect) = gfx["no"]
|
||||||
|
|
||||||
rect.x = x + (THUMB_WIDTH - rect.width) / 2
|
rect.x = x + (THUMB_WIDTH - rect.width) / 2
|
||||||
rect.y = 340
|
rect.y = 300
|
||||||
screen.blit(img, rect)
|
screen.blit(img, rect)
|
||||||
|
|
||||||
x = x + THUMB_WIDTH + BORDER
|
x = x + THUMB_WIDTH + BORDER
|
||||||
@ -347,13 +347,13 @@ def chooseImages():
|
|||||||
|
|
||||||
# wait for new event (touch screen / mouse / keyboard)
|
# wait for new event (touch screen / mouse / keyboard)
|
||||||
pos = waitForTouch()
|
pos = waitForTouch()
|
||||||
if pos[1] > 140:
|
if pos[1] < 400:
|
||||||
# toggle image
|
# toggle image
|
||||||
i = int(floor((pos[0] - BORDER / 2) / (THUMB_WIDTH + BORDER)))
|
i = int(floor((pos[0] - BORDER / 2) / (THUMB_WIDTH + BORDER)))
|
||||||
if i >= 0 and i < SHOT_COUNT:
|
if i >= 0 and i < SHOT_COUNT:
|
||||||
choices[i] = (choices[i] + 1) % 2
|
choices[i] = (choices[i] + 1) % 2
|
||||||
|
|
||||||
elif pos[1] < 100:
|
elif pos[1] > 420:
|
||||||
# top menu buttons
|
# top menu buttons
|
||||||
if pos[0] > 0 and pos[0] < 266:
|
if pos[0] > 0 and pos[0] < 266:
|
||||||
cancel = True
|
cancel = True
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user