mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 23:57:19 +02:00
Add a Disable button in the MKB dialog
This commit is contained in:
parent
e21375821d
commit
5e43915ff7
@ -74,7 +74,7 @@
|
|||||||
height: var(--bx-button-height);
|
height: var(--bx-button-height);
|
||||||
line-height: var(--bx-button-height);
|
line-height: var(--bx-button-height);
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
vertical-align: -webkit-baseline-middle;
|
/* vertical-align: -webkit-baseline-middle; */
|
||||||
color: #fff;
|
color: #fff;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bx-mkb-pointer-lock-msg {
|
.bx-mkb-pointer-lock-msg {
|
||||||
display: flex;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
@ -41,16 +40,7 @@
|
|||||||
background: #151515;
|
background: #151515;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
> div:first-of-type {
|
||||||
margin-right: 12px;
|
|
||||||
height: 60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
svg {
|
|
||||||
width: 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
@ -69,6 +59,26 @@
|
|||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> div:last-of-type {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
button {
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
&:first-of-type {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-of-type {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
button
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bx-mkb-preset-tools {
|
.bx-mkb-preset-tools {
|
||||||
|
@ -464,20 +464,34 @@ export class MkbHandler {
|
|||||||
window.addEventListener('keydown', this.#onKeyboardEvent);
|
window.addEventListener('keydown', this.#onKeyboardEvent);
|
||||||
|
|
||||||
this.#$message = CE('div', {'class': 'bx-mkb-pointer-lock-msg bx-gone'},
|
this.#$message = CE('div', {'class': 'bx-mkb-pointer-lock-msg bx-gone'},
|
||||||
createButton({
|
|
||||||
icon: BxIcon.MOUSE_SETTINGS,
|
|
||||||
style: ButtonStyle.PRIMARY,
|
|
||||||
onClick: e => {
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
|
|
||||||
showStreamSettings('mkb');
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
CE('div', {},
|
CE('div', {},
|
||||||
CE('p', {}, t('mkb-click-to-activate')),
|
CE('p', {}, t('mkb-click-to-activate')),
|
||||||
CE('p', {}, t('press-key-to-toggle-mkb', {key: 'F8'})),
|
CE('p', {}, t('press-key-to-toggle-mkb', {key: 'F8'})),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
CE('div', {},
|
||||||
|
createButton({
|
||||||
|
icon: BxIcon.MOUSE_SETTINGS,
|
||||||
|
label: t('edit'),
|
||||||
|
style: ButtonStyle.PRIMARY,
|
||||||
|
onClick: e => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
|
||||||
|
showStreamSettings('mkb');
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
|
||||||
|
createButton({
|
||||||
|
label: t('disable'),
|
||||||
|
onClick: e => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
|
||||||
|
this.toggle();
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
this.#$message.addEventListener('click', this.start.bind(this));
|
this.#$message.addEventListener('click', this.start.bind(this));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user