mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-07-17 21:24: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++) {
|
||||
const component = components[i];
|
||||
const name = this.getCompName(component);
|
||||
if (name) {
|
||||
if (name.startsWith("cc")) {
|
||||
names.push(name);
|
||||
}
|
||||
}
|
||||
@ -361,6 +361,7 @@ export class Inspector extends InjectEvent {
|
||||
CompType.Toggle,
|
||||
CompType.ToggleGroup,
|
||||
CompType.ToggleContainer,
|
||||
CompType.AudioSource,
|
||||
//
|
||||
CompType.ParticleSystem,
|
||||
CompType.ParticleSystem2D,
|
||||
@ -372,6 +373,7 @@ export class Inspector extends InjectEvent {
|
||||
CompType.BlockInputEvents,
|
||||
CompType.Layout,
|
||||
CompType.Widget,
|
||||
CompType.Opacity,
|
||||
// 兜底
|
||||
CompType.Node,
|
||||
];
|
||||
|
@ -27,6 +27,8 @@ export enum CompType {
|
||||
ToggleContainer = "cc.ToggleContainer",
|
||||
Toggle = "cc.Toggle",
|
||||
Button = "cc.Button",
|
||||
AudioSource = "cc.AudioSource",
|
||||
Opacity = "cc.UIOpacity",
|
||||
BlockInputEvents = "cc.BlockInputEvents",
|
||||
Scene = "cc.Scene",
|
||||
Animation = "cc.Animation",
|
||||
@ -310,8 +312,13 @@ export function getNodeIcon(comp: CompType): string {
|
||||
map[CompType.ParticleSystem2D] = "icon_effect";
|
||||
map[CompType.Layout] = "icon_layout";
|
||||
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];
|
||||
if (!ret) {
|
||||
debugger;
|
||||
console.log(`get node icon fail: ${comp}, please check.`);
|
||||
ret = map[CompType.Node];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user