Highlight focused text inputs, Show old signal (#1255)

* provide previous key when editing signal

* highlight text in focused text input
pull/1283/head
Emerald Block 3 years ago committed by GitHub
parent c11f571dd2
commit 0a15958af9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -124,6 +124,7 @@ export class FormElementInput extends FormElement {
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
const uid = entity.uid;
const signal = entity.components.ConstantSignal.signal;
const signalValueInput = new FormElementInput({
id: "signalValue",
label: fillInLinkIntoTranslation(T.dialogs.editSignal.descShortKey, THIRDPARTY_URLS.shapeViewer),
placeholder: "",
defaultValue: "",
defaultValue: signal ? signal.getAsCopyableKey() : "",
validator: val => this.parseSignalCode(entity, val),
});

Loading…
Cancel
Save