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

Method isItemChecked

packages/fairygui/src/widgets/PopupMenu.ts:216–225  ·  view source on GitHub ↗

* Check if item is checked by name * 通过名称检查菜单项是否选中

(name: string)

Source from the content-addressed store, hash-verified

214 * 通过名称检查菜单项是否选中
215 */
216 public isItemChecked(name: string): boolean {
217 const item = this._list.getChild(name);
218 if (item && item instanceof GButton) {
219 const c = item.getController('checked');
220 if (c) {
221 return c.selectedIndex === 2;
222 }
223 }
224 return false;
225 }
226
227 /**
228 * Remove item by name

Callers

nothing calls this directly

Calls 2

getChildMethod · 0.45
getControllerMethod · 0.45

Tested by

no test coverage detected