优化右键菜单的统计事件

This commit is contained in:
xu_yanfeng
2025-01-27 21:35:10 +08:00
parent de1d19a51b
commit d15fc4c558
4 changed files with 27 additions and 19 deletions

View File

@@ -120,28 +120,32 @@ export default defineComponent({
const menus: IUiMenuItem[] = [];
menus.push({
name: "update node info",
callback: () => {
callback: (item) => {
updateNodeInfo();
ga.fireEventWithParam(GA_EventName.MouseMenu, "update node info");
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
},
});
menus.push({ type: ccui.menu.MenuType.Separator });
menus.push({
name: "fresh auto",
callback: () => {
callback: (item) => {
timer.create(true);
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
},
});
menus.push({
name: "fresh manual",
callback: () => {
callback: (item) => {
timer.clean();
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
},
});
menus.push({ type: ccui.menu.MenuType.Separator });
menus.push({
name: simpleProperties ? "show more properties" : "show simple properties",
callback: () => {
callback: (item) => {
simpleProperties = !simpleProperties;
ga.fireEventWithParam(GA_EventName.MouseMenu, "simple/more properties");
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
},
});
ccui.menu.showMenuByMouseEvent(evnet, menus);

View File

@@ -28,6 +28,14 @@ export class ConfigData {
* 是否自动刷新hierarchy
*/
refreshHirarchy: boolean = true;
/**
* 当鼠标滑过节点树时游戏是否同步Inspect
*/
hoverInspect: boolean = true;
/**
* 当节点树点击时游戏是否同步Inspect
*/
clickInspect: boolean = true;
}
export const appStore = defineStore("app", () => {
@@ -42,6 +50,8 @@ export const appStore = defineStore("app", () => {
config.value.expandTest = !!data.expandTest;
config.value.refreshHirarchy = !!data.refreshHirarchy;
config.value.refreshInspector = !!data.refreshInspector;
config.value.hoverInspect = !!data.hoverInspect;
config.value.clickInspect = !!data.clickInspect;
}
return {
frameID,