Just last little bits of polish
Some checks failed
Build / Build Game (push) Has been cancelled

This commit is contained in:
2026-03-01 03:19:49 -05:00
parent 45ee9a7d11
commit f594ba3889
16 changed files with 128 additions and 33 deletions

View File

@@ -37,6 +37,13 @@ namespace game::state::main
auto isImguiCaptureMouse = ImGui::GetIO().WantCaptureMouse;
auto isItemsLocked = character.isStageUp;
if (isItemsLocked)
{
heldItemIndex = -1;
}
auto isMouseLeftClicked = ImGui::IsMouseClicked(ImGuiMouseButton_Left);
auto isMouseLeftDown = ImGui::IsMouseDown(ImGuiMouseButton_Left);
auto isMouseLeftReleased = ImGui::IsMouseReleased(ImGuiMouseButton_Left);
@@ -54,7 +61,7 @@ namespace game::state::main
if (isJustItemHeldStopped || isJustItemThrown)
{
cursor.queue_default_animation();
if (!isJustItemThrown) character.queue_idle_animation();
if (!isJustItemThrown && !isItemsLocked) character.queue_idle_animation();
isJustItemHeldStopped = false;
isJustItemThrown = false;
}
@@ -115,10 +122,10 @@ namespace game::state::main
auto rect = character.null_frame_rect(eatArea.nullID);
if (isCanEat && math::is_point_in_rectf(rect, heldItem->position))
if (isCanEat && math::is_point_in_rectf(rect, heldItem->position) && !isItemsLocked)
{
character.queue_play(
{.animation = eatArea.animation, .speedMultiplier = character.eatSpeed, .isInterruptible = false});
{.animation = eatArea.animation, .speedMultiplier = character.eatSpeed});
if (character.playedEventID == eatArea.eventID)
{
@@ -206,7 +213,7 @@ namespace game::state::main
item.update();
if (math::is_point_in_rectf(item.rect(), cursorPosition) && !isImguiCaptureMouse)
if (math::is_point_in_rectf(item.rect(), cursorPosition) && !isImguiCaptureMouse && !isItemsLocked)
{
isItemHovered = true;
cursor.queue_play({cursorSchema.animations.hover.get()});