class Item:
- def __init__(self, world, plane_node, count, cb_inst, curr_bottom, model_path):
+ def __init__(self, world, plane_node, count, cb_inst, curr_bottom, scene_repos, model_path):
self._world = world
self._plane_node = plane_node
self._count = count
self._first_command = True
self.repos_done = False
self._curr_bottom = curr_bottom
+ self._scene_repos = scene_repos
self._model_path = model_path
self._commands = []
self._command_idx = -1
self._txt['pos'] = p2d
self.repos_done = True
+ def repos_x(self, x):
+ self._np.set_x(x)
+ bounds = self._np.get_tight_bounds()
+ bounds = bounds[0] - self._np.get_pos(), bounds[1] - self._np.get_pos()
+ pos = self._np.get_pos() + (bounds[1][0], bounds[0][1], bounds[0][2])
+ p2d = P3dGfxMgr.screen_coord(pos)
+ self._txt['pos'] = p2d
+
def get_bottom(self):
bounds = self._np.get_tight_bounds()
bounds = bounds[0] - self._np.get_pos(), bounds[1] - self._np.get_pos()
self._txt.destroy()
self._count -= 1
if self._count:
- item = self.__class__(self._world, self._plane_node, self._count, self._cb_inst) # pylint: disable=no-value-for-parameter
+ item = self.__class__(self._world, self._plane_node, self._count, self._cb_inst, self._curr_bottom, self._scene_repos) # pylint: disable=no-value-for-parameter
self._cb_inst(item)
+ self._scene_repos()
def on_click_r(self, pos):
if self._paused: return