changeset 426:275e0b4bd571

Increment by 5.
author Simon Cross <hodgestar@gmail.com>
date Sat, 07 Sep 2013 13:34:55 +0200
parents 1a85044f81a8
children c0264b247326
files tools/area_editor.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tools/area_editor.py	Sat Sep 07 13:34:01 2013 +0200
+++ b/tools/area_editor.py	Sat Sep 07 13:34:55 2013 +0200
@@ -426,6 +426,8 @@
 
     def inc_grid_size(self, amount):
         self.grid_size = max(1, self.grid_size + amount)
+        if self.grid_size > 1:
+            self.grid_size = self.grid_size - (self.grid_size % 5)
 
     def snap_to_grid(self, pos):
         x = pos[0] - (pos[0] % self.grid_size)
@@ -882,11 +884,11 @@
         grid_size_label.rect.move_ip(MENU_LEFT, y)
         widgets.append(grid_size_label)
         y += grid_size_label.rect.height + MENU_PAD
-        inc_snap_but = SnapButton(grid_size_label, self, 1)
+        inc_snap_but = SnapButton(grid_size_label, self, 5)
         inc_snap_but.rect = HALF_BUTTON_RECT.copy()
         inc_snap_but.rect.move_ip(MENU_LEFT, y)
         widgets.append(inc_snap_but)
-        dec_snap_but = SnapButton(grid_size_label, self, -1)
+        dec_snap_but = SnapButton(grid_size_label, self, -5)
         dec_snap_but.rect = HALF_BUTTON_RECT.copy()
         dec_snap_but.rect.move_ip(
             MENU_LEFT + MENU_HALF_WIDTH, y)