mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Highlight focused text inputs, Show old signal (#1255)
* provide previous key when editing signal * highlight text in focused text input
This commit is contained in:
parent
c11f571dd2
commit
0a15958af9
@ -124,6 +124,7 @@ export class FormElementInput extends FormElement {
|
|||||||
|
|
||||||
focus() {
|
focus() {
|
||||||
this.element.focus();
|
this.element.focus();
|
||||||
|
this.element.select();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,11 +49,12 @@ export class ConstantSignalSystem extends GameSystemWithFilter {
|
|||||||
// Ok, query, but also save the uid because it could get stale
|
// Ok, query, but also save the uid because it could get stale
|
||||||
const uid = entity.uid;
|
const uid = entity.uid;
|
||||||
|
|
||||||
|
const signal = entity.components.ConstantSignal.signal;
|
||||||
const signalValueInput = new FormElementInput({
|
const signalValueInput = new FormElementInput({
|
||||||
id: "signalValue",
|
id: "signalValue",
|
||||||
label: fillInLinkIntoTranslation(T.dialogs.editSignal.descShortKey, THIRDPARTY_URLS.shapeViewer),
|
label: fillInLinkIntoTranslation(T.dialogs.editSignal.descShortKey, THIRDPARTY_URLS.shapeViewer),
|
||||||
placeholder: "",
|
placeholder: "",
|
||||||
defaultValue: "",
|
defaultValue: signal ? signal.getAsCopyableKey() : "",
|
||||||
validator: val => this.parseSignalCode(entity, val),
|
validator: val => this.parseSignalCode(entity, val),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user