Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

メッセージウィンドウの表示領域を超えた場合にクリック待ちにする機能の追加 #28

Closed
wants to merge 10 commits into from

Conversation

EndoHizumi
Copy link
Owner

変更内容

メッセージウィンドウの表示領域を超えた場合にクリック待ちにする機能を実装しました。

修正内容

  1. src/core/drawer.ts の変更:

    • waitingForClick プロパティを追加して、クリック待ち状態を管理
    • messageWindow プロパティを追加して、メッセージウィンドウの参照を保持
    • drawText メソッドを修正して、テキストの高さがウィンドウを超えた場合の処理を追加:
      • 「待ち」アイコン(#waitCircle)を表示
      • クリック待ち状態にして、クリックされるまで待機
      • クリック後にテキストをクリアして続きを表示
    • waitForClick メソッドを追加して、クリックイベントを待機する処理を実装
  2. example/src/screen/title.html の変更:

    • #messageView に幅と高さの制限を追加
    • テキスト折り返しの設定(overflow-wrap, word-break)を追加
    • Safari対応のために -webkit-user-select プロパティを追加
  3. テストの追加:

    • 長いテキストを含むテストシナリオ long_text_test.scene を追加
    • PlayWrightテスト message-window-click-wait.spec.js を追加して機能をテスト

テスト結果

PlayWrightテストが正常に実行され、テキストがメッセージウィンドウの表示領域を超えた場合にクリック待ちになる機能が正常に動作することを確認しました。

スクリーンショット

テスト実行時に自動的に生成されたスクリーンショットは tests/e2e/screenshots/ ディレクトリに保存されています。

@EndoHizumi EndoHizumi closed this Mar 21, 2025
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