Exemplo n.º 1
0
        public ModStatComponent(ComponentManager manager, string s, int x, int y, bool defaultState, double min, double max, double def)
        {
            _text = s;
            Label = new CompLabel(s, 11, new Vector2(x, y), Vector2.Zero, 0.94F, true, Color.White, true);
            manager.AddComponent(Label);
            Slider   = new CompSlider(manager, min, max, def, new Vector2(x + 6, y + 20), 200);
            Checkbox = new CompCheckbox("Enable " + s + " Mod", 0.7f, new Vector2(x + 6, y + 28), 1, defaultState);
            Checkbox.AddToggleCallback(OnCheckboxChecked);

            Slider.SliderCallbacks += OnSliderChange;
        }
Exemplo n.º 2
0
        public void empty()
        {
            var checkBox = new CompCheckbox("Hello World", 12f, Vector2.One, 0.84f, true);

            checkBox.AddToggleCallback(onClick);
        }