コード例 #1
0
 public static Offset <NymaTypes.Setting> CreateSetting(FlatBufferBuilder builder,
                                                        StringOffset NameOffset         = default(StringOffset),
                                                        StringOffset DescriptionOffset  = default(StringOffset),
                                                        StringOffset SettingsKeyOffset  = default(StringOffset),
                                                        StringOffset DefaultValueOffset = default(StringOffset),
                                                        StringOffset MinOffset          = default(StringOffset),
                                                        StringOffset MaxOffset          = default(StringOffset),
                                                        NymaTypes.SettingsFlags Flags   = 0,
                                                        NymaTypes.SettingType Type      = NymaTypes.SettingType.Int,
                                                        VectorOffset SettingEnumsOffset = default(VectorOffset))
 {
     builder.StartTable(9);
     Setting.AddSettingEnums(builder, SettingEnumsOffset);
     Setting.AddType(builder, Type);
     Setting.AddFlags(builder, Flags);
     Setting.AddMax(builder, MaxOffset);
     Setting.AddMin(builder, MinOffset);
     Setting.AddDefaultValue(builder, DefaultValueOffset);
     Setting.AddSettingsKey(builder, SettingsKeyOffset);
     Setting.AddDescription(builder, DescriptionOffset);
     Setting.AddName(builder, NameOffset);
     return(Setting.EndSetting(builder));
 }
コード例 #2
0
 public static void AddType(FlatBufferBuilder builder, NymaTypes.SettingType Type)
 {
     builder.AddInt(7, (int)Type, 0);
 }