@@ -10,9 +10,11 @@ EventControl::EventControl(
1010 HINSTANCE hInstance,
1111 int x,
1212 int y,
13- Engine3DRadSpace::Reflection::Event* event
13+ Engine3DRadSpace::Reflection::Event* event,
14+ Engine3DRadSpace::Objects::ObjectList* list
1415) : IControl(owner, hInstance),
15- _event(event)
16+ _event(event),
17+ _list(list)
1618{
1719 HDC hdc = GetDC (owner);
1820
@@ -40,7 +42,7 @@ EventControl::EventControl(
4042 x + 10 ,
4143 y + textSize.cy + 10 ,
4244 260 - sgnTextSize.cx ,
43- 480 ,
45+ 370 ,
4446 owner,
4547 nullptr ,
4648 hInstance,
@@ -55,8 +57,8 @@ EventControl::EventControl(
5557 WS_VISIBLE | WS_CHILD ,
5658 btnPosX,
5759 y + textSize.cy + 10 ,
58- textSize .cx + 5 ,
59- textSize .cy + 5 ,
60+ ( 2 * sgnTextSize .cx ) + 5 ,
61+ sgnTextSize .cy + 5 ,
6062 owner,
6163 nullptr ,
6264 hInstance,
@@ -65,12 +67,12 @@ EventControl::EventControl(
6567
6668 _btnRemoveCall = CreateWindowExA (0 ,
6769 " Button" ,
68- " -" ,
70+ " -" ,
6971 WS_VISIBLE | WS_CHILD ,
7072 btnPosX,
7173 y + textSize.cy + 10 + sgnTextSize.cy + 5 ,
72- textSize .cx + 5 ,
73- textSize .cy + 5 ,
74+ ( 2 * sgnTextSize .cx ) + 5 ,
75+ sgnTextSize .cy + 5 ,
7476 owner,
7577 nullptr ,
7678 hInstance,
@@ -87,14 +89,15 @@ void EventControl::HandleClick(HWND clickedWindow)
8789 {
8890 std::thread openFnFinderWindow ([this ]()
8991 {
90- AddFunctionDialog dialog (this ->window , this ->instance , nullptr );
92+ AddFunctionDialog dialog (this ->window , this ->instance , this -> _list );
9193 auto event = dialog.ShowDialog ();
9294
9395 if (event.has_value ())
9496 {
9597
9698 }
9799 });
100+ openFnFinderWindow.detach ();
98101 }
99102
100103 if (clickedWindow == _btnRemoveCall)
0 commit comments