umstyling + meetingresource
This commit is contained in:
@@ -9,15 +9,20 @@ public sealed partial class MeetingControlDragData(MeetingControl meetingControl
|
||||
public partial class MeetingControl : Control
|
||||
{
|
||||
[Export]
|
||||
public Meeting Meeting;
|
||||
public MeetingPhysicsBox MeetingPhysicsBox;
|
||||
|
||||
public bool InSlot { get; set; }
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
Modulate = MeetingPhysicsBox.MeetingResource.Color;
|
||||
MeetingControlGfx.MeetingTitle.Text = MeetingPhysicsBox.MeetingResource.Title;
|
||||
}
|
||||
|
||||
public override Variant _GetDragData(Vector2 atPosition)
|
||||
{
|
||||
var preview = CreatePreview();
|
||||
SetDragPreview(preview);
|
||||
GD.Print("asdasdasdasd as dasd");
|
||||
Visible = false;
|
||||
|
||||
InSlot = false;
|
||||
@@ -37,18 +42,13 @@ public partial class MeetingControl : Control
|
||||
{
|
||||
if (what == NotificationDragEnd)
|
||||
{
|
||||
GD.Print("Drag End");
|
||||
|
||||
if (InSlot)
|
||||
{
|
||||
GD.Print("Dropped in Slot");
|
||||
return;
|
||||
}
|
||||
|
||||
GD.Print("Dropped somewhere");
|
||||
|
||||
FindParent("Main").AddChild(Meeting);
|
||||
Meeting.Position = GetGlobalMousePosition();
|
||||
FindParent("Main").AddChild(MeetingPhysicsBox);
|
||||
MeetingPhysicsBox.Position = GetGlobalMousePosition();
|
||||
QueueFree();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user