forked from Blendman974/faceclaw
UI improvements
Menus can paginate and be taller than quarter-screen. Text config setting editor selects all on enter, exits on confirm. Notification icons are displayed on the notifications-list and single-notification pages.
This commit is contained in:
1 parent
049824f489
commit
d2a942f5a3
11 files changed
+223
-26
No files matched your search
@@ -57,6 +57,15 @@ export class LayerStack {
|
||||
}
|
||||
}
|
||||
|
||||
/** Pop the top layer only if it matches; returns whether a layer was popped. */
|
||||
popIfTop(predicate: (layer: Layer) => boolean): boolean {
|
||||
if (this.layers.length > 1 && predicate(this.layers[this.layers.length - 1]!)) {
|
||||
this.layers.pop();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
clearToBase(): void {
|
||||
this.layers.splice(1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user