diff --git a/dread_editor/level_data_sr.py b/dread_editor/level_data_sr.py index a0a1684..68f783b 100644 --- a/dread_editor/level_data_sr.py +++ b/dread_editor/level_data_sr.py @@ -98,7 +98,6 @@ def render_scale(self, value): def open_actor_link(self, link: str): if (actor := self.bmsld.follow_link(link)) is not None: layer_name = link.split(":")[4] - print(actor) self.visible_actors[(layer_name, actor.sName)] = True def render_actor_context_menu(self, layer_index: int, actor): @@ -120,15 +119,13 @@ def render_actor_context_menu(self, layer_index: int, actor): imgui.text("Position:") imgui.same_line() - changed_x, x = imgui.slider_float("##actor-context-position-x", actor.x, + changed_x, x = imgui.slider_float("##actor-context-position-x", actor.positon[0], self.display_borders["left"], self.display_borders["right"]) imgui.same_line() - changed_y, y = imgui.slider_float("##actor-context-position-y", actor.y, + changed_y, y = imgui.slider_float("##actor-context-position-y", actor.positon[1], self.display_borders["top"], self.display_borders["bottom"]) - if changed_x: - actor.x = x - if changed_y: - actor.y = y + if changed_x or changed_y: + actor.positon = (x, y, actor.positon[2]) def add_new_actor(self, layer_index: int, actor, actor_name: str): if actor is not None: @@ -274,12 +271,12 @@ def lerp_y(y): color = imgui.get_color_u32_rgba(*color_for_layer(layer_name)) for actor_name in self.bmsld.raw.actors[layer_index]: actor = self.bmsld.raw.actors[layer_index][actor_name] - if "x" not in actor: + if "position" not in actor: # TODO: vPos might be a required field. Re-visit after editor fields continue - final_x = lerp_x(actor.x) - final_y = lerp_y(actor.y) + final_x = lerp_x(actor.position[0]) + final_y = lerp_y(actor.position[1]) if (layer_name, actor_name) in highlighted_actors_in_list: draw_list.add_circle_filled(final_x, final_y, 15, imgui.get_color_u32_rgba(1, 1, 1, 1)) else: diff --git a/requirements.txt b/requirements.txt index 72dcfe7..09225ba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ construct==2.10.68 glfw==2.6.2 imgui==2.0.0 -mercury-engine-data-structures==0.24.0 +mercury-engine-data-structures==0.25.0 PyOpenGL==3.1.7 diff --git a/setup.cfg b/setup.cfg index e77fe4b..31aedd9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -18,7 +18,7 @@ classifiers = [options] packages = find: install_requires = - mercury-engine-data-structures>=0.24.0 + mercury-engine-data-structures>=0.25.0 imgui[glfw] include_package_data = True