Allow configuring menu accept/apply buttons (#385)

* feat: allow configuring menu accept/apply buttons

* Update assets/icons/Reset.svg

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>

---------

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
This commit is contained in:
briaguya
2024-07-06 03:19:31 +02:00
committed by GitHub
parent 79fc56f1fd
commit 19d2e38499
9 changed files with 160 additions and 38 deletions
+12 -1
View File
@@ -41,7 +41,7 @@
data-for="input_bindings, i : inputs.array"
data-event-mouseover="set_input_row_focus(i)"
data-class-control-option--active="get_input_enum_name(i)==cur_input_row"
data-if="!input_device_is_keyboard || get_input_enum_name(i) != 'TOGGLE_MENU'"
data-if="!input_device_is_keyboard || (get_input_enum_name(i) != 'TOGGLE_MENU' && get_input_enum_name(i) != 'ACCEPT_MENU' && get_input_enum_name(i) != 'APPLY_MENU')"
>
<label
class="control-option__label"
@@ -67,6 +67,7 @@
</button>
</div>
<button
data-if="get_input_enum_name(i) != 'TOGGLE_MENU' && get_input_enum_name(i) != 'ACCEPT_MENU'"
data-event-blur="set_input_row_focus(-1)"
data-event-focus="set_input_row_focus(i)"
data-event-click="clear_input_bindings(i)"
@@ -75,6 +76,16 @@
>
<svg src="icons/Trash.svg" />
</button>
<button
data-if="get_input_enum_name(i) == 'TOGGLE_MENU' || get_input_enum_name(i) == 'ACCEPT_MENU'"
data-event-blur="set_input_row_focus(-1)"
data-event-focus="set_input_row_focus(i)"
data-event-click="reset_single_input_binding_to_default(i)"
class="icon-button icon-button--danger"
data-attr-style="i == 0 ? 'nav-up:#cont_kb_toggle' : 'nav-up:auto'"
>
<svg src="icons/Reset.svg" />
</button>
</div>
</div>
</div>
+1 -1
View File
@@ -316,7 +316,7 @@
id="apply_button"
style="nav-up:#hr_original"
>
<div class="button__label">Apply <span class="prompt-font-sm">{{gfx_help__apply}}</span></div>
<div class="button__label">Apply<span class="prompt-font-sm">{{gfx_help__apply}}</span></div>
</button>
</div>
</div>
+5
View File
@@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M27.6949 10.3162C25.5859 5.98481 21.1415 3 16 3C8.8203 3 3 8.8203 3 16C3 23.1797 8.8203 29 16 29C21.1415 29 25.5859 26.0152 27.6949 21.6838" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round"/>
<path d="M29.052 11.0519V5.0519" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M29.052 11.0519H23.052" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 555 B