DisplayTextObjectFX

Report any Hollywood bugs here
Post Reply
User avatar
Juan Carlos
Posts: 964
Joined: Mon Sep 06, 2010 1:02 pm

DisplayTextObjectFX

Post by Juan Carlos »

This instruction on Linux doesn't work DisplayTextObjectFX, the text isn't showed, any idea?
User avatar
airsoftsoftwair
Posts: 5938
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: DisplayTextObjectFX

Post by airsoftsoftwair »

MCVE please :)
User avatar
Juan Carlos
Posts: 964
Joined: Mon Sep 06, 2010 1:02 pm

Re: DisplayTextObjectFX

Post by Juan Carlos »

The example is very easy with the program star in a little background picture and showing the DisplayTextObjectFX, this problem only happen on Linux, on Windows, MorphOS and AmigaOS 3.9, not.
Function p_Intro()
PlaySample(1, 1)
EnableLayers()
DisplayBrush(1, 0, 0) ;Cover.
DisplayTextObjectFX(1, 20, 80, {Type=#RECTCENTER, Speed=10})
DisplayTextObjectFX(2, 40, 120, {Type=#RECTCENTER, Speed=10})
DisplayTextObjectFX(3, 200, 150, {Type=#RECTCENTER, Speed=10})
Wait(55)
CloseDisplay(1)

CreateDisplay(2, {Title="Baphomet Screen Saver", Desktop=True, Active=True, NoModeSwitch=True,
Color=#BLACK, DisableBlanker=True})
;SetScreenTitle(#Head) ;MorphOS.

AnchoIntro=GetAttribute(#DISPLAY, 2, #ATTRWIDTH)
AltoIntro=GetAttribute(#DISPLAY, 2, #ATTRHEIGHT)

;Para resoluciones inferiores a 640 el salvapantallas no funciona.
If AnchoIntro<=640
CreateDisplay(3, {Title="Baphomet Screen Saver", Width=320, Height=180, Color=#BLACK, Borderless=True,
NoClose=False, KeepProportions=True, Sizeable=False, NoModeSwitch=True, Active=True})

OpenDisplay(3)
DisplayBrush(2, 0, 0) ;Aviso.
DisplayTextObjectFX(1, #CENTER, 0, {Type=#RECTCENTER, Speed=10})
DisplayTextObjectFX(2, #CENTER, 50, {Type=#RECTCENTER, Speed=10})
DisplayTextObjectFX(4, #CENTER, 110, {Type=#RECTCENTER, Speed=10})
Wait(120)
End()

Else
OpenDisplay(2)

FreeBrush(1) ;Cover.
FreeBrush(2) ;Aviso.
FreeTextObject(1) ;Liberamos el Texto Objeto 1.
FreeTextObject(2) ;Liberamos el Texto Objeto 2.
FreeTextObject(3) ;Liberamos el Texto Objeto 3.
FreeTextObject(4) ;Liberamos el Texto Objeto 4.

FreeDisplay(1) ;Cierra y elimina la portada.

HidePointer()

p_Variables()

p_Inicio()
EndIf
EndFunction
Flinx
Posts: 364
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: DisplayTextObjectFX

Post by Flinx »

Hi Juan Carlos,
You're making it difficult to help you because your example doesn't work. It uses a lot of things that aren't available, so it's hard to tell where the problem lies.
Here are the relevant lines of your code, but of course they work on Linux too. (I expected that, since I've used the function before and never had a problem.)
If that doesn't help, then build a working example that doesn't work on Linux.

Code: Select all

Function p_Intro()
	DisplayTextObjectFX(1, 20, 80, {Type=#RECTCENTER, Speed=2})
	DisplayTextObjectFX(2, 40, 120, {Type=#RECTCENTER, Speed=10})
	Wait(55)
	CloseDisplay(1)
EndFunction 

SetFontColor(#YELLOW)
CreateTextObject(1, "TextObject number one")
CreateTextObject(2, "TextObject number two")

p_Intro()
User avatar
Juan Carlos
Posts: 964
Joined: Mon Sep 06, 2010 1:02 pm

Re: DisplayTextObjectFX

Post by Juan Carlos »

The code uses the BGPic 1, as little Windows to launch the main program, but this trick works in other systems less on Linux.
Also there are the textobjefts, but the basic visual effect is open a little Windows using the BGPic closes this Windows and open the main program window.
Flinx
Posts: 364
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: DisplayTextObjectFX

Post by Flinx »

Ok. But don't just tell us.
Show us.

And, did you try my example?
User avatar
Juan Carlos
Posts: 964
Joined: Mon Sep 06, 2010 1:02 pm

Re: DisplayTextObjectFX

Post by Juan Carlos »

Yes, and on Linux Mint it works.
Post Reply