コード例 #1
0
        public OptionSlider(OsuString title, BindableDouble value, string unit = null, bool immediatelyAdjust = true)
        {
            this.value = value;
            localValue = value.Value;

            this.unit = unit;

            this.immediatelyAdjust = immediatelyAdjust;

            value.ValueChanged += value_ValueChanged;

            string text = LocalisationManager.GetString(title);

            header = new pText(text, 12, Vector2.Zero, 1, true, Color.White);
            spriteManager.Add(header);

            Size = header.MeasureText();

            Slider = new pSliderBar(spriteManager, value.MinValue, value.MaxValue, value.Value, new Vector2(Size.X + 5, Size.Y / 2), (int)(ELEMENT_SIZE - Size.X - 5));
            Slider.OnValueChanged += Slider_ValueChanged;

            Slider.KeyboardControl          = true;
            Slider.KeyboardControlIncrement = value is BindableInt ? 1 : 0.01;

            addKeyword(text);
            addKeyword(title.ToString());
            updateUnit();
        }
コード例 #2
0
ファイル: Class397.cs プロジェクト: newchild/Project-DayZero
 // Token: 0x06001CDC RID: 7388
 // RVA: 0x0009A888 File Offset: 0x00098A88
 public Class397(OsuString osuString_0, Class607 class607_1, string string_1, bool bool_2)
 {
     this.class607_0 = class607_1;
     this.double_0 = class607_1.Value;
     this.string_0 = string_1;
     this.bool_1 = bool_2;
     class607_1.imethod_2(new EventHandler(this.method_13));
     string string = Class41.GetString(osuString_0);
     Class533 class = new Class533(string, 12f, Vector2.get_Zero(), 1f, true, Color.get_White());
コード例 #3
0
        public static string GetString(OsuString stringType)
        {
            if (!initialised)
            {
                init();
            }

            return(strings[stringType]);
        }
コード例 #4
0
        public OptionDropdown(OsuString title, IEnumerable <pDropdownItem> items = null, HasObjectValue binding = null, EventHandler onChange = null)
        {
            this.binding = binding;

            ValueChangedObservable changeObservation = binding as ValueChangedObservable;

            if (changeObservation != null)
            {
                changeObservation.ValueChanged += changeObservation_ValueChanged;
            }

            string text   = LocalisationManager.GetString(title);
            pText  header = new pText(text, 12, Vector2.Zero, 1, true, Color.White);

            spriteManager.Add(header);

            Size = header.MeasureText() + new Vector2(5, 0);

            Dropdown = new pDropdown(spriteManager, String.Empty, new Vector2(Size.X, 0), ELEMENT_SIZE - Size.X, 1)
            {
                ColumnLimit = 10
            };
            Dropdown.OnSelect         += Dropdown_OnSelect;
            Dropdown.OnDisplayChanged += Dropdown_OnDisplayChanged;

            Dropdown.SpriteMainBox.ClickRequiresConfirmation = true;

            if (onChange != null)
            {
                Dropdown.OnSelect += onChange;
            }

            if (items != null)
            {
                foreach (pDropdownItem i in items)
                {
                    Dropdown.AddOption(i);
                    addKeyword(i.Text);
                }
            }

            if (binding != null)
            {
                Dropdown.SetSelected(binding.ObjectValue, true);
            }


            addKeyword(text);
            addKeyword(title.ToString());
        }
コード例 #5
0
ファイル: Maintenance.cs プロジェクト: notperry1234567890/osu
 void setProgress(float percentage = 0, OsuString idleText = OsuString.Maintenance_Hi)
 {
     Invoke(delegate
     {
         if (percentage <= 0)
         {
             progressBar1.Value = 0;
             label1.Text        = LocalisationManager.GetString(idleText);
         }
         else
         {
             progressBar1.Value = (int)percentage;
             label1.Text        = (int)percentage + @"%";
         }
     });
 }
コード例 #6
0
        public static string GetString(OsuString stringType)
        {
            if (!IsInitialised)
            {
                init();
            }

            try
            {
                return(strings[stringType]);
            }
            catch
            {
                return(string.Empty);
            }
        }
コード例 #7
0
ファイル: Class41.cs プロジェクト: newchild/Project-DayZero
 // Token: 0x06000ED9 RID: 3801
 // RVA: 0x00050F24 File Offset: 0x0004F124
 public static string GetString(OsuString osuString_0)
 {
     if (!Class41.bool_0)
     {
         Class41.smethod_1("");
     }
     string result;
     try
     {
         result = Class41.dictionary_0[osuString_0];
     }
     catch
     {
         result = string.Empty;
     }
     return result;
 }
コード例 #8
0
        public OptionCategory(OsuString titleString, FontAwesome icon = FontAwesome.circle)
        {
            Icon = icon;

            addKeyword(icon.ToString());
            addKeyword(titleString.ToString());

            Title = LocalisationManager.GetString(titleString);
            addKeyword(Title);

            headerText = new pText(Title.ToUpper(), 24, Vector2.Zero, 0, true, SkinManager.NEW_SKIN_COLOUR_SECONDARY)
            {
                Alpha      = 0.4f,
                Origin     = Origins.TopRight,
                Field      = Fields.TopRight,
                TextShadow = false,
            };

            spriteManager.Add(headerText);

            Size = new Vector2(0, 10);

            addKeyword(Title);
        }
コード例 #9
0
 public OptionTextbox(OsuString title, bool passwordBox = false)
     : this(LocalisationManager.GetString(title), passwordBox)
 {
     addKeyword(title.ToString());
 }
コード例 #10
0
ファイル: Class391.cs プロジェクト: newchild/Project-DayZero
		// Token: 0x06001CB8 RID: 7352
		// RVA: 0x000179E7 File Offset: 0x00015BE7
		public Class391(OsuString osuString_0, Color color_0, EventHandler eventHandler_1) : this(Class41.GetString(osuString_0), color_0, eventHandler_1)
		{
			base.method_8(osuString_0.ToString());
		}
コード例 #11
0
 public OptionButton(OsuString title, Color colour, EventHandler onClick = null)
     : this(LocalisationManager.GetString(title), colour, onClick)
 {
     addKeyword(title.ToString());
 }
コード例 #12
0
ファイル: Class395.cs プロジェクト: newchild/Project-DayZero
 // Token: 0x06001CCC RID: 7372
 // RVA: 0x00017B91 File Offset: 0x00015D91
 public Class395(OsuString osuString_0)
     : this(Class41.GetString(osuString_0))
 {
     base.method_8(osuString_0.ToString());
 }
コード例 #13
0
ファイル: Class394.cs プロジェクト: newchild/Project-DayZero
 // Token: 0x06001CC7 RID: 7367
 // RVA: 0x0009A120 File Offset: 0x00098320
 public Class394(OsuString osuString_0, IEnumerable<Class557> ienumerable_1, Interface18 interface18_1, EventHandler eventHandler_1)
 {
     this.interface18_0 = interface18_1;
     Interface19 interface = interface18_1 as Interface19;
コード例 #14
0
ファイル: Class400.cs プロジェクト: newchild/Project-DayZero
 // Token: 0x06001D4F RID: 7503
 // RVA: 0x00018232 File Offset: 0x00016432
 public Class400(OsuString osuString_0, bool bool_1)
     : this(Class41.GetString(osuString_0), bool_1)
 {
     base.method_8(osuString_0.ToString());
 }
コード例 #15
0
 internal OptionCheckbox(OsuString title, BindableBool binding, EventHandler onChange = null)
     : this(LocalisationManager.GetString(title), LocalisationManager.GetString(title + 1), binding, onChange)
 {
     addKeyword(title.ToString());
 }
コード例 #16
0
 public OptionSection(OsuString title, IEnumerable <string> keywords = null)
     : this(LocalisationManager.GetString(title), keywords)
 {
     addKeyword(title.ToString());
 }