Esempio n. 1
0
        private bool OnSliderClicked(MyGuiControlSlider who)
        {
            if (MyInput.Static.IsAnyCtrlKeyPressed())
            {
                float min = 0;
                float max = 255;
                float val = who.Value;

                MyGuiScreenDialogAmount dialog = new MyGuiScreenDialogAmount(min, max, m_caption, parseAsInteger: true, defaultAmount: val);
                dialog.OnConfirmed += (v) => { who.Value = v; };
                MyScreenManager.AddScreen(dialog);
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
        private bool OnSliderClicked(MyGuiControlSlider who)
        {
            if (MyInput.Static.IsAnyCtrlKeyPressed())
            {
                float min = 0;
                float max = 255;
                float val = who.Value;

                MyGuiScreenDialogAmount dialog = new MyGuiScreenDialogAmount(min, max, m_caption, parseAsInteger: true, defaultAmount: val);
                dialog.OnConfirmed += (v) => { who.Value = v; };
                MyScreenManager.AddScreen(dialog);
                return true;
            }
            return false;

        }