DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ DisplayHint()

void DisplayHint ( string message)
protected

См. определение в файле ScriptConsole.c строка 660

661 {
662 if (message)
663 {
664 m_HintWidgetRoot = g_Game.GetWorkspace().CreateWidgets("gui/layouts/script_console/script_console_hint.layout");
665 m_HintWidgetBackground = ImageWidget.Cast(m_HintWidgetRoot.FindAnyWidget("Background"));
666 m_HintWidget = RichTextWidget.Cast(m_HintWidgetRoot.FindAnyWidget("HintText"));
667
668 m_HintWidgetRoot.Show(true);
669 m_HintWidget.SetText(message);
670
671 int offsetX = 0;
672 int offsetY = 10;
673
674 int screenW, screenH;
675 GetScreenSize(screenW, screenH);
676
677 int mouseX, mouseY;
678 GetMousePos(mouseX,mouseY);
679
680 float relativeX = mouseX / screenW;
681 float relativeY = mouseY / screenH;
682
683 int width, height;
684 m_HintWidget.GetTextSize(width, height);
685 if (relativeX > 0.8)
686 offsetX = -width - offsetX;
687 if (relativeY > 0.8)
688 offsetY = -height - offsetY;
689
690 m_HintWidgetRoot.SetPos(mouseX + offsetX ,mouseY + offsetY);
691 m_HintWidgetBackground.SetScreenSize(width + 5, height + 5);
692
693 }
694 }
DayZGame g_Game
Определения DayZGame.c:3942
ImageWidget m_HintWidgetBackground
Определения ScriptConsole.c:618
RichTextWidget m_HintWidget
Определения ScriptConsole.c:619
Widget m_HintWidgetRoot
Определения ScriptConsole.c:617
Определения gameplay.c:317
proto void GetScreenSize(out int x, out int y)
proto void GetMousePos(out int x, out int y)

Перекрестные ссылки g_Game, GetMousePos(), GetScreenSize(), m_HintWidget, m_HintWidgetBackground и m_HintWidgetRoot.

Используется в HoverSuccess().