laserlaser Posted June 9, 2011 Posted June 9, 2011 function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end Example local wnd = guiCreateWindow(...) centerWindow(wnd)
will briggs Posted June 9, 2011 Posted June 9, 2011 May i ask what you need? Do you need help our is this an example... Founder of SAUR - Founder/Owner of ARC RPG
Callum Posted June 9, 2011 Posted June 9, 2011 You could make it; function centerWindow(window) local resX,resY = guiGetScreenSize() local w,h = guiGetSize(window,false) guiSetPosition(window,(resX/2)-(w/2),(resY/2)-(h/2),false) end Retired
karlis Posted June 10, 2011 Posted June 10, 2011 it would be most effective and recommended to put guiGetScreenSize() at front of any clientside script with dx/gui functions, so you don't have to call twice. [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
laserlaser Posted June 10, 2011 Author Posted June 10, 2011 It works, do you want to see? I want, and screen shots; Before After @karlis I can not understand you because my english is little english =)
Antibird Posted June 10, 2011 Posted June 10, 2011 2 lines are needed guiSetProperty( gui-window, "HorizontalAlignment", "Centre") guiSetProperty( gui-window, "VerticalAlignment", "Centre")
laserlaser Posted June 10, 2011 Author Posted June 10, 2011 2 lines are neededguiSetProperty( gui-window, "HorizontalAlignment", "Centre") guiSetProperty( gui-window, "VerticalAlignment", "Centre") I think, shut up.
Castillo Posted June 10, 2011 Posted June 10, 2011 laserlaser, please respect the forum rules and don't use bad language, edit your post. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
SugarD-x Posted June 10, 2011 Posted June 10, 2011 Stop flaming unless you want the topic locked and you all to receive forum warnings...or worse. Join #mta3vc and #Project-Redivivus on IRC! .:. Project Redivivus Discord .:. Project Redivivus Public GitHub Repository MTA 0.x File Archive #1 .:. Multi Theft Auto 0.5r2 for GTA III and VC .:. MTA 0.x File Archive #2 Project Redivivus Founder .:. Multi Theft Auto Supporter .:. Asshat Gaming Founder
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