mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-11-06 17:25:24 +00:00
优化右键菜单的统计事件
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user