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

「選択肢の表示」のバグ #112

Closed
HidetoshiKawaguchi opened this issue Dec 4, 2023 · 0 comments
Closed

「選択肢の表示」のバグ #112

HidetoshiKawaguchi opened this issue Dec 4, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@HidetoshiKawaguchi
Copy link
Collaborator

HidetoshiKawaguchi commented Dec 4, 2023

Shickさんより
Text2Frameの「選択肢の表示」にて、既存バグと思われる個所を発見しました。
条件としては「デフォルト」の引数が「なし」且つ、「キャンセル」の値が「数字」の場合で起きているようです。
※既存の部分なので一先ず連絡だけ致します。

タグの例:
<選択肢の表示: ウインドウ, 左, なし, 2>

実行値(parameters[2]が1)

{
  "code": 102
  "indent": 0
  "parameters": [
    [
      "Yes"
      "No"
    ]
    1
    1
    2
    2
  ]
}

期待値(parameters[2]が-1)

{
  "code": 102
  "indent": 0
  "parameters": [
    [
      "Yes"
      "No"
    ]
    1
    -1
    2
    2
  ]
}

「デフォルト」の引数が「なし」の時にも「exist_default_choice = true」を入れればいいと思うので、
7030行目の次の行に入れればいいのかな~と思っています。
※勘違いしてたらすみません!

Text2Frame-MV/Text2Frame.js

Lines 7019 to 7041 in 824af13

switch (p.toLowerCase()) {
case 'branch':
case '分岐':
default_cancel = -2
return
case 'disallow':
case '禁止':
default_cancel = -1
return
case 'none':
case 'なし':
default_choice = -1
return
}
if (!isNaN(Number(p))) {
if (exist_default_choice) {
default_cancel = Number(p) - 1
} else {
default_choice = Number(p) - 1
exist_default_choice = true
}
}
})

以上です。確認よろしくお願いいたします。

Originally posted by @Shick1112 in #103 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant