453 {
454 if (message)
455 {
456 m_HintWidgetRoot =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/script_console/script_console_hint.layout");
459
462
463 int offsetX = 0;
464 int offsetY = 10;
465
466 int screenW, screenH;
468
469 int mouseX, mouseY;
471
472 float relativeX = mouseX / screenW;
473 float relativeY = mouseY / screenH;
474
475 int width, height;
477 if (relativeX > 0.8)
478 offsetX = -width - offsetX;
479 if (relativeY > 0.8)
480 offsetY = -height - offsetY;
481
484
485 }
486 }
proto void GetScreenSize(out int x, out int y)
proto void GetMousePos(out int x, out int y)