19 lines
435 B
Python
Executable file
19 lines
435 B
Python
Executable file
def generate_grid_positions(num_items):
|
|
positions = []
|
|
start_x = 395
|
|
start_y = 90
|
|
button_width = 185
|
|
button_height = 75
|
|
h_spacing = 10
|
|
v_spacing = 105
|
|
|
|
for i in range(num_items):
|
|
col = i % 2
|
|
row = i // 2
|
|
|
|
x = start_x + (col * (button_width + h_spacing))
|
|
y = start_y + (row * v_spacing)
|
|
|
|
positions.append((x, y, button_width, button_height))
|
|
|
|
return positions
|