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

◆ DisplayHint()

void DisplayHint ( string message)
protected

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

861 {
862 if (message)
863 {
864 m_HintWidgetRoot = g_Game.GetWorkspace().CreateWidgets("gui/layouts/script_console/script_console_hint.layout");
865 m_HintWidgetBackground = ImageWidget.Cast(m_HintWidgetRoot.FindAnyWidget("Background"));
866 m_HintWidget = RichTextWidget.Cast(m_HintWidgetRoot.FindAnyWidget("HintText"));
867
868 m_HintWidgetRoot.Show(true);
869 m_HintWidget.SetText(message);
870
871 int offsetX = 0;
872 int offsetY = 10;
873
874 int screenW, screenH;
875 GetScreenSize(screenW, screenH);
876
877 int mouseX, mouseY;
878 GetMousePos(mouseX,mouseY);
879
880 float relativeX = mouseX / screenW;
881 float relativeY = mouseY / screenH;
882
883 int width, height;
884 m_HintWidget.GetTextSize(width, height);
885 if (relativeX > 0.8)
886 offsetX = -width - offsetX;
887 if (relativeY > 0.8)
888 offsetY = -height - offsetY;
889
890 m_HintWidgetRoot.SetPos(mouseX + offsetX ,mouseY + offsetY);
891 m_HintWidgetBackground.SetScreenSize(width + 5, height + 5);
892
893 }
894 }
DayZGame g_Game
Определения DayZGame.c:4074
ImageWidget m_HintWidgetBackground
Определения ScriptConsole.c:78
RichTextWidget m_HintWidget
Определения ScriptConsole.c:80
Widget m_HintWidgetRoot
Определения ScriptConsole.c:77
Определения 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().