Skip to content

Commit

Permalink
patchwork: Move single-click aux line to checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
x-sheep authored Aug 19, 2023
1 parent f73af9c commit b9946ee
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src-ui/p.html
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,12 @@ <h2 id="title2">読み込み中です...</h2>
<span>__mouseonly__</span>
</label>
</div>
<div class="config" data-config="patchwork_leftaux">
<label>
<input type="checkbox">
<span>__patchwork_leftaux__</span>
</label>
</div>
<div class="config" data-config="keypopup">
<label>
<input type="checkbox">
Expand Down
1 change: 1 addition & 0 deletions src-ui/res/p.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"singlenum.menu": "Single number in a region",
"discolor": "Disable color",
"mouseonly": "Enable mouse-only input",
"patchwork_leftaux": "Enable to input aux. lines with single click",
"autocheck": "Answer check",
"autocheck.off": "Manual",
"autocheck.guarded": "Automatic (guarded)",
Expand Down
4 changes: 4 additions & 0 deletions src/puzzle/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
this.add("dispqnumbg", false); /* yinyang: 問題のまるに背景色をつける */
this.add("undefcell", true); /* shugaku: 未確定マスはグレー表示にする */
this.add("mouseonly", false); /* lollipops: Alternative mouse input */
this.add(
"patchwork_leftaux",
true
); /* patchwork: Alternative mouse input */

this.add("squarecell", true); /* セルは正方形にする */

Expand Down
4 changes: 3 additions & 1 deletion src/variety/patchwork.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
this.inputShade();
}
} else if (this.notInputted()) {
if (this.isBorderMode()) {
if (!this.puzzle.getConfig("patchwork_leftaux")) {
this.inputShade();
} else if (this.isBorderMode()) {
var border = this.getborder();
if (!border.isnull) {
border.setQsub(border.qsub === 1 ? 0 : 1);
Expand Down

1 comment on commit b9946ee

@vercel
Copy link

@vercel vercel bot commented on b9946ee Aug 19, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

pzprjs – ./

pzprjs.vercel.app
pzprjs-robx.vercel.app
pzprjs-git-main-robx.vercel.app

Please sign in to comment.