public ChooseList(TwoClient twoClient, int size, int width, int x, int y) { _twoClient = twoClient; _size = size; _backRec = new SmallBorderRect(_twoClient,x,width,y,size*20,0); ItemList = new List<string>(); _x = x; _y = y; _width = width; CurSelect = -1; _selectRect = new Rect(_twoClient,x+2,width-4,0,20,1); _stringPos = new List<Vector2>(); _clickRect = new List<Rectangle>(); _clickList = new List<IClickable>(); for( int i = 0; i < size; i ++) { _stringPos.Add(new Vector2(x + 3,y + 2 + 20 * i)); _clickRect.Add(new Rectangle(x,y + 20 * i,width,20)); _clickList.Add(new SelectItem(i)); } }
public TextField(TwoClient twoClient, string def, int x, int y, int length) { _twoClient = twoClient; _bgRect = new Rect(_twoClient, x, length * 15, y, 20, 0); Current = def; _stringPos = new Vector2(x + 2, y); }