public Vector2 ShowTextBox(Vector2 pos, Stroke st) { this.Location = new System.Drawing.Point((int)(pos.X + SystemParameter.clientBounds.Min.X), (int)(pos.Y + SystemParameter.clientBounds.Min.Y)); this.Show(); IsShown = true; boundingBox = new BoundingBox2D(new Vector2(pos.X , pos.Y), new Vector2(pos.X + width, pos.Y + height), 0f); s = st; return new Vector2(pos.X + this.Width, pos.Y); }
public Stroke createStroke(Vector2 pos) { Stroke s = new Stroke(pos, photos); StrokeBox[s] = null; setColor(s); return s; }
private void setColor(Stroke s) { tempColor = new Vector3(hue, 1f, 1f); Vector3 strokeColor = Vector3.Zero; ResourceManager.hsv2rgb(ref tempColor, out strokeColor); //Color sColor = new Color(strokeColor); s.Color = new Color(strokeColor); hue += 0.3f; if (hue > 1f) hue -= (int)hue; }
public void remove(Stroke s) { if (StrokeBox.ContainsKey(s)) { if (StrokeBox[s] != null) StrokeBox[s].Dispose(); StrokeBox.Remove(s); } }
public void moveTextBox(Stroke s) { if (StrokeBox.ContainsKey(s)) { s.deleteIcon = StrokeBox[s].showAgain(s.Strokes[s.Strokes.Count - 2]); s.barBounding = new BoundingBox2D(s.deleteIcon, s.deleteIcon + new Vector2(ResourceManager.batsuTex_.Width, ResourceManager.batsuTex_.Height), 0); } }
public void createTextBox(Vector2 pos, Stroke s) { FloatTextBox box = new FloatTextBox(); //textBoxes.Add(box); StrokeBox[s] = box; s.deleteIcon = box.ShowTextBox(pos, s); s.barBounding = new BoundingBox2D(s.deleteIcon, s.deleteIcon + new Vector2(ResourceManager.batsuTex_.Width, ResourceManager.batsuTex_.Height), 0); }