Git Product home page Git Product logo

Comments (2)

654wak654 avatar 654wak654 commented on August 30, 2024

Table of attribute types:

Type name Type of control default value details about return value
string editbox "" value inside the editbox (STR)
string_long ml editbox "" value inside the editbox (STR)
range 2 editboxes [0, 0] values in both editboxes (ARR)
position 3 editboxes [0, 0, 0] vector (x,y,z) (ARR)
color 4 editboxes [0, 0, 0, 0] color (r,g,b,a) (ARR)
date 3 comboboxes epoch* date (year, month, day) (ARR)
list combobox 0 corresponding value to curSel (STR)
number editbox 0 value number inside the editbox (NUM)
slider slider 0 current pos of slider (NUM)
bool checkbox 0 (false) is checkbox selected (BOOL)
custom good luck nil (ANY)

*epoch is January first of smallest year given

Example:

class GVARMAIN(attributes) {
    class CAManBase {
        class ADDON {
            class General {
                class Awesome {
                    displayName = "Is awesome";
                    tooltipText = "Select if this unit is awesome or not.";
                    type = "BOOL";
                    default = 1; // Optional, default is 0
                    exceptions[] = {"isAlive"};
                    expression = QUOTE(_x setVariable [QGVAR(isAwesome), _this]);
                };
                class CombatMode {
                    displayName = "Combat Mode";
                    tooltipText = "Select this unit's group's combat mode.";
                    type = "COMBO";
                    values[] = {"BLUE", "GREEN", "WHITE", "YELLOW", "RED"};
                    labels[] = {
                        "Never fire",
                        "Hold fire - defend only",
                        "Hold fire, engage at will",
                        "Fire at will",
                        "Fire at will, engage at will"
                    };
                    expression = "(group _x) setCombatMode _this";
                    condition = "_x == leader _x";
                };
            };
        };
    };
};

from mars.

jameslkingsley avatar jameslkingsley commented on August 30, 2024

Moved to http://marseditor.com/docs/development/attributes/

from mars.

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.