Skip to content

Commit

Permalink
New: Custom gamepad death zone
Browse files Browse the repository at this point in the history
  • Loading branch information
ollm committed Sep 25, 2024
1 parent 90b4d1e commit 1b364c9
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Option to set an image from the folder as a poster [`0a952da`](https://github.com/ollm/OpenComic/commit/0a952da7d4d79de384a327695377dae9b5ad073b)
- Multiple configurable tap zones from settings [`c7ee38f`](https://github.com/ollm/OpenComic/commit/c7ee38f2b85d85896bd197a8be4a68abd8bb300f)
- More available shortcuts [`9201e1f`](https://github.com/ollm/OpenComic/commit/9201e1fcf06401e498d3996bb45be314905b0fde)
- Custom gamepad death zone

##### 🐛 Bug Fixes

Expand Down
1 change: 1 addition & 0 deletions languages/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "Menú del comandament",
"useGamepad": "Fes servir un comandament per canviar l'acció",
"restoreDefaults": "Restaurar valors per defecte",
"gamepadDeadZone": "Zona morta del comandament",
"screen": "Pantalla",
"zoom": "Zoom",
"menus": "Menús",
Expand Down
1 change: 1 addition & 0 deletions languages/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "",
"useGamepad": "",
"restoreDefaults": "",
"gamepadDeadZone": "",
"screen": "",
"zoom": "",
"menus": "",
Expand Down
1 change: 1 addition & 0 deletions languages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "",
"useGamepad": "",
"restoreDefaults": "",
"gamepadDeadZone": "",
"screen": "",
"zoom": "",
"menus": "",
Expand Down
1 change: 1 addition & 0 deletions languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "Gamepad menu",
"useGamepad": "Use a gamepad to change the action",
"restoreDefaults": "Restore default values",
"gamepadDeadZone": "Gamepad dead zone",
"screen": "Screen",
"zoom": "Zoom",
"menus": "Menus",
Expand Down
1 change: 1 addition & 0 deletions languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "Menú del mando",
"useGamepad": "Utiliza un mando para cambiar la acción",
"restoreDefaults": "Restaurar valores por defecto",
"gamepadDeadZone": "Zona muerta del mando",
"screen": "Pantalla",
"zoom": "Zoom",
"menus": "Menús",
Expand Down
1 change: 1 addition & 0 deletions languages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "",
"useGamepad": "",
"restoreDefaults": "",
"gamepadDeadZone": "",
"screen": "",
"zoom": "",
"menus": "",
Expand Down
1 change: 1 addition & 0 deletions languages/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "",
"useGamepad": "",
"restoreDefaults": "",
"gamepadDeadZone": "",
"screen": "",
"zoom": "",
"menus": "",
Expand Down
1 change: 1 addition & 0 deletions languages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "",
"useGamepad": "",
"restoreDefaults": "",
"gamepadDeadZone": "",
"screen": "",
"zoom": "",
"menus": "",
Expand Down
1 change: 1 addition & 0 deletions languages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "",
"useGamepad": "",
"restoreDefaults": "",
"gamepadDeadZone": "",
"screen": "",
"zoom": "",
"menus": "",
Expand Down
1 change: 1 addition & 0 deletions languages/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "",
"useGamepad": "",
"restoreDefaults": "단축키 설정을 초기화",
"gamepadDeadZone": "",
"screen": "",
"zoom": "",
"menus": "",
Expand Down
1 change: 1 addition & 0 deletions languages/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "",
"useGamepad": "",
"restoreDefaults": "",
"gamepadDeadZone": "",
"screen": "",
"zoom": "",
"menus": "",
Expand Down
1 change: 1 addition & 0 deletions languages/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "",
"useGamepad": "",
"restoreDefaults": "",
"gamepadDeadZone": "",
"screen": "",
"zoom": "",
"menus": "",
Expand Down
1 change: 1 addition & 0 deletions languages/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "Gamepadmeny",
"useGamepad": "Använd en gamepad för att ändra funktionen",
"restoreDefaults": "Återställ standardvärden",
"gamepadDeadZone": "",
"screen": "",
"zoom": "",
"menus": "",
Expand Down
1 change: 1 addition & 0 deletions languages/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "เมนูเกมแพด",
"useGamepad": "ใช้เกมแพดเพื่อเปลี่ยนการกระทำ",
"restoreDefaults": "คืนค่าเป็นค่าเริ่มต้น",
"gamepadDeadZone": "",
"screen": "",
"zoom": "",
"menus": "",
Expand Down
1 change: 1 addition & 0 deletions languages/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "Menu gamepad",
"useGamepad": "Dùng gamepad để thay đổi hành động",
"restoreDefaults": "Trở về mặc định",
"gamepadDeadZone": "",
"screen": "",
"zoom": "",
"menus": "",
Expand Down
1 change: 1 addition & 0 deletions languages/zh-hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "游戏手柄菜单",
"useGamepad": "使用游戏手柄来改变动作",
"restoreDefaults": "恢复默认值",
"gamepadDeadZone": "",
"screen": "",
"zoom": "",
"menus": "",
Expand Down
1 change: 1 addition & 0 deletions languages/zh-hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"gamepadMenu": "",
"useGamepad": "",
"restoreDefaults": "",
"gamepadDeadZone": "",
"screen": "",
"zoom": "",
"menus": "",
Expand Down
2 changes: 1 addition & 1 deletion scripts/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ var storageDefault = {
play: true,
volume: 1.0,
},
controllerDeadZone: 0.06,
controllerDeadZone: 0.1,
disableGamepadInput: false,
startInFullScreen: false,
startInContinueReading: false,
Expand Down
14 changes: 14 additions & 0 deletions templates/settings.content.right.shortcuts.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ <h2 class="headline-small">{{language.settings.shortcuts.whenReading}}</h2>
</div>
</div>

<div class="simple-slider gamepad-item" data-gamepad-left="events.rangeMoveStep(this, -1)" data-gamepad-right="events.rangeMoveStep(this, 1)" style="margin-top: 10px;">
<div class="simple-slider-text">{{language.settings.shortcuts.gamepadDeadZone}}<div><i class="material-icon slider-reset" onclick="events.resetRange(this)" data-default="0.1" style="right: 70px;">undo</i><span>{{config.controllerDeadZone}}</span></div></div>
<div class="range">
<div class="range-position">
<span class="range-line" style="width: 100%"></span>
<span class="range-steps"></span>
<div>
<div class="range-point" position="100" style="left: 100%;"><div class="elevation-1"></div></div>
</div>
</div>
<input type="range" max="0.3" min="0" step="0.01" value="{{config.controllerDeadZone}}" onrange="settings.set('controllerDeadZone', \{{value}})">
</div>
</div>

{{#each shortcutsGroups}}
<table class="body-large">
{{#if name}}
Expand Down

0 comments on commit 1b364c9

Please sign in to comment.