Exemplo n.º 1
0
 public UIWidgetValue(UIMetrics metrics, float value, int referenceValue)
 {
     this.metrics = metrics;
     if (metrics == UIMetrics.Relative)
     {
         if (value < 0)
         {
             value = 0;
         }
         else if (value >= 1)
         {
             value = 1;
         }
     }
     this.value          = value;
     this.referenceValue = referenceValue;
 }
Exemplo n.º 2
0
 public GDISelectableOption(string text, string fontName, int fontSize, Brush brush, PointF position, ref List <GDISelectableOption> options, bool needAdjustWithFont = false, AlignMethod alignment = AlignMethod.CENTER, UIMetrics metrics = UIMetrics.Absolute)
 {
     winHeight     = Engine.WinHeight;
     winWidth      = Engine.WinWidth;
     font          = new Font(fontName, fontSize);
     this.brush    = brush;
     this.position = position;
     this.text     = text;
     inited        = false;
     if (needAdjustWithFont)
     {
         this.position.Y = this.position.Y - font.Height;
     }
     this.alignment = alignment;
 }
Exemplo n.º 3
0
 public Widget()
 {
     metrics = UIMetrics.Absolute;
 }