Dayz Explorer 1.29.162510
Loading...
Searching...
No Matches
serverbrowserentry.c
Go to the documentation of this file.
1class ServerBrowserEntry extends ScriptedWidgetEventHandler
2{
3 protected Widget m_Root;
4 protected Widget m_Favorite;
5
6 //Basic info
7 protected TextWidget m_ServerName;
8 protected TextWidget m_ServerPopulation;
9 protected TextWidget m_ServerSlots;
10 protected TextWidget m_ServerPing;
11 protected ImageWidget m_ServerTime; // not currently displayed
12 protected ImageWidget m_ServerLock;
13 protected ImageWidget m_ServerModIcon;
14 protected ImageWidget m_ServerMaKIcon;
15
16 //Detailed info
17 protected TextWidget m_ServerShard;
18 protected TextWidget m_ServerCharacterAlive;
19 protected TextWidget m_ServerFriends;
20 protected TextWidget m_ServerMode;
21 protected TextWidget m_ServerBattleye;
22 protected TextWidget m_ServerIP;
23 protected TextWidget m_ServerAcceleration;
24 protected TextWidget m_ServerMap;
25 protected TextWidget m_ServerMods;
26 protected ButtonWidget m_ServerModsExpand;
27 protected ref array<string> m_Mods;
28
29 protected Widget m_DetailedInfo;
30 protected bool m_IsExpanded;
31 protected bool m_IsFavorited;
32 protected bool m_IsOnline;
33
34 protected ref GetServersResultRow m_ServerData;
35 protected int m_Index;
36 protected ServerBrowserTab m_Tab;
37 protected bool m_Selected;
38 protected bool m_FirstExpand = true;
39
40 void ServerBrowserEntry(Widget parent, int index, ServerBrowserTab tab)
41 {
42 #ifdef PLATFORM_CONSOLE
43 m_Root = g_Game.GetWorkspace().CreateWidgets("gui/layouts/new_ui/server_browser/xbox/server_browser_list_entry.layout", parent);
44 #else
45 m_Root = g_Game.GetWorkspace().CreateWidgets("gui/layouts/new_ui/server_browser/pc/server_browser_list_entry_pages.layout", parent);
46 #endif
47
48 m_Root.Enable(true);
49 m_Favorite = m_Root.FindAnyWidget("favorite_button");
50 m_ServerName = TextWidget.Cast(m_Root.FindAnyWidget("server_name"));
51 m_ServerPopulation = TextWidget.Cast( m_Root.FindAnyWidget("server_population"));
52 m_ServerSlots = TextWidget.Cast(m_Root.FindAnyWidget("server_slots"));
53 m_ServerPing = TextWidget.Cast(m_Root.FindAnyWidget("server_ping"));
54 m_ServerTime = ImageWidget.Cast(m_Root.FindAnyWidget("server_time"));
55 m_ServerLock = ImageWidget.Cast(m_Root.FindAnyWidget("lock_icon"));
56 m_ServerModIcon = ImageWidget.Cast(m_Root.FindAnyWidget("modded_icon"));
57 m_ServerMaKIcon = ImageWidget.Cast(m_Root.FindAnyWidget("mandk_icon"));
58
59 m_ServerShard = TextWidget.Cast(m_Root.FindAnyWidget("shard_text"));
60 m_ServerCharacterAlive = TextWidget.Cast(m_Root.FindAnyWidget("character_alive_text"));
61 m_ServerFriends = TextWidget.Cast(m_Root.FindAnyWidget("steam_friends_text"));
62 m_ServerMode = TextWidget.Cast(m_Root.FindAnyWidget("mode_text"));
63 m_ServerBattleye = TextWidget.Cast(m_Root.FindAnyWidget("battlleye_text"));
64 m_ServerIP = TextWidget.Cast(m_Root.FindAnyWidget("ip_text"));
65 m_ServerAcceleration = TextWidget.Cast(m_Root.FindAnyWidget("server_acceleration_text"));
66 m_ServerMap = TextWidget.Cast(m_Root.FindAnyWidget("server_map"));
67 m_ServerMods = TextWidget.Cast(m_Root.FindAnyWidget("mods_text"));
68 m_ServerModsExpand = ButtonWidget.Cast(m_Root.FindAnyWidget("mods_expand"));
69
70 m_DetailedInfo = m_Root.FindAnyWidget("detailed_info");
71
72 m_Root.FindAnyWidget("basic_info").Show(true);
73 m_Root.FindAnyWidget("favorite_image").Update();
74 m_Root.FindAnyWidget("unfavorite_image").Update();
75
76 m_Index = index;
77 m_Tab = tab;
78 m_IsOnline = true;
79
80 m_ServerTime.LoadImageFile(0, "set:dayz_gui image:icon_sun");
81 m_ServerTime.LoadImageFile(1, "set:dayz_gui image:icon_sun_accel");
82 m_ServerTime.LoadImageFile(2, "set:dayz_gui image:icon_moon");
83 m_ServerTime.LoadImageFile(3, "set:dayz_gui image:icon_moon_accel");
84
85 m_Root.SetHandler(this);
86 }
87
88 void ~ServerBrowserEntry()
89 {
90 delete m_Root;
91 }
92
93 Widget GetRoot()
94 {
95 return m_Root;
96 }
97
98 void Show(bool show)
99 {
100 m_Root.Show(show);
101 }
102
103 // Method never gets called on console!
104 override bool OnClick(Widget w, int x, int y, int button)
105 {
106 if (!IsOnline() || w == null)
107 {
108 return false;
109 }
110
111 switch (w)
112 {
113 #ifdef PLATFORM_CONSOLE
114 case m_Root:
115 {
116 m_Tab.Connect(this);
117 return true;
118 }
119 #endif
120 case m_ServerModsExpand:
121 {
122 string mods_text;
123 if (m_Mods && m_Mods.Count() > 0)
124 {
125 mods_text = m_Mods[0];
126 for (int i = 1; i < m_Mods.Count(); i++)
127 {
128 mods_text += "\n" + m_Mods[i];
129 }
130 }
131
132 g_Game.GetUIManager().ShowDialog("#main_menu_mods", mods_text, 0, 0, 0, 0, g_Game.GetUIManager().GetMenu());
133 return true;
134 }
135 }
136
137 return false;
138 }
139
140 override bool OnDoubleClick(Widget w, int x, int y, int button)
141 {
142 if (!IsOnline())
143 {
144 return false;
145 }
146
147 if (button == MouseState.LEFT && w == m_Root)
148 {
149 m_Tab.Connect(this);
150 return true;
151 }
152
153 return false;
154 }
155
156 override bool OnMouseButtonUp(Widget w, int x, int y, int button)
157 {
158 if (button == MouseState.LEFT)
159 {
160 switch (w)
161 {
162 case m_Favorite:
163 {
164 ToggleFavorite();
165 return true;
166 }
167 case m_Root:
168 {
169 OnSelect();
170 return true;
171 }
172 }
173 }
174 return false;
175 }
176
177 void OnSelect()
178 {
179 Darken(m_Root, 0, 0);
180 Select();
181 SetFocus(m_Root);
182 m_Tab.SetServerDetails(m_ServerData, m_IsOnline);
183 }
184
185 override bool OnMouseEnter(Widget w, int x, int y)
186 {
187 if (IsFocusable(w))
188 {
189 Preview(w, x, y);
190 return true;
191 }
192
193 return false;
194 }
195
196 override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
197 {
198 if (IsFocusable(w) && !IsFocusable(enterW))
199 {
200 Lighten(w, enterW, x, y);
201 return true;
202 }
203
204 return false;
205 }
206
207 void Focus()
208 {
209 SetFocus(m_Root);
210 }
211
212 void ServerListFocus(bool focus)
213 {
214 m_Tab.ServerListFocus(focus, m_IsFavorited);
215 }
216
217 override bool OnFocus(Widget w, int x, int y)
218 {
219 if (!m_Selected)
220 {
221 if (IsFocusable(w))
222 Darken(w, x, y);
223
224 #ifdef PLATFORM_CONSOLE
225 if (w == m_Root)
226 {
227 Select();
228 ServerListFocus(true);
229 m_Tab.SetServerDetails(m_ServerData, m_IsOnline);
230 }
231 #endif
232
233 return true;
234 }
235 return false;
236 }
237
238 override bool OnFocusLost(Widget w, int x, int y)
239 {
240 #ifdef PLATFORM_CONSOLE
241 if (w == m_Root)
242 {
243 Deselect();
244 ServerListFocus(false);
245 }
246 #endif
247
248 if (IsFocusable(w))
249 {
250 Lighten(w, null, x, y);
251 }
252
253 return true;
254 return false;
255 }
256
257 bool IsOnline()
258 {
259 return m_IsOnline;
260 }
261
262 bool IsFocusable(Widget w)
263 {
264 if (w)
265 return (w == m_Root || w == m_Favorite || w == m_ServerModsExpand);
266
267 return false;
268 }
269
270 void FillInfo(GetServersResultRow server_info)
271 {
272 m_ServerData = server_info;
273 m_FirstExpand = true;
274
275 #ifndef PLATFORM_CONSOLE
276 m_DetailedInfo.Show(server_info.m_IsExpanded);
277 #endif
278
279 SetName(server_info.m_Name);
280 SetPasswordLocked(server_info.m_IsPasswordProtected);
281 SetPopulationEx(server_info);
282 SetSlots(server_info.m_MaxPlayers);
283 SetPing(server_info.m_Ping);
284 SetFavorite(server_info.m_Favorite);
285 SetModded(server_info.m_Modded);
286 SetServerMapName();
287 RefreshDLCIcon();
288
289 #ifdef PLATFORM_CONSOLE
290 SetMouseAndKeyboard(server_info.m_MouseAndKeyboardEnabled);
291 #endif
292
293#ifdef PLATFORM_WINDOWS
294 #ifndef PLATFORM_CONSOLE
295 SetExpand(server_info.m_IsExpanded);
296
297 int pp = 0; // private
298 if (server_info.m_ShardId.Length() == 3 && server_info.m_ShardId.ToInt() < 200)
299 {
300 pp = 1; // official
301 }
302
303 SetShard(pp);
304 SetCharacterAlive(server_info.m_CharactersAlive);
305 SetFriends(server_info.m_SteamFriends);
306 SetMode(server_info.m_Disable3rdPerson);
307 SetBattleye(server_info.m_AntiCheat);
308 SetIP(server_info.m_Id);
309 SetAcceleration(server_info.m_EnvironmentTimeMul);
310 #endif
311#endif
312 }
313
314 void UpdateEntry()
315 {
316 if (m_ServerData.m_IsSelected)
317 {
318 Darken(m_Root, 0, 0);
319 Select();
320 SetFocus(m_Root);
321 }
322 else
323 {
324 Lighten(m_Root, null, 0, 0);
325 Deselect();
326 }
327 }
328
329 void SetName(string name)
330 {
331 m_ServerName.SetText(name);
332 }
333
334 void SetPasswordLocked(bool locked)
335 {
336 m_ServerLock.Show(locked);
337 }
338
339 private void SetPopulationEx(GetServersResultRow serverInfo)
340 {
341 string popText = "";
342 int population = serverInfo.m_CurrentNumberPlayers;
343 int maxPlayers = serverInfo.m_MaxPlayers;
344 int playersInQueue = serverInfo.m_PlayersInQueue;
345
346 if (IsOnline())
347 {
348 // sometimes servers report a queue size even though server isn't full,
349 // in which case we ignore queue size
350 if (playersInQueue > 0 && population == maxPlayers)
351 {
352 popText = population.ToString() + "+" + playersInQueue.ToString() + "/" + maxPlayers.ToString();
353 }
354 else
355 {
356 popText = population.ToString() + "/" + maxPlayers.ToString();
357 }
358 }
359
360 else
361 {
362 popText = "-";
363 }
364
365 m_ServerPopulation.SetText(popText);
366 }
367
368 void SetSlots(int slots)
369 {
370 if (IsOnline())
371 {
372 m_ServerSlots.SetText(slots.ToString());
373 }
374 else
375 {
376 m_ServerSlots.SetText("-");
377 }
378 }
379
380 void SetPing(int ping)
381 {
382 int color;
383 string displayValue;
384
385 if (ping < 50)
386 color = ARGBF(1, 0, 1, 0);
387 else if(ping < 100)
388 color = ARGBF(1, 0.8, 0.8, 0);
389 else if( ping < 200 )
390 color = ARGBF(1, 1, 0.5, 0);
391 else
392 color = ARGBF(1, 1, 0, 0);
393
394 if (IsOnline())
395 {
396 displayValue = ping.ToString();
397 }
398
399 else
400 {
401 displayValue = "-";
402 }
403
404 m_ServerPing.SetColor(color);
405 m_ServerPing.SetText(displayValue);
406 }
407
408 void SetTime(string time, float multiplier)
409 {
410 if (time != "")
411 {
412 TStringArray arr = new TStringArray;
413
414 time.Split(":", arr);
415
416 if (arr.Count() == 2)
417 {
418 int hour = arr.Get(0).ToInt();
419 int minute = arr.Get(1).ToInt();
420
421 if (hour >= 19 || hour <= 5) //Night
422 {
423 if (multiplier > 1)
424 m_ServerTime.SetImage(3);
425 else
426 m_ServerTime.SetImage(2);
427 }
428 else //Day
429 {
430 if (multiplier > 1)
431 m_ServerTime.SetImage(1);
432 else
433 m_ServerTime.SetImage(0);
434 }
435 }
436 }
437 }
438
439 void SetShard(int shard)
440 {
441 string text;
442 switch (shard)
443 {
444 case 0:
445 {
446 text = "#server_browser_entry_private";
447 break;
448 }
449 case 1:
450 {
451 text = "#server_browser_entry_official";
452 break;
453 }
454 }
455 m_ServerShard.SetText(text);
456 }
457
458 void RefreshDLCIcon()
459 {
460 if (m_ServerData.m_IsDLC)
461 {
462 bool own = g_Game.VerifyWorldOwnership(GetMapToRun());
463 m_ServerModIcon.Show(true);
464 m_ServerModIcon.FindWidget("Owned").Show(own);
465 m_ServerModIcon.FindWidget("Unowned").Show(!own);
466 }
467 else
468 {
469 m_ServerModIcon.FindWidget("Owned").Show(false);
470 m_ServerModIcon.FindWidget("Unowned").Show(false);
471 }
472 }
473
474 void SetCharacterAlive(string char_alive)
475 {
476 if (char_alive == "")
477 m_ServerCharacterAlive.SetText("#STR_server_browser_char_not_alive");
478 else
479 m_ServerCharacterAlive.SetText(char_alive);
480 }
481
482 void SetFriends(string friends_text)
483 {
484 m_ServerFriends.SetText(friends_text);
485 }
486
487 void SetMode(int mode)
488 {
489 string text;
490 switch (mode)
491 {
492 case 0:
493 {
494 text = "#server_browser_entry_person_both";
495 break;
496 }
497 case 1:
498 {
499 text = "#server_browser_entry_person_first";
500 break;
501 }
502 }
503 m_ServerMode.SetText(text);
504 }
505
506 void SetBattleye(bool battleye)
507 {
508 if (battleye)
509 {
510 m_ServerBattleye.SetText("#server_browser_entry_enabled");
511 m_ServerBattleye.SetColor(ARGBF(1, 0, 1, 0));
512 }
513 else
514 {
515 m_ServerBattleye.SetText("#server_browser_entry_disabled");
516 m_ServerBattleye.SetColor(ARGBF(1, 1, 0, 0));
517 }
518 }
519
520 void SetIP(string ip)
521 {
522 m_ServerIP.SetText(ip);
523 }
524
525 string GetIP()
526 {
527 return m_ServerData.GetIP();
528 }
529
530 int GetPort()
531 {
532 return m_ServerData.m_HostPort;
533 }
534
535 int GetSteamQueryPort()
536 {
537 return m_ServerData.m_SteamQueryPort;
538 }
539
540 string GetServerID()
541 {
542 return m_ServerData.m_Id;
543 }
544
545 string GetMapToRun()
546 {
547 return m_ServerData.m_MapNameToRun;
548 }
549
550 void SetFavorite(bool favorite)
551 {
552 m_IsFavorited = favorite;
553 m_Root.FindAnyWidget("favorite_image").Show(favorite);
554 m_Root.FindAnyWidget("unfavorite_image").Show(!favorite);
555 }
556
557 void SetAcceleration(float mult)
558 {
559 if (mult > 1)
560 {
561 m_ServerAcceleration.Show(true);
562 m_ServerAcceleration.SetText(mult.ToString() + "x");
563 }
564 else
565 {
566 m_ServerAcceleration.Show(false);
567 }
568 }
569
570 void SetModded(bool is_modded)
571 {
572 m_ServerModIcon.Show(is_modded);
573 }
574
575 void SetServerMapName()
576 {
577 string displayValue = "-";
578
579 if (IsOnline())
580 {
581 displayValue = ServerBrowserHelperFunctions.GetMapDisplayName(m_ServerData.m_MapNameToRun);
582 }
583
584 m_ServerMap.SetText(displayValue);
585 }
586
587 void SetMods(array<string> mods)
588 {
589 m_Mods = mods;
590
591 if (mods && mods.Count() > 0)
592 {
593 string mods_text = mods[0];
594 for (int i = 1; i < mods.Count(); i++)
595 mods_text += ", " + mods[i];
596
597 m_ServerMods.SetText(mods_text);
598 }
599
600 #ifdef PLATFORM_WINDOWS
601 m_ServerModsExpand.Show((mods && mods.Count() > 0));
602 #endif
603 }
604
605 void SetMouseAndKeyboard(bool is_mkenabled)
606 {
607 m_ServerMaKIcon.Show(is_mkenabled);
608 }
609
610 void SetIsOnline(bool isOnline)
611 {
612 m_IsOnline = isOnline;
613 }
614
615 bool ToggleFavorite()
616 {
617 m_IsFavorited = !m_IsFavorited;
618 string ip = m_ServerData.GetIP();
619#ifdef PLATFORM_WINDOWS
620 //Save Data PC
621 m_Tab.GetRootMenu().AddFavorite(ip, m_ServerData.m_HostPort, m_IsFavorited);
622
623 #ifdef PLATFORM_CONSOLE
624 OnlineServices.SetServerFavorited(ip, 0, m_ServerData.m_SteamQueryPort, m_IsFavorited);
625 #else
626 OnlineServices.SetServerFavorited(ip, m_ServerData.m_HostPort, m_ServerData.m_SteamQueryPort, m_IsFavorited);
627 #endif
628#else
629 //Save Data Console
630 m_IsFavorited = m_Tab.GetRootMenu().SetFavoriteConsoles(ip, m_ServerData.m_HostPort, m_IsFavorited);
631#endif
632
633 m_Root.FindAnyWidget("unfavorite_image").Show(!m_IsFavorited);
634 m_Root.FindAnyWidget("favorite_image").Show(m_IsFavorited);
635
636 return m_IsFavorited;
637 }
638
639 bool ToggleExpand()
640 {
641 return SetExpand(!m_IsExpanded);
642 }
643
644 bool SetExpand(bool expand)
645 {
646 m_IsExpanded = expand;
647 m_Root.FindAnyWidget("collapse_image").Show(m_IsExpanded);
648 m_Root.FindAnyWidget("expand_image").Show(!m_IsExpanded);
649 m_DetailedInfo.Show(m_IsExpanded);
650
651 if (m_ServerData)
652 {
653 m_ServerData.m_IsExpanded = m_IsExpanded;
654 }
655
656 if (expand && m_FirstExpand)
657 {
658 if (m_ServerData.m_Modded)
659 {
660 OnlineServices.GetServerModList(m_ServerData.m_Id);
661 }
662
663 m_FirstExpand = false;
664 }
665
666 return m_IsExpanded;
667 }
668
669 void Select(bool notify = true)
670 {
671 if (!m_Selected)
672 {
673 if (notify)
674 {
675 m_Tab.SelectServer(this);
676 }
677
678 m_ServerData.m_IsSelected = true;
679 m_Selected = true;
680 }
681 }
682
683 void Deselect()
684 {
685 if (m_Selected)
686 {
687 m_ServerData.m_IsSelected = false;
688 m_Selected = false;
689
690 Lighten(m_Root, null, 0, 0);
691 }
692 }
693
694 void UpdateColors()
695 {
696 float alpha = 1;
697 int maxPlayers = m_ServerData.m_MaxPlayers;
698 int whiteColor = ARGBF(1, 1, 1, 1);
699 int populationColor = whiteColor;
700 int populationOutline = 1;
701
702 if (IsOnline())
703 {
704 if (maxPlayers > 0)
705 {
706 int population = m_ServerData.m_CurrentNumberPlayers;
707 float pop_percentage = population / maxPlayers;
708
709 if (pop_percentage >= 1)
710 {
711 populationColor = ARGBF(1, 1, 0, 0);
712 }
713 else if (pop_percentage >= 0.8)
714 {
715 populationColor = ARGBF(1, 1, 0.5, 0);
716 }
717 }
718 }
719 else
720 {
721 alpha = 0.5;
722 populationOutline = 0;
723
724 m_ServerPing.SetColor(whiteColor);
725 }
726
727 m_ServerTime.Show(IsOnline());
728 m_ServerName.SetColor(whiteColor);
729 m_ServerName.SetAlpha(alpha);
730 m_ServerPopulation.SetBold(IsOnline());
731 m_ServerPopulation.SetColor(populationColor);
732 m_ServerPopulation.SetOutline(populationOutline);
733 m_ServerPopulation.SetAlpha(alpha);
734 m_ServerSlots.SetAlpha(alpha);
735 m_ServerPing.SetAlpha(alpha);
736 m_Root.SetAlpha(alpha);
737 }
738
739 //Coloring functions (Until WidgetStyles are useful)
740 void Preview(Widget w, int x, int y)
741 {
742 if (m_Selected)
743 return;
744
745 switch (w)
746 {
747 case m_Root:
748 case m_Favorite:
749 {
750 m_Root.SetColor(ARGB(255, 0, 0, 0));
751 m_Root.SetAlpha(1);
752 UpdateColors();
753
754 m_ServerName.SetColor(ARGB(255, 255, 0, 0));
755 if (!IsOnline())
756 {
757 m_ServerName.SetAlpha(0.5);
758 }
759 break;
760 }
761 }
762 }
763
764 //Coloring functions (Until WidgetStyles are useful)
765 void Darken(Widget w, int x, int y)
766 {
767 if (m_Selected)
768 return;
769
770 switch (w)
771 {
772 case m_Root:
773 case m_Favorite:
774 {
775 m_Root.SetColor(ARGB(255, 200, 0, 0));
776 SetPopulationEx(m_ServerData);
777 UpdateColors();
778 break;
779 }
780 }
781 }
782
783 void Lighten(Widget w, Widget enterW, int x, int y)
784 {
785 float alpha = 0.3;
786
787 if (GetFocus() == w || m_Selected)
788 {
789 return;
790 }
791
792 if (w == m_Root && (m_Favorite && enterW == m_Favorite))
793 {
794 return;
795 }
796
797 m_Root.SetColor(ARGB(255, 0, 0, 0));
798 SetPopulationEx(m_ServerData);
799 UpdateColors();
800
801 if (m_Index % 2)
802 {
803 alpha = 0;
804 }
805
806 m_Root.SetAlpha(alpha);
807 }
808
809 GetServersResultRow GetServerData()
810 {
811 return m_ServerData;
812 }
813
814 // DEPRECATED
815 string GetMapName();
816
817 // DEPRECATED
818 void SetMapName(string mapName);
819
820 // DEPRECATED
821 void SetPopulation(int population, int slots);
822}
array< string > m_Mods
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DayZGame g_Game
Definition dayzgame.c:3942
void Show()
Definition dayzgame.c:163
override bool OnClick(Widget w, int x, int y, int button)
buttons clicks
Definition dayzgame.c:152
array< string > TStringArray
Definition enscript.c:712
MouseState
Definition ensystem.c:311
Icon x
Icon y
override bool OnDoubleClick(Widget w, int x, int y, int button)
void SetTime(float time)
DEPRECATED.
int ARGB(int a, int r, int g, int b)
Definition proto.c:322
int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.
Definition proto.c:332
override bool OnMouseButtonUp(Widget w, int x, int y, int button)
Definition radialmenu.c:669
void ServerBrowserTab(Widget parent, ServerBrowserMenuNew menu, TabType type)
void ServerListFocus(bool focus, bool favorite)
void Focus()
override bool OnFocusLost(Widget w, int x, int y)
bool IsFocusable(Widget w)
override bool OnFocus(Widget w, int x, int y)
Widget m_Root
Definition sizetochild.c:91
override bool OnMouseEnter(Widget w, int x, int y)
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)