Notify on window resize?

Discuss GUI programming with the RapaGUI plugin here
Post Reply
User avatar
lazi
Posts: 333
Joined: Thu Feb 24, 2011 11:08 pm

Notify on window resize?

Post by lazi » Sun Jan 13, 2019 9:27 pm

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!

User avatar
airsoftsoftwair
Posts: 3065
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Notify on window resize?

Post by airsoftsoftwair » 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 :)

User avatar
lazi
Posts: 333
Joined: Thu Feb 24, 2011 11:08 pm

Re: Notify on window resize?

Post by lazi » Wed Jan 16, 2019 11:22 pm

Nice, thanks!

User avatar
jPV
Posts: 260
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Notify on window resize?

Post by jPV » Thu Jan 17, 2019 6:17 pm

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 :)
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...

User avatar
airsoftsoftwair
Posts: 3065
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Notify on window resize?

Post by airsoftsoftwair » Sat Jan 19, 2019 5:33 pm

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.

User avatar
r-tea
Posts: 123
Joined: Tue Feb 16, 2016 11:48 pm
Location: Zdzieszowice, Poland
Contact:

Re: Notify on window resize?

Post by r-tea » Tue Jan 22, 2019 6:50 pm

jPV wrote:
Thu Jan 17, 2019 6:17 pm
And if there isn't a Hollywood display, any way then?
Maybe embed a "fake" Hollywood display? For example 1x1 ttransparent area.

sinisrus
Posts: 261
Joined: Tue Apr 21, 2015 5:43 pm

Re: Notify on window resize?

Post by sinisrus » Wed Jan 23, 2019 4:23 pm

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

sinisrus
Posts: 261
Joined: Tue Apr 21, 2015 5:43 pm

Re: Notify on window resize?

Post by sinisrus » Fri Jan 25, 2019 9:34 am

small error > "win" = "winbase"

Post Reply