Example #1
0
 private static Color WidgetBackgroundColor(WidgetState state)
 {
     if (state == WidgetState.None || state == WidgetState.Hovered) {
         return Color.Transparent;
     }
     else if (state == WidgetState.Selected) {
         return Color.Black;
     }
     else {
         return Color.CornflowerBlue;
     }
 }
Example #2
0
 private static Color WidgetForegroundColor(WidgetState state)
 {
     if (state == WidgetState.Hovered) {
         return Color.White;
     }
     else if (state == WidgetState.None) {
         return Color.White * 0.7f;
     }
     else if (state == WidgetState.Selected) {
         return Color.White;
     }
     else {
         return Color.CornflowerBlue;
     }
 }
Example #3
0
 private Color MenuItemForegroundColor(WidgetState state)
 {
     if (state == WidgetState.Hovered) {
         return Color.White;
     }
     else if (state == WidgetState.Selected) {
         return Color.Black;
     }
     else {
         return Color.White * 0.7f;
     }
 }
Example #4
0
 private Color ComboBoxItemBackgroundColor(WidgetState state)
 {
     if (state == WidgetState.Selected) {
         return Color.White;
     }
     if (state == WidgetState.Hovered) {
         return Color.Black.Mix (Color.White, 0.15f);
     }
     return Color.Transparent;
 }
Example #5
0
 private Color MenuItemBackgroundColor(WidgetState state)
 {
     if (state == WidgetState.Selected) {
         return Color.White;
     }
     return Color.Transparent;
 }
Example #6
0
 public Widget(float fontFactor = 1.0f) 
 {
     State = WidgetState.Initialising;
     Type = GetType();
     FontFactor = fontFactor;
 }
Example #7
0
 private static Color WidgetForegroundColor(WidgetState state)
 {
     if (state == WidgetState.Hovered) {
         return Color.DarkGreen.Mix (Color.Black, 0.50f);
     }
     else if (state == WidgetState.None) {
         return Color.Black;
     }
     else if (state == WidgetState.Selected) {
         return Color.Black;
     }
     else {
         return Color.CornflowerBlue;
     }
 }
Example #8
0
 private Color MenuItemForegroundColor(WidgetState state)
 {
     if (state == WidgetState.Hovered) {
         return Color.DarkGreen.Mix (Color.Black, 0.50f);
     }
     else if (state == WidgetState.Selected) {
         return Color.White;
     }
     else {
         return Color.Black;
     }
 }
Example #9
0
 private Color ComboBoxItemBackgroundColor(WidgetState state)
 {
     if (state == WidgetState.Selected) {
         return Color.DarkGreen;
     }
     if (state == WidgetState.Hovered) {
         return Color.White.Mix (Color.DarkGreen, 0.25f);
     }
     return Color.Transparent;
 }
Example #10
0
 internal void InitWidgetState(WidgetState widgetState, string jsObjName)
 {
     WidgetState = widgetState;
     Position = new Point(widgetState.X, widgetState.Y);
     _jsObjName = jsObjName;
     ID = widgetState.ContainerID + "_" + WidgetID;
 }