MCPcopy Create free account
hub / github.com/esengine/esengine / handleGrayedChanged

Method handleGrayedChanged

packages/fairygui/src/widgets/GButton.ts:409–431  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

407 }
408
409 protected handleGrayedChanged(): void {
410 if (
411 this._buttonController &&
412 this._buttonController.hasPage(GButton.DISABLED)
413 ) {
414 if (this.grayed) {
415 if (
416 this._selected &&
417 this._buttonController.hasPage(GButton.SELECTED_DISABLED)
418 ) {
419 this.setState(GButton.SELECTED_DISABLED);
420 } else {
421 this.setState(GButton.DISABLED);
422 }
423 } else if (this._selected) {
424 this.setState(GButton.DOWN);
425 } else {
426 this.setState(GButton.UP);
427 }
428 } else {
429 super.handleGrayedChanged();
430 }
431 }
432
433 public getProp(index: number): any {
434 switch (index) {

Callers

nothing calls this directly

Calls 2

setStateMethod · 0.95
hasPageMethod · 0.80

Tested by

no test coverage detected