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); }
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; }