public virtual void UpdateScreenSize() { var screenZero = MyGuiManager.GetNormalizedCoordinateFromScreenCoordinate_FULLSCREEN(new Vector2(0, 0)); var screenMax = MyGuiManager.GetNormalizedCoordinateFromScreenCoordinate_FULLSCREEN(new Vector2(MyMinerGame.ScreenSize.X, MyMinerGame.ScreenSize.Y)); var textBoxSize = MyGuiConstants.TEXTBOX_MEDIUM_SIZE; var treeViewSize = new Vector2(textBoxSize.X, screenMax.Y - (MyGuiConstants.TOOLBAR_PADDING.Y * 6 + textBoxSize.Y + MyGuiConstants.TOOLBAR_BUTTON_SIZE.Y)); var panelSize = treeViewSize + new Vector2(MyGuiConstants.TOOLBAR_PADDING.X * 2, MyGuiConstants.TOOLBAR_PADDING.Y * 3) + new Vector2(0, textBoxSize.Y); var textBoxPosition = screenZero + new Vector2(MyGuiConstants.TOOLBAR_PADDING.Y * 2, MyGuiConstants.TOOLBAR_PADDING.Y * 3 + MyGuiConstants.TOOLBAR_BUTTON_SIZE.Y); var treeViewPosition = textBoxPosition + new Vector2(0, textBoxSize.Y + MyGuiConstants.TOOLBAR_PADDING.Y); var panelPosition = textBoxPosition - new Vector2(MyGuiConstants.TOOLBAR_PADDING.Y, MyGuiConstants.TOOLBAR_PADDING.Y); if (m_controlPanel == null) { CreateControls(); } m_controlPanel.SetPosition(panelPosition + panelSize / 2); m_controlPanel.SetSize(panelSize); m_addObjectTreeView.SetPosition(treeViewPosition + treeViewSize / 2); m_addObjectTreeView.SetSize(treeViewSize); m_filterTextbox.SetPosition(textBoxPosition + textBoxSize / 2); Vector2 editVoxelHandPanelSize = new Vector2(panelSize.X * 1.4f, panelSize.Y); m_editVoxelHand.SetPosition(panelPosition + editVoxelHandPanelSize / 2); UpdateToolbarButtonsSizeAndPosition(); }