Ejemplo n.º 1
0
        // Wrapper to make defining variables easier
        protected static WatchVariableControlPrecursor gfxProperty(string name, string type, uint offset,
                                                                   Structs.WatchVariableSubclass subclass = Structs.WatchVariableSubclass.Number, uint?mask = null)
        {
            Color color = (offset <= 0x13)
                ? ColorUtilities.GetColorFromString("Yellow")
                : ColorUtilities.GetColorFromString("LightBlue");
            WatchVariable watchVar = new WatchVariable(
                memoryTypeName: type,
                specialType: null,
                baseAddressType: BaseAddressTypeEnum.GfxNode,
                offsetUS: null,
                offsetJP: null,
                offsetSH: null,
                offsetEU: null,
                offsetDefault: offset,
                mask: mask,
                shift: null,
                handleMapping: true);
            WatchVariableControlPrecursor precursor = new WatchVariableControlPrecursor(
                name: name,
                watchVar: watchVar,
                subclass: subclass,
                backgroundColor: color,
                displayType: null,
                roundingLimit: null,
                useHex: (type == "uint" || type == "ushort") ? true : (bool?)null,
                invertBool: null,
                coordinate: null,
                isYaw: null,
                groupList: new List <VariableGroup>());

            return(precursor);
        }
Ejemplo n.º 2
0
        // Wrapper to make defining variables easier
        protected static WatchVariableControlPrecursor gfxProperty(string name, string type, uint offset,
                                                                   Structs.WatchVariableSubclass subclass = Structs.WatchVariableSubclass.Number, uint?mask = null)
        {
            Color color = (offset <= 0x13)
                ? ColorUtilities.GetColorFromString("Yellow")
                : ColorUtilities.GetColorFromString("LightBlue");
            WatchVariable watchVar = new WatchVariable(
                type,
                null /* specialType */,
                Structs.BaseAddressTypeEnum.GfxNode,
                null /* offsetUS */,
                null /* offsetJP */,
                null /* offsetPAL */,
                offset,
                mask,
                null);
            WatchVariableControlPrecursor precursor = new WatchVariableControlPrecursor(
                name,
                watchVar,
                subclass,
                color,
                null /* displayType */,
                null /* roundingLimit */,
                (type == "uint" || type == "ushort") ? true : (bool?)null,
                null /* invertBool */,
                null /* coordinate */,
                null /* isYaw */,
                new List <Structs.VariableGroup>());

            return(precursor);
        }