Good evening Gentlemans!
Can't find the way to get notified when a RapaGUI window is resized by the user.
There are Hollywood displays that should be redrawn after window resize.
Is it possible somehow?
The same question is applicable to MUIRoyale too.
Thanks!
Notify on window resize?
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Notify on window resize?
If there's a Hollywood display embedded in your GUI, you just have to listen to the normal "SizeWindow" event for the Hollywood display and then you should be notified about size changes
Re: Notify on window resize?
And if there isn't a Hollywood display, any way then? I just recently wanted to scale an MUI (Royale) image if window size changes, but didn't find a way to notice it yet...airsoftsoftwair wrote: ↑Wed Jan 16, 2019 10:36 pm If there's a Hollywood display embedded in your GUI, you just have to listen to the normal "SizeWindow" event for the Hollywood display and then you should be notified about size changes
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Notify on window resize?
Without a Hollywood display there's currently no way to get notified when a window is resized. I'll see if I can add this for the future.
Re: Notify on window resize?
My solution for this :
Code: Select all
Function p_Move()
IF (mui.get("win","Width")<>FlagWinWidth$) OR (mui.get("win","Height")<>FlagWinHeight$)
FlagWinWidth$=mui.get("winbase","Width")
FlagWinHeight$=mui.get("winbase","Height")
DebugPrint("Change Size Window")
EndIF
Endfunction
IntervalDessin=SetInterval(NIL, p_Move, 1000/200) ; 100fps
Re: Notify on window resize?
small error > "win" = "winbase"
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Notify on window resize?
Code: Select all
- New: Added Window.SizeChange [N] attribute; this allows you to listen to window size changes; whenever
the event callback is triggered, the "Width" and "Height" member fields will contain the new window size