Skip to content

Comments

fix(PausePopup): 버튼 처리 중엔 다른 버튼을 클릭할 수 없다#386

Merged
nijuy merged 3 commits intodevelopfrom
fix/prevent-invalid-action-in-popup
Jan 12, 2026
Merged

fix(PausePopup): 버튼 처리 중엔 다른 버튼을 클릭할 수 없다#386
nijuy merged 3 commits intodevelopfrom
fix/prevent-invalid-action-in-popup

Conversation

@nijuy
Copy link
Collaborator

@nijuy nijuy commented Jan 7, 2026

💻 개요

  • 이슈 대응

🧐 배경

  • 게임 세션의 생명주기 : 시작 ➡️ 플레이/일시정지/재개 ➡️ 종료

    • 종료 상태가 된 게임 세션은 일시정지/재개 요청을 수행할 수 없음 (요청 시 에러 반환)
  • 기존 PausePopup에는 무려 두 가지 문제가 있음

    1. 중복 요청: 같은 버튼을 연타하면 연타한 만큼 요청 전송

    2. 교차 요청: 종료 버튼 처리 중에 일시정지 버튼을 누를 수 있음 (반대도 동일)

      • 일시정지 처리 중에 종료를 누르는 건 생명주기상 문제가 되진 않지만 의도한 액션이 아니고

      • 종료 중에 일시정지 누르는 건 문제가 됨

        일반적인 네트워크 환경에서는 종료 처리가 빨리 끝나고 PausePopup이 닫히니까 괜찮은데,
        느린 네트워크 환경에서는 요청을 처리할 동안 PausePopup이 유지되어서 일시정지 버튼을 충분히 누를 수 있음

    둘다 위에서 언급했던 '세션 상태에 맞지 않는 요청'이므로 에러 발생

📋 변경 및 추가 사항

  • PausePopup에서 특정 버튼 클릭 처리할 동안 버튼을 모두 비활성화해서, 중복 요청/교차 요청을 막았습니다

    before after
    invalid action afterr
    종료 처리 중에 일시정지 연타하면 싸악 요청이 가는 모습 특정 버튼 처리 중엔 버튼 두 개가 다 비활성화 됨

💬 To. 리뷰어

nijuy added 3 commits January 7, 2026 21:51
- LargeButton 클래스에서 disabledView로 사용할 에셋
- 외부에서 enabled가 변경되면 알아서 disabledView로 넣어둔 에셋이 노출됨
- 수동으로 opacity 조절해서 표현할 필요 X
@nijuy nijuy self-assigned this Jan 7, 2026
Comment on lines +46 to +55
const disabledView = new NineSliceSprite({
texture: Texture.from('large-button-disabled'),
leftWidth: 36,
topHeight: 42,
rightWidth: 36,
bottomHeight: 52,
width: opts.width,
height: opts.height,
});

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabledView를 설정해두면 외부에서 이 버튼의 enabled를 false로 바꿨을 때 알아서 비활성화 상태를 보여줌

@nijuy nijuy merged commit 4889b81 into develop Jan 12, 2026
1 check passed
@nijuy nijuy deleted the fix/prevent-invalid-action-in-popup branch January 12, 2026 03:16
nijuy added a commit that referenced this pull request Jan 12, 2026
* chore: large-button-disabled 에셋 추가

- LargeButton 클래스에서 disabledView로 사용할 에셋

* feat(LargeButton): disabledView 추가

- 외부에서 enabled가 변경되면 알아서 disabledView로 넣어둔 에셋이 노출됨
- 수동으로 opacity 조절해서 표현할 필요 X

* fix(PausePopup): 버튼 처리 중엔 다른 버튼을 클릭할 수 없다
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant