打印node名字

This commit is contained in:
xu_yanfeng
2025-01-25 19:36:11 +08:00
parent 7ae3b5466a
commit 95fa6ec276
5 changed files with 55 additions and 20 deletions

View File

@@ -12,6 +12,7 @@ export enum DocumentEvent {
EngineVersion = "engineVersion",
GoogleAnalytics = "googleAnalytics",
LoadInjectCss = "load-inject-css",
InspectorClear = "inspector_clear",
GameInspectorBegan = "GameInspectorBegan",
GameInspectorEnd = "GameInspectorEnd",
}

View File

@@ -155,6 +155,11 @@ export default defineComponent({
ga(GA_EventName.PickTop);
},
},
{
name: "",
type: ccui.menu.MenuType.Separator,
callback() {},
},
{
name: "Filter Enabled",
selected: inspectTarget.enabled,

View File

@@ -99,6 +99,23 @@ export class Inspector extends InjectEvent {
logFunction(value);
break;
}
case Msg.RequestLogCustom: {
const logFunction = console.log;
logFunction(pluginEvent.data);
}
case Msg.ReqWriteClipboard: {
document.body.focus();
navigator.clipboard
.writeText(pluginEvent.data)
.then(() => {
console.log("ok");
})
.catch((e) => {
console.log("fail", e);
});
break;
}
case Msg.RequestVisible: {
const uuid: string = pluginEvent.data;
const node = this.inspectorGameMemoryStorage[uuid];