HunT Posted August 15, 2011 Share Posted August 15, 2011 Hi all. I have finish my panel shop but I have a problem with the resolution For me is ok why i play in 1280X960X32 ,the problem is many guys play in 800x600x32 Images : My resolution 1280X960X32 resolution 800x600x32 Solutions? i don't want resize 20 bottons 2 windows end 11 images. Help me please. Link to comment
Kenix Posted August 15, 2011 Share Posted August 15, 2011 You need use relative = true in gui functions. Edit .Use this https://wiki.multitheftauto.com/wiki/CenterWindow edit 2 .for more better effect you need resize all buttons , images and etc . Link to comment
HunT Posted August 15, 2011 Author Share Posted August 15, 2011 Edit : centerWindow no good Other Solution ? resize all elements stress me Link to comment
JR10 Posted August 15, 2011 Share Posted August 15, 2011 Center window should work, if you are using the guieditor, which you are, show your GUI, load it to the guieditor, settings >> tick relative. Then print code again, if you don't want to do that, here: local sX, sY = guiGetScreenSize() local left = sX / 2 - windowWidth / 2 local top = sY / 2 - windowHeight / 2 And use left top, as x y for the window. Link to comment
HunT Posted August 15, 2011 Author Share Posted August 15, 2011 For one window is ok guiGetScreenSize or function "centerWindow" But my panel have 2 windows and images + bottons indipendent from windows This is client side. Help please this is my first project in GUI. Link to comment
HunT Posted August 16, 2011 Author Share Posted August 16, 2011 Fixed + Resize all local sWidth, sHeight = guiGetScreenSize() local Width,Height = 420,300 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) bigWindow = guiCreateWindow(X,Y,Width,Height,"",false) guiWindowSetMovable(bigWindow,false) guiWindowSetSizable(bigWindow,false) Tnx For support TheRock Link to comment
CapY Posted August 16, 2011 Share Posted August 16, 2011 Easier way .... Load GUI with guieditor and print absolute and relative position . Link to comment
HunT Posted August 16, 2011 Author Share Posted August 16, 2011 Easier way ....Load GUI with guieditor and print absolute and relative position . Now is ok. Next Project use the multi Windows. Tnx anyway Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now