Rapagui disable normal display

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

Rapagui disable normal display

Post by lazi »

Just found, when I add @REQUIRE "rapagui" to the beginning of the script and nothing more rapagui related, the normal Hollywood display don't show.
The program runs, but without display.

I'd like to add a preferences window by RapaGUI to a script which is using entirely the Hollywood display library. MUIRoyale behave normal, doesn't oppress the hw display.

Is it some RTFM or a bug, can't decide yet. :)
User avatar
lazi
Posts: 649
Joined: Thu Feb 24, 2011 11:08 pm

Re: Rapagui disable normal display

Post by lazi »

A workaround is if loading RapaGUI by LoadPlugin().

So it seems a bug to me.
User avatar
lazi
Posts: 649
Joined: Thu Feb 24, 2011 11:08 pm

Re: Rapagui disable normal display

Post by lazi »

Unfortunately the workaround not plays well on win32: "Cannot set adapter!"
User avatar
lazi
Posts: 649
Joined: Thu Feb 24, 2011 11:08 pm

Re: Rapagui disable normal display

Post by lazi »

Unfortunately I cannot edit my previous posts, so sorry for the flooding.

You have to use OpenDisplay(1) after @REQUIRE "rapagui" to have normal display.
It works on win32 too, but brings another problem which I will report after a more adequate investigation :)
User avatar
msu
Posts: 71
Joined: Mon Jun 13, 2016 11:36 am
Location: Sinzig/Germany

Re: Rapagui disable normal display

Post by msu »

A code example would be helpful.
User avatar
lazi
Posts: 649
Joined: Thu Feb 24, 2011 11:08 pm

Re: Rapagui disable normal display

Post by lazi »

As you wish:

Code: Select all

@REQUIRE "rapagui"
@DISPLAY {mode="windowed",width=640,height=480}

NPrint("Hello there!")

WaitLeftMouse
               
User avatar
msu
Posts: 71
Joined: Mon Jun 13, 2016 11:36 am
Location: Sinzig/Germany

Re: Rapagui disable normal display

Post by msu »

Hi lazi,
you have to integrate the display into RapaGUI.
Example:

Code: Select all

@REQUIRE "RapaGUI"
;@DISPLAY {mode="windowed",width=640,height=480}
GUI$=[[<application id="app">

<window id="Main" Title="Test">
	<vgroup>
		<hollywood display="1" width="640" height="480"/>
	</vgroup>
</window>
</application>]]

moai.CreateApp(GUI$)

Function p_EventFunc(msg)
	
EndFunction

InstallEventHandler({RapaGUI=p_EventFunc})
NPrint("Hello there!")


Repeat
	WaitEvent
Forever
User avatar
lazi
Posts: 649
Joined: Thu Feb 24, 2011 11:08 pm

Re: Rapagui disable normal display

Post by lazi »

Thanks for your help, but I don't want to do that, because I want to use fullscreen even if the pasted example using windowed.
As I said before, it works with an OpenDisplay(), but don't know if it is an intended behaviour or not.
User avatar
msu
Posts: 71
Joined: Mon Jun 13, 2016 11:36 am
Location: Sinzig/Germany

Re: Rapagui disable normal display

Post by msu »

I honestly don't know of any GUI system that runs on user-defined screens.
Think you will have to decide there.
User avatar
lazi
Posts: 649
Joined: Thu Feb 24, 2011 11:08 pm

Re: Rapagui disable normal display

Post by lazi »

What I mean Hollywood display is opens in a normal GUI window or if fullscreen -especiallya on Amiga- it is a normal system pubscreen.
Beside this window or on that screen we can open another windows. And that windows can be MUI windows created by one of our GUI plugins.

I just wanted to say, that with @REQUIRE "rapagui", the normal default Hollywood display (window) not displayed at all which should not necessary.
For example with @REQUIRE "muiroyale" which uses the same GUI on Amiga (MUI) as RapaGUI works nicely with the default Hollywood window.
And rapagui is working too after an OpenDisplay(1) instruction.

The normal behaviour that you can freely use GUI plugin windows and Hollywood display windows together. Only the two GUI plugins can't be used together.

And finally I have found in the RapaGUI docs, (so it was RTFM):
- RapaGUI automatically hides all Hollywood displays on startup whereas MUI
Royale doesn't do this. On MUI Royale you manually have to declare the
default display as hidden.
Post Reply