mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-07-18 00:44:00 +00:00
完善节点的Icon图标
This commit is contained in:
parent
f15c2cb979
commit
c739a89802
@ -318,7 +318,7 @@ export class Inspector extends InjectEvent {
|
|||||||
for (let i = 0; i < components.length; i++) {
|
for (let i = 0; i < components.length; i++) {
|
||||||
const component = components[i];
|
const component = components[i];
|
||||||
const name = this.getCompName(component);
|
const name = this.getCompName(component);
|
||||||
if (name) {
|
if (name.startsWith("cc")) {
|
||||||
names.push(name);
|
names.push(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -361,6 +361,7 @@ export class Inspector extends InjectEvent {
|
|||||||
CompType.Toggle,
|
CompType.Toggle,
|
||||||
CompType.ToggleGroup,
|
CompType.ToggleGroup,
|
||||||
CompType.ToggleContainer,
|
CompType.ToggleContainer,
|
||||||
|
CompType.AudioSource,
|
||||||
//
|
//
|
||||||
CompType.ParticleSystem,
|
CompType.ParticleSystem,
|
||||||
CompType.ParticleSystem2D,
|
CompType.ParticleSystem2D,
|
||||||
@ -372,6 +373,7 @@ export class Inspector extends InjectEvent {
|
|||||||
CompType.BlockInputEvents,
|
CompType.BlockInputEvents,
|
||||||
CompType.Layout,
|
CompType.Layout,
|
||||||
CompType.Widget,
|
CompType.Widget,
|
||||||
|
CompType.Opacity,
|
||||||
// 兜底
|
// 兜底
|
||||||
CompType.Node,
|
CompType.Node,
|
||||||
];
|
];
|
||||||
|
@ -27,6 +27,8 @@ export enum CompType {
|
|||||||
ToggleContainer = "cc.ToggleContainer",
|
ToggleContainer = "cc.ToggleContainer",
|
||||||
Toggle = "cc.Toggle",
|
Toggle = "cc.Toggle",
|
||||||
Button = "cc.Button",
|
Button = "cc.Button",
|
||||||
|
AudioSource = "cc.AudioSource",
|
||||||
|
Opacity = "cc.UIOpacity",
|
||||||
BlockInputEvents = "cc.BlockInputEvents",
|
BlockInputEvents = "cc.BlockInputEvents",
|
||||||
Scene = "cc.Scene",
|
Scene = "cc.Scene",
|
||||||
Animation = "cc.Animation",
|
Animation = "cc.Animation",
|
||||||
@ -310,8 +312,13 @@ export function getNodeIcon(comp: CompType): string {
|
|||||||
map[CompType.ParticleSystem2D] = "icon_effect";
|
map[CompType.ParticleSystem2D] = "icon_effect";
|
||||||
map[CompType.Layout] = "icon_layout";
|
map[CompType.Layout] = "icon_layout";
|
||||||
map[CompType.Graphics] = "icon_graphics";
|
map[CompType.Graphics] = "icon_graphics";
|
||||||
|
map[CompType.Opacity] = "icon_opacity";
|
||||||
|
map[CompType.BlockInputEvents] = "icon_block";
|
||||||
|
map[CompType.RichText] = "icon_rich_text";
|
||||||
|
map[CompType.AudioSource] = "icon_audio";
|
||||||
let ret = map[comp];
|
let ret = map[comp];
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
|
debugger;
|
||||||
console.log(`get node icon fail: ${comp}, please check.`);
|
console.log(`get node icon fail: ${comp}, please check.`);
|
||||||
ret = map[CompType.Node];
|
ret = map[CompType.Node];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user