Ejemplo n.º 1
0
 public CardPanelControl(Pile p, Action<CardButton> f)
 {
     panel = new CardPanel(() =>
     {
         var b = new CardButton(new FML(clickedCallback, f));
         b.setHeight(150);
         return b;
     }, new LayoutArgs(false, false));
     panel.Size = new Size(300, 150);
     panel.BackColor = Color.Navy;
     p.addObserver(panel);
     window = GUI.showWindow(panel);
 }
Ejemplo n.º 2
0
 private void sizeButton(CardButton b)
 {
     int height = Size.Height;
     int width = Size.Width;
     if (layoutArgs.topDown)
     {
         b.setWidth(width - sidePadding * 2);
     }
     else
     {
         b.setHeight(height - sidePadding * 2);
     }
 }