umstyling + meetingresource

This commit is contained in:
2026-07-27 22:11:29 +02:00
parent 1061ae90b1
commit c1e9cd4293
16 changed files with 169 additions and 62 deletions

View File

@@ -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();
}
}