예제 #1
0
 public ColorPicker(Vector2 position)
 {
     _grabRed   = new Graber(position + new Vector2(64, 40), 0, Game1.Textures["ColorBarRed"], UpdateRedText);
     _grabGreen = new Graber(position + new Vector2(64, 64) + new Vector2(0, 40), 0, Game1.Textures["ColorBarGreen"], UpdateGreenText);
     _grabBlue  = new Graber(position + new Vector2(64, 64) + new Vector2(0, 40 + 64), 0, Game1.Textures["ColorBarBlue"], UpdateBlueText);
     _texRed    = new TextBox(_grabRed.GetValue().ToString(), 64, position + new Vector2(256 + 96, 50), textBoxType.number, UpdateRed, 0, 255);
     _texGreen  = new TextBox(_grabRed.GetValue().ToString(), 64, position + new Vector2(256 + 96, 50 + 64), textBoxType.number, UpdateGreen, 0, 255);
     _texBlue   = new TextBox(_grabRed.GetValue().ToString(), 64, position + new Vector2(256 + 96, 50 + 128), textBoxType.number, UpdateBlue, 0, 255);
     _position  = position;
 }
예제 #2
0
 public Vector3 GetColor()
 {
     return(new Vector3(_grabRed.GetValue(), _grabGreen.GetValue(), _grabBlue.GetValue()));
 }