public override void onGUI() { base.onGUI(); priceInLocalCurrency = (decimal)EditorGUILayout.FloatField("Price in your local currency:", (float)priceInLocalCurrency); item.platformBundles[BillingPlatform.GooglePlay]["priceInLocalCurrency"] = priceInLocalCurrency; this.defaultLocale = (GooglePlayLocale)EditorGUILayout.EnumPopup("Default locale:", defaultLocale); item.platformBundles[BillingPlatform.GooglePlay]["defaultLocale"] = defaultLocale.ToString(); }
public GooglePlayEditor(PurchasableItem rootItem) : base(rootItem, BillingPlatform.GooglePlay) { var bundle = rootItem.platformBundles[BillingPlatform.GooglePlay]; { this.priceInLocalCurrency = 1; if (bundle.ContainsKey("priceInLocalCurrency")) { decimal.TryParse(bundle["priceInLocalCurrency"].ToString(), out priceInLocalCurrency); } } { if (bundle.ContainsKey("defaultLocale")) { this.defaultLocale = (GooglePlayLocale)Enum.Parse(typeof(GooglePlayLocale), (string)bundle["defaultLocale"]); } else { this.defaultLocale = GooglePlayLocale.en_US; } } }
public override void onGUI () { base.onGUI (); priceInLocalCurrency = (decimal) EditorGUILayout.FloatField ("Price in your local currency:", (float) priceInLocalCurrency); this.defaultLocale = (GooglePlayLocale) EditorGUILayout.EnumPopup ("Default locale:", defaultLocale); }
public GooglePlayEditor(XElement rootItem) : base(rootItem, BillingPlatform.GooglePlay) { { XElement priceInLocalCurrency = rootItem.XPathSelectElement("platforms/GooglePlay/priceInLocalCurrency"); this.priceInLocalCurrency = 1; if (null != priceInLocalCurrency) { this.priceInLocalCurrency = (decimal) priceInLocalCurrency; } } { XElement defaultLocale = rootItem.XPathSelectElement("platforms/GooglePlay/defaultLocale"); if (null != defaultLocale) { this.defaultLocale = (GooglePlayLocale) Enum.Parse(typeof(GooglePlayLocale), (string) defaultLocale); } else { this.defaultLocale = GooglePlayLocale.en_US; } } }
public override void onGUI () { base.onGUI (); priceInLocalCurrency = (decimal) EditorGUILayout.FloatField ("Price in your local currency:", (float) priceInLocalCurrency); item.platformBundles[BillingPlatform.GooglePlay]["priceInLocalCurrency"] = priceInLocalCurrency; this.defaultLocale = (GooglePlayLocale) EditorGUILayout.EnumPopup ("Default locale:", defaultLocale); item.platformBundles[BillingPlatform.GooglePlay]["defaultLocale"] = defaultLocale.ToString(); }
public GooglePlayEditor(PurchasableItem rootItem) : base(rootItem, BillingPlatform.GooglePlay) { var bundle = rootItem.platformBundles[BillingPlatform.GooglePlay]; { this.priceInLocalCurrency = 1; if (bundle.ContainsKey("priceInLocalCurrency")) { decimal.TryParse(bundle["priceInLocalCurrency"].ToString(), out priceInLocalCurrency); } } { if (bundle.ContainsKey("defaultLocale")) { this.defaultLocale = (GooglePlayLocale) Enum.Parse(typeof(GooglePlayLocale), (string) bundle["defaultLocale"]); } else { this.defaultLocale = GooglePlayLocale.en_US; } } }