This commit is contained in:
xu_yanfeng 2025-01-27 17:39:51 +08:00
parent 63e842deb3
commit 36680bbf3d
6 changed files with 20 additions and 8 deletions

View File

@ -145,16 +145,19 @@ export class Hint {
} }
public cleanHover() { public cleanHover() {
this.hoverNodes = []; this.hoverNodes = [];
this.hintAdapter.clear(); this.hintAdapter && this.hintAdapter.clear();
} }
public cleanSelected() { public cleanSelected() {
this.selectedNodes = []; this.selectedNodes = [];
this.hintAdapter.clear(); this.hintAdapter && this.hintAdapter.clear();
} }
private hoverNodes = []; private hoverNodes = [];
private selectedNodes = []; private selectedNodes = [];
public update() { public update() {
if (!this.hintAdapter) {
return;
}
this.hintAdapter.initDrawNode(); this.hintAdapter.initDrawNode();
if (!this.hintAdapter.isDrawValid()) { if (!this.hintAdapter.isDrawValid()) {
return; return;

View File

@ -1,5 +1,6 @@
export enum CompType { export enum CompType {
Node = "cc.Node", Node = "cc.Node",
Prefab = "cc.Prefab",
Spirte = "cc.Sprite", Spirte = "cc.Sprite",
Label = "cc.Label", Label = "cc.Label",
Widget = "cc.Widget", Widget = "cc.Widget",

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="find-game"> <div class="find-game">
<div style="display: flex; flex-direction: column"> <div style="display: flex; flex-direction: column; margin-bottom: 3px">
<span>no games created by cocos creator found!</span> <span>no games created by cocos creator found!</span>
<span>{{ msg }}</span> <span>{{ msg }}</span>
</div> </div>

View File

@ -1,6 +1,6 @@
import { v4 } from "uuid"; import { v4 } from "uuid";
import { Msg, Page, PluginEvent, RequestNodeInfoData, ResponseNodeInfoData, ResponseSupportData, ResponseTreeInfoData } from "../../../core/types"; import { Msg, Page, PluginEvent, RequestNodeInfoData, ResponseNodeInfoData, ResponseSupportData, ResponseTreeInfoData } from "../../../core/types";
import { VisibleProp } from "../comp"; import { CompType, VisibleProp } from "../comp";
import { ArrayData, BoolData, ColorData, EngineData, EnumData, Group, ImageData, Info, InvalidData, NodeInfoData, NumberData, ObjectCircleData, ObjectData, Property, StringData, TextData, TreeData, Vec2Data, Vec3Data, Vec4Data } from "../data"; import { ArrayData, BoolData, ColorData, EngineData, EnumData, Group, ImageData, Info, InvalidData, NodeInfoData, NumberData, ObjectCircleData, ObjectData, Property, StringData, TextData, TreeData, Vec2Data, Vec3Data, Vec4Data } from "../data";
export class TestClient { export class TestClient {
recv(event: PluginEvent) {} recv(event: PluginEvent) {}
@ -133,9 +133,13 @@ export class TestServer {
this.testData this.testData
.buildChild("engine") .buildChild("engine")
.buildComponent("group4") // .buildComponent("group4") //
.buildProperty("node", new EngineData().init(node.name, "cc_Node", node.id)) .buildProperty("node", new EngineData().init(node.name, CompType.Node, node.id))
.buildProperty("sprite", new EngineData().init(node.name, "cc_Sprite", node.id)) .buildProperty("sprite", new EngineData().init(node.name, CompType.Spirte, node.id))
.buildProperty("label", new EngineData().init(node.name, "cc_Label", node.id)) .buildProperty("label", new EngineData().init(node.name, CompType.Label, node.id))
.buildProperty("prefab", new EngineData().init(node.name, CompType.Prefab, node.id))
.buildProperty("animation", new EngineData().init(node.name, CompType.Animation, node.id))
.buildProperty("button", new EngineData().init(node.name, CompType.Button, node.id))
.buildProperty("input", new EngineData().init(node.name, CompType.EditBox, node.id))
.buildProperty("un_known", new EngineData().init(comp.name, "un_known", comp.id, node.id)); .buildProperty("un_known", new EngineData().init(comp.name, "un_known", comp.id, node.id));
this.testData this.testData

View File

@ -33,6 +33,10 @@ export default defineComponent({
map[CompType.Spirte] = "icon_picture"; map[CompType.Spirte] = "icon_picture";
map[CompType.Label] = "icon_text"; map[CompType.Label] = "icon_text";
map[CompType.Node] = "icon_node"; map[CompType.Node] = "icon_node";
map[CompType.Prefab] = "icon_prefab";
map[CompType.Animation] = "icon_animation";
map[CompType.Button] = "icon_button";
map[CompType.EditBox] = "icon_inputbox";
return map[props.data.engineType] || "icon_unknown"; return map[props.data.engineType] || "icon_unknown";
}, },
}; };