Quantcast
Channel: Latest Questions by Yanger_xy
Viewing all articles
Browse latest Browse all 61

How to Control GUILayout.Window's Size

$
0
0
Hello,everyone. I wanna to draw a window with some other controls in it using GUILayout.Window, But i can not control the window's size, for it is a little small for my application after GUILayout calculate its size, Here is part of the code: public int _wndWidth = 450; public int _wndHeight = 420; private Rect _rectWnd; void Start() { _rectWnd = new Rect(Screen.width * 0.5f - _wndWidth * 0.5f, Screen.height * 0.5f - _wndHeight * 0.5f, _wndWidth, _wndHeight); } void OnGUI { _rectWnd = GUILayout.Window(GlobalGUIWindowId._WND1_YXY, _rectWnd, ShowParamsWnd, _wndTitle, _guiSkin.window, GUILayout.MinWidth(_wndWidth), GUILayout.MinHeight(_wndHeight)); } private void ShowParamsWnd(int id) { //some other controls. } the final effect is below: 125![alt text][1]125 [1]: http://en.gravatar.com/userimage/24104274/6e1238bbad8a30ba57d9b12da8c0cc87.png?size=200 How to control the window's size, i want to enlarge it. Thanks in advance!

Viewing all articles
Browse latest Browse all 61

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>