public override void DrawPanelButton(GraphicsContext gfx, Rectangle rect, PanelButtonState state, UIButtonState mouseState, string text) { gfx.DrawRectangle(rect.X, rect.Y, rect.Width, rect.Height, _buttonBG); var measure = _theme.Theme.GetFont(TextFontStyle.System).MeasureString(text); gfx.DrawString(text, new Vector2(rect.X + 22, rect.Y + ((rect.Height - measure.Y) / 2)), Color.White, _theme.Theme.GetFont(TextFontStyle.System), TextAlignment.Left, rect.Width, WrapMode.None); }
public override void DrawPanelButton(GraphicsContext gfx, Rectangle rect, PanelButtonState state, UIButtonState mouseState, string text) { var font = _theme.Theme.GetFont(TextFontStyle.Highlight); switch (state) { case PanelButtonState.Default: _theme.Theme.DrawControlLightBG(gfx, rect.X, rect.Y, rect.Width, rect.Height); break; case PanelButtonState.Active: _theme.Theme.DrawControlDarkBG(gfx, rect.X, rect.Y, rect.Width, rect.Height); break; case PanelButtonState.Minimized: _theme.Theme.DrawControlBG(gfx, rect.X, rect.Y, rect.Width, rect.Height); break; } var measure = font.MeasureString(text); gfx.DrawString(text, new Vector2(rect.X + 6, rect.Y + ((rect.Height - (int)measure.Y) / 2)), (mouseState == UIButtonState.Idle) ? _theme.Theme.GetFontColor(TextFontStyle.Highlight) : _theme.Theme.GetAccentColor(), font, TextAlignment.Left, rect.Width, WrapMode.None); }
public abstract void DrawPanelButton(GraphicsContext gfx, Rectangle rect, PanelButtonState state, UIButtonState mouseState, string text);
public void RequestButtonState (PanelButtonState state) { mpl_panel_client_request_button_state (Handle, state); }
private static extern void mpl_panel_client_request_button_state (IntPtr panel, PanelButtonState state);
public void RequestButtonState(PanelButtonState state) { mpl_panel_client_request_button_state(Handle, state); }
private static extern void mpl_panel_client_request_button_state(IntPtr panel, PanelButtonState state);