Route the widget hover cursor through the theme
Button, Checkbox, the color swatch and list rows took a hard-coded 'pointer'; they now read Theme.hoverCursor, which is 'default'. Also adds the todo note for a breadcrumb when drilling into a sub-behavior in the graph. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8f92a06c84
commit
13852fe4b2
6 files changed
+9
-4
No files matched your search
@@ -18,6 +18,7 @@ export const Theme = {
|
||||
scrollbarWidth: 6,
|
||||
/** Horizontal indent per nesting level in tree lists. */
|
||||
treeIndent: 14,
|
||||
hoverCursor: 'default',
|
||||
colors: {
|
||||
background: 0x1b1d22,
|
||||
panel: 0x24272e,
|
||||
|
||||
@@ -37,7 +37,7 @@ export class Button extends Widget {
|
||||
this.align = options.align ?? 'center';
|
||||
this.onClick = options.onClick;
|
||||
this.focusable = true;
|
||||
this.cursor = 'pointer';
|
||||
this.cursor = Theme.hoverCursor;
|
||||
this.minHeight = Theme.controlHeight;
|
||||
this.fixedWidth = options.width ?? 0;
|
||||
this.minWidth = this.fixedWidth || (options.minWidth ?? 0);
|
||||
|
||||
@@ -11,7 +11,7 @@ export class Checkbox extends Widget {
|
||||
constructor(public checked = false) {
|
||||
super();
|
||||
this.focusable = true;
|
||||
this.cursor = 'pointer';
|
||||
this.cursor = Theme.hoverCursor;
|
||||
this.minWidth = Theme.controlHeight;
|
||||
this.minHeight = Theme.controlHeight;
|
||||
this.addChild(this.box);
|
||||
|
||||
@@ -101,7 +101,7 @@ export class ColorField extends Widget {
|
||||
class SwatchButton extends Widget {
|
||||
constructor(graphics: Graphics, onTap: () => void) {
|
||||
super();
|
||||
this.cursor = 'pointer';
|
||||
this.cursor = Theme.hoverCursor;
|
||||
this.minWidth = Theme.controlHeight;
|
||||
this.minHeight = Theme.controlHeight;
|
||||
this.addChild(graphics);
|
||||
|
||||
@@ -23,7 +23,7 @@ export class ListRow extends Widget {
|
||||
private readonly chevronSlot: boolean,
|
||||
) {
|
||||
super();
|
||||
this.cursor = 'pointer';
|
||||
this.cursor = Theme.hoverCursor;
|
||||
this.minHeight = height;
|
||||
if (item.overridden) this.labelText.style = textStyle('override');
|
||||
this.addChild(this.bg, this.labelText, this.hint);
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
falls man im graph ein sub-behavior klick, wäre eine breadcrumb navigation gut, sodass man auch wieder zurückspringen kann.
|
||||
sobald man in der hierachie (links im panel, assets/scene objects) wieder ein neues behavior auswählt bzw. über das dropdown im graph, soll das breadcrumb wieder verschwinden.
|
||||
kurz gefasst: breadcrumb anzeigen sobald behaviour in graph geöffnet wird (doppelklick).
|
||||
im breadcrump selbst, beispiel: "Game > Move > Other" - hier soll man im prinzip auf "Move" oder auch "Game" klicken können. in dem beispiel wenn man auf "Game" klickt, ist man wieder "Root" d.h. breadcrumb verschwindet wieder. klickt man auf "Move" wird aus dem Breadcrumb "Game > Move"
|
||||
Reference in new issue
Block a user