+ Actor("roach_management/inventory_pad", anchor=("left", "top")))
+ self._inventory_pad.pos = (TOOLBAR_LEFT_X, TOOLBAR_MID_Y)
+
+ def _add_button(self, name, anchor, inset, pos, action):
+ button = self._buttons.add(
+ ImageButton(name, anchor=anchor, action=action))
+ button.pos = inset_button(pos, inset)
+ return button
+
+ def _init_buttons(self):
+ self._add_button(
+ "roach_management/left_button", ("left", "bottom"), (1, -1),
+ self._roach_pad.bottomleft, self._roach_left)
+
+ self._add_button(
+ "roach_management/right_button", ("right", "bottom"), (-1, -1),
+ self._roach_pad.bottomright, self._roach_right)
+
+ self._add_button(
+ "roach_management/left_button", ("left", "bottom"), (1, -1),
+ self._inventory_pad.bottomleft, self._inventory_left)
+
+ self._add_button(
+ "roach_management/right_button", ("right", "bottom"), (-1, -1),
+ self._inventory_pad.bottomright, self._inventory_right)
+
+ self._add_button(
+ "roach_management/eject_button", ("right", "top"), (-1, 1),
+ (TOOLBAR_LEFT_X, TOOLBAR_TOP_Y), self._eject_roach)
+
+ def _roach_left(self):
+ print("Cycle outside roaches left.")
+
+ def _roach_right(self):
+ print("Cycle outside roaches right.")
+
+ def _inventory_left(self):
+ print("Cycle inventory left.")
+
+ def _inventory_right(self):
+ print("Cycle inventory right.")
+
+ def _eject_roach(self):
+ print("Eject roach.")