523 {
525 {
526 return;
527 }
528
529 if ( item.IsInherited( InventoryItem ) )
530 {
532
535
536 int screen_w, screen_h;
537 float w, h;
540
542 {
543 x = screen_w/2 - w/2;
544 float x1,y1;
545 m_RootWidget.FindAnyWidget(
"InventoryFrameWidget").GetScreenPos(x1,y1);
547 }
548 else if (
x == 0 &&
y == 0 &&
GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer())
549 {
551 }
552
553
554 screen_w -= 10;
555 screen_h -= 10;
556
557 int rightEdge =
x + w;
558 if (rightEdge > screen_w)
559 {
561 }
562
563 int bottomEdge =
y + h;
564 if (bottomEdge > screen_h)
565 {
567 }
568
570
573
575 if (preview_frame)
576 {
580 }
581 }
582 }
const float TOOLTIP_DELAY
ref Widget m_TooltipWidget
ItemPreviewWidget m_ItemPreviewWidget
proto native CGame GetGame()
proto void GetScreenSize(out int x, out int y)
proto void GetMousePos(out int x, out int y)