The tab headers are one TabHeader, the node board and the tile board pan and zoom through one helper, reordering tile pictures and tilemap layers goes through one moveItem, and a tilemap cell is one named type (#85)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c91c18f495
commit
6d7d0005cf
19 files changed
+187
-195
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { Graphics } from 'pixi.js';
|
||||
import { Checkbox, HStack, Label, ScrollContainer, Spacer, Theme, VStack } from '../../ui';
|
||||
import { TabHeader } from '../TabHeader';
|
||||
import type { PluginManager, PluginRecord } from './loader';
|
||||
|
||||
const NAME_WIDTH = 200;
|
||||
@@ -65,7 +65,6 @@ class PluginRow extends HStack {
|
||||
* reading a name out of it would mean running it.
|
||||
*/
|
||||
export class PluginsPane extends VStack {
|
||||
private readonly headerBg = new Graphics();
|
||||
private readonly hint: Label;
|
||||
private readonly rows = new VStack();
|
||||
private readonly scroll = new ScrollContainer();
|
||||
@@ -75,9 +74,7 @@ export class PluginsPane extends VStack {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
const header = new HStack({ gap: Theme.gap, padding: Theme.padding, align: 'center' });
|
||||
header.minHeight = Theme.controlHeight + Theme.padding * 2;
|
||||
header.addChildAt(this.headerBg, 0);
|
||||
const header = new TabHeader();
|
||||
header.add(new Label('Plugins', { style: 'bodyBold' }));
|
||||
header.add(new Spacer(Theme.padding));
|
||||
this.hint = new Label('', { style: 'small' });
|
||||
@@ -154,12 +151,4 @@ export class PluginsPane extends VStack {
|
||||
this.scroll.relayoutContent();
|
||||
this.relayout();
|
||||
}
|
||||
|
||||
override redraw(): void {
|
||||
super.redraw();
|
||||
const h = Theme.controlHeight + Theme.padding * 2;
|
||||
this.headerBg.clear();
|
||||
this.headerBg.rect(0, 0, this.w, h).fill(Theme.colors.panelHeader);
|
||||
this.headerBg.rect(0, h - 1, this.w, 1).fill(Theme.colors.border);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user