SetMapPos it doesn't work correctly if the widget size is set to "small"
if the mapwidget is larger than ~800x600, or full screen, - all ok.
i create gui with mapwidget, 635x442, and SetMapPos it doesn't work correctly...
p.s. sry for my eng
SetMapPos it doesn't work correctly if the widget size is set to "small"
if the mapwidget is larger than ~800x600, or full screen, - all ok.
i create gui with mapwidget, 635x442, and SetMapPos it doesn't work correctly...
p.s. sry for my eng
FrameWidgetClass rootFrame { size 821 621 halign center_ref valign center_ref hexactpos 1 vexactpos 1 hexactsize 1 vexactsize 1 scaled 0 { PanelWidgetClass PanelWidgetMap { ignorepointer 1 position 65 100 size 635 442 hexactpos 1 vexactpos 1 hexactsize 1 vexactsize 1 scaled 0 style EditorPanel { MapWidgetClass MapWidget_Quest { position 0 0 size 1 1 halign center_ref valign center_ref visible 1 hexactpos 1 vexactpos 1 hexactsize 0 vexactsize 0 scaled 0 } } } } }
class testscript extends UIScriptedMenu { private PlayerBase m_Player = PlayerBase.Cast( GetGame().GetPlayer() ); private MapWidget m_MapWidget_Quest; override Widget Init() { layoutRoot = GetGame().GetWorkspace().CreateWidgets( "you.layout" ); m_MapWidget_Quest = MapWidget.Cast( layoutRoot.FindAnyWidget( "MapWidget_Quest" ) ); m_MapWidget_Quest.SetMapPos( m_Player.GetPosition() ); return layoutRoot; } }
testscript v_testscript = new testscript (); GetGame().GetUIManager().ShowScriptedMenu( v_testscript, NULL );