Giter VIP home page Giter VIP logo

Comments (5)

wuzhiming avatar wuzhiming commented on June 16, 2024 1

oke, I understand your feature. We will discuss it further.

from cocos-engine.

wuzhiming avatar wuzhiming commented on June 16, 2024

Hello, can you tell me what the purpose is for displaying the name you need for yourself?

from cocos-engine.

ze0nni avatar ze0nni commented on June 16, 2024

Sometimes I have list items with many properties
image

I want to collapse the list to find element easier
image

from cocos-engine.

wuzhiming avatar wuzhiming commented on June 16, 2024

You have so much data, why not save it as a JSON file

from cocos-engine.

ze0nni avatar ze0nni commented on June 16, 2024

Bad example. This is not game configs.

Typically this list closely associated with prefab nodes tree and contains refs to components.

enum AppButtonPhase {
    Normal = 0,
    Hover = 1,
    Pressed = 2,
    Disabled = 3,
}
Enum(AppButtonPhase);

@ccclass('AppButtonFaces')
class AppButtonFaces {
    @property({ type: AppButtonPhase })
    phase: AppButtonPhase = AppButtonPhase.Normal;

    @property(Node)
    target!: Node;

    @property(CCBoolean)
    active: boolean = true;
    
    @property(CCFloat)
    scale: number = 1;

    @property(Vec2)
    offsetX: Vec2 = Vec2.ZERO

    @property(Color)
    color: Color = Color.WHITE;
}

@ccclass('AppButton')
export class AppButton extends Component {
    @property([AppButtonFaces])
    private faces: AppButtonFaces[] = [];
}

image
image

I can turn AppButtonFaces into Component. But its looks like overengineering.

from cocos-engine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.