public void AddImage(Vector2D position, UIEditorScene uiEditorScene) { uiControl = uiEditorScene.uiControl; if (!IsDraggingImage) return; var sprite = AddNewImageToList(position, uiEditorScene); uiEditorScene.SetSingleSelectedControl(sprite); uiControl.Index = uiEditorScene.Scene.Controls.IndexOf(sprite); uiControl.EntityWidth = sprite.DrawArea.Width; uiControl.EntityHeight = sprite.DrawArea.Height; uiControl.contentText = ""; uiControl.ControlName = sprite.Name; IsDraggingImage = false; IsDragging = false; Messenger.Default.Send(sprite.Name, "AddToHierachyList"); }
public void AddImage(Vector2D position, UIEditorScene uiEditorScene) { uiControl = uiEditorScene.uiControl; if (!IsDraggingImage) { return; } var sprite = AddNewImageToList(position, uiEditorScene); uiEditorScene.SetSingleSelectedControl(sprite); uiControl.Index = uiEditorScene.Scene.Controls.IndexOf(sprite); uiControl.EntityWidth = sprite.DrawArea.Width; uiControl.EntityHeight = sprite.DrawArea.Height; uiControl.contentText = ""; uiControl.ControlName = sprite.Name; IsDraggingImage = false; IsDragging = false; Messenger.Default.Send(sprite.Name, "AddToHierachyList"); }
public void AddLabel(Vector2D position, UIEditorScene uiEditorScene) { uiControl = uiEditorScene.uiControl; if (!IsDraggingLabel) { return; } var label = AddNewLabelToList(position, uiEditorScene); uiEditorScene.SetSingleSelectedControl(label); uiControl.Index = uiEditorScene.Scene.Controls.IndexOf(label); uiControl.contentText = "Default Label"; uiControl.EntityWidth = label.DrawArea.Width; uiControl.EntityHeight = label.DrawArea.Height; uiControl.ControlName = label.Name; IsDraggingLabel = false; IsDragging = false; Messenger.Default.Send(label.Name, "AddToHierachyList"); }
public void AddButton(Vector2D position, UIEditorScene uiEditorScene) { uiControl = uiEditorScene.uiControl; if (!IsDraggingButton) { return; } var button = AddNewButtonToList(position, uiEditorScene); uiEditorScene.SetSingleSelectedControl(button); uiControl.Index = uiEditorScene.Scene.Controls.IndexOf(button); uiControl.contentText = "Default Button"; uiControl.EntityWidth = button.DrawArea.Width; uiControl.EntityHeight = button.DrawArea.Height; uiControl.contentText = "Defualt button"; uiControl.ControlName = button.Name; IsDraggingButton = false; IsDragging = false; Messenger.Default.Send(button.Name, "AddToHierachyList"); }
public void AddSlider(Vector2D position, UIEditorScene uiEditorScene) { uiControl = uiEditorScene.uiControl; if (!IsDraggingSlider) return; var slider = AddNewSliderToList(position, uiEditorScene); uiEditorScene.SetSingleSelectedControl(slider); uiControl.Index = uiEditorScene.Scene.Controls.IndexOf(slider); uiControl.contentText = "Default Slider"; uiControl.EntityWidth = slider.DrawArea.Width; uiControl.EntityHeight = slider.DrawArea.Height; uiControl.ControlName = slider.Name; IsDraggingSlider = false; IsDragging = false; Messenger.Default.Send(slider.Name, "AddToHierachyList"); }
public void AddLabel(Vector2D position, UIEditorScene uiEditorScene) { uiControl = uiEditorScene.uiControl; if (!IsDraggingLabel) return; var label = AddNewLabelToList(position, uiEditorScene); uiEditorScene.SetSingleSelectedControl(label); uiControl.Index = uiEditorScene.Scene.Controls.IndexOf(label); uiControl.contentText = "Default Label"; uiControl.EntityWidth = label.DrawArea.Width; uiControl.EntityHeight = label.DrawArea.Height; uiControl.ControlName = label.Name; IsDraggingLabel = false; IsDragging = false; Messenger.Default.Send(label.Name, "AddToHierachyList"); }
public void AddButton(Vector2D position, UIEditorScene uiEditorScene) { uiControl = uiEditorScene.uiControl; if (!IsDraggingButton) return; var button = AddNewButtonToList(position, uiEditorScene); uiEditorScene.SetSingleSelectedControl(button); uiControl.Index = uiEditorScene.Scene.Controls.IndexOf(button); uiControl.contentText = "Default Button"; uiControl.EntityWidth = button.DrawArea.Width; uiControl.EntityHeight = button.DrawArea.Height; uiControl.contentText = "Defualt button"; uiControl.ControlName = button.Name; IsDraggingButton = false; IsDragging = false; Messenger.Default.Send(button.Name, "AddToHierachyList"); }