private GuiWidget createState(string word, double width, double height, ref RGBA_Bytes backgroundColor, ref RGBA_Bytes interiorColor, ref RGBA_Bytes thumbColor, ref RGBA_Bytes textColor) { TextWidget text = new TextWidget(word, pointSize: 10, textColor: textColor); text.VAnchor = VAnchor.ParentCenter; SwitchView switchGraphics = new SwitchView(width, height, word == onText, backgroundColor, interiorColor, thumbColor, textColor); switchGraphics.VAnchor = VAnchor.ParentCenter; switchGraphics.Margin = new BorderDouble(5, 0, 0, 0); GuiWidget switchNormalToPressed = new FlowLayoutWidget(FlowDirection.LeftToRight, text, switchGraphics); return switchNormalToPressed; }
private GuiWidget createState(string word, double width, double height, ref RGBA_Bytes backgroundColor, ref RGBA_Bytes interiorColor, ref RGBA_Bytes thumbColor, ref RGBA_Bytes textColor) { TextWidget text = new TextWidget(word, pointSize: 10, textColor: textColor); text.VAnchor = VAnchor.ParentCenter; SwitchView switchGraphics = new SwitchView(width, height, word == onText, backgroundColor, interiorColor, thumbColor, textColor); switchGraphics.VAnchor = VAnchor.ParentCenter; switchGraphics.Margin = new BorderDouble(5, 0, 0, 0); GuiWidget switchNormalToPressed = new FlowLayoutWidget(FlowDirection.LeftToRight, text, switchGraphics); return(switchNormalToPressed); }
// Constructor public ToolbarComponent() { _viewModel = new AppToolbar { ChooseWindowCommand = new Binding.RelayCommand(p => SwitchView?.Invoke(ViewType.WindowList)), FindProgramCommand = new Binding.RelayCommand(p => SwitchView?.Invoke(ViewType.FindProgram)), ToggleLockCommand = new Binding.RelayCommand(p => SwitchView?.Invoke(ViewType.LockWindow)), RefreshListCommand = new Binding.RelayCommand(p => RefreshWindowList?.Invoke()), MenuSettingsCommand = new Binding.RelayCommand(p => ShowSettingsWindow?.Invoke()), MenuAboutCommand = new Binding.RelayCommand(p => ShowAboutWindow?.Invoke()), MenuQuitCommand = new Binding.RelayCommand(p => QuitProgram?.Invoke()), ShowContextMenuCommand = new Binding.RelayCommand(ShowContextMenu) }; }
void Start() { sw = this; canMoveObject = false; onEyeLevel = false; }