ChangeDisplaySize() vs SetDisplayAttributes()

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

ChangeDisplaySize() vs SetDisplayAttributes()

Post by lazi »

While RapaGUI in on and I want to change a separate -non embedded- display's size, only SetDisplayAttributes() makes visible effect.

Try this test case:

Code: Select all

@REQUIRE "rapagui"
@DISPLAY 1,{hidden=False, title="World", mode="windowed", width=320, height=200}

Const #scrolldisplay = 1


TextOut(#CENTER,#CENTER, "Press LMB")

;SetDisplayAttributes({width=640, height=480})

TextOut(#CENTER,#CENTER, "Display changed!")
The OpenDisplay() is needed because RapaGUI keeps the display closed by default.
If you run the script, the text will be vanish and the display attributes are changes but the window will keeps the same size.
Then you should uncomment SetDisplayAttributes() and comment out ChangeDisplaySize() and voila, works as expected.

Now the question: bug or feature? :-)

(OS4.1FEu2, Peg2, HW9, RapaGUI 2.1)

User avatar
Posts: 5036
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany

Re: ChangeDisplaySize() vs SetDisplayAttributes()

Post by airsoftsoftwair »

lazi wrote:
Sun Feb 06, 2022 2:10 pm
Now the question: bug or feature? :-)
Looks like a bug, I'll check ;)

Post Reply