601 {
602 int screen_w, screen_h;
603 float w, h;
605
607 int slot_normal_w = SlotsIcon.GetNormalWidth();
608 int slot_normal_h = SlotsIcon.GetNormalHeight();
609
610 screen_w -= 10;
611 screen_h -= 10;
612
613#ifndef PLATFORM_CONSOLE
615 y += slot_normal_h + 5;
616#else
619#endif
621 while (scrollerWidget)
622 {
623 if (ScrollWidget.Cast(scrollerWidget))
624 {
625 break;
626 }
627 else
628 {
629 scrollerWidget = scrollerWidget.GetParent();
630 }
631 }
632
633 int rightEdge =
x + w;
634 if (rightEdge > screen_w)
635 {
637 }
638
639 int bottomEdge =
y + h;
640 if (scrollerWidget)
641 {
642 float scrollerX, scrollerY, scrollerSizeX, scrollerSizeY;
643 scrollerWidget.GetScreenPos(scrollerX,scrollerY);
644 scrollerWidget.GetScreenSize(scrollerSizeX,scrollerSizeY);
645
646 int scroller_bottom = scrollerY + scrollerSizeY;
647 if (bottomEdge > scroller_bottom)
648 {
649 y = scroller_bottom - slot_normal_h;
651 }
652 }
653
654
655
656
657
658 if (bottomEdge > screen_h)
659 {
661 }
662
665 }
ref Widget m_TooltipSlotWidget
Widget m_TooltipSourceWidget
proto void GetScreenSize(out int x, out int y)