popups centered on screen

Caesium

Radiant!
Joined
Jan 14, 2006
Messages
526
Hi!

It's me again with another question.
How do I get popups to show up centered on the screen?
I can't find the trigger.

Caesium
 
Code:
textResolution=CyUserProfile().getResolutionString(CyUserProfile().getResolution())
textResolution=textResolution.split('x')
pasx=int(textResolution[0])/10
pasy=int(textResolution[1])/10
popup=CyPopup(-1,EventContextTypes.NO_EVENTCONTEXT, 1)
popup.setPosition(3*pasx,3*pasy)
popup.setSize(4*pasx,4*pasy)

I've not test the setSize(,) because my popup is centered without it . But ,i put it in in case ...
 
Back
Top Bottom