From cfc278518dfe4a45c632346984917ccec0c01104 Mon Sep 17 00:00:00 2001 From: Appbird Date: Fri, 3 Sep 2021 23:31:09 +0900 Subject: [PATCH] =?UTF-8?q?=E8=AA=BF=E6=95=B4=E3=81=A8=E3=81=93=E3=81=AE?= =?UTF-8?q?=E4=BB=95=E6=A7=98=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E8=AA=AC?= =?UTF-8?q?=E6=98=8E=E3=82=92=E8=A8=98=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ts/client/view/parts/RuleIndexPart.ts | 7 ++++++- src/ts/client/view/state/gameModeRule.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ts/client/view/parts/RuleIndexPart.ts b/src/ts/client/view/parts/RuleIndexPart.ts index d9512d3..92bb4a6 100644 --- a/src/ts/client/view/parts/RuleIndexPart.ts +++ b/src/ts/client/view/parts/RuleIndexPart.ts @@ -28,6 +28,10 @@ const contents={ Japanese: "全セグメント", English: "All Segments" }, + ruleIndexClickable:{ + Japanese: "下の目次をクリックすると、そのルールの詳細へ飛ぶことが出来ます。", + English: "If you click on the index below, you will jump to the detailed description of the rule." + }, specify_priority_in_ruleClasses:{ Japanese: "もっとも上にあるアイテムが基本的にルールとして優先されます。", English: "If the scope of rule classes is duplicated and contradicts each other, the item at the top has priority." @@ -58,8 +62,9 @@ export class RuleIndexPart { return } const ruleIndexSegment = this.container.appendChild(elementWithoutEscaping` -
+
${choiceString(contents.indexTitle,this.language).replace(/\$\{number\}/g,this.rules.length.toString())}
+
${choiceString(contents.ruleIndexClickable,this.language)}
${choiceString(contents.specify_priority_in_ruleClasses,this.language)}
diff --git a/src/ts/client/view/state/gameModeRule.ts b/src/ts/client/view/state/gameModeRule.ts index b10b9ec..00d07e1 100644 --- a/src/ts/client/view/state/gameModeRule.ts +++ b/src/ts/client/view/state/gameModeRule.ts @@ -38,7 +38,7 @@ export class S_GameModeRule extends PageStateBaseClass<{gameSystemID:string,game view.setHeader(ruleObj.rule) view.setRule(ruleObj) view.setNote(ruleObj.rule) - const destinationYPosition = ruleDetailedSegment.getBoundingClientRect().y + window.scrollY - (window.innerHeight/10) + const destinationYPosition = ruleDetailedSegment.getBoundingClientRect().y + window.scrollY ruleIndexPart.appendNewRule(ruleObj,() => this.app.scrollToThePagePosition(destinationYPosition)) } ruleIndexPart.refrectView()