DisplayTextObjectFX
- Juan Carlos
- Posts: 969
- Joined: Mon Sep 06, 2010 1:02 pm
DisplayTextObjectFX
This instruction on Linux doesn't work DisplayTextObjectFX, the text isn't showed, any idea?
- airsoftsoftwair
- Posts: 5943
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: DisplayTextObjectFX
MCVE please 
- Juan Carlos
- Posts: 969
- Joined: Mon Sep 06, 2010 1:02 pm
Re: DisplayTextObjectFX
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
Re: DisplayTextObjectFX
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.
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()
- Juan Carlos
- Posts: 969
- Joined: Mon Sep 06, 2010 1:02 pm
Re: DisplayTextObjectFX
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.
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.
Re: DisplayTextObjectFX
Ok. But don't just tell us.
Show us.
And, did you try my example?
Show us.
And, did you try my example?
- Juan Carlos
- Posts: 969
- Joined: Mon Sep 06, 2010 1:02 pm
Re: DisplayTextObjectFX
Yes, and on Linux Mint it works.
- airsoftsoftwair
- Posts: 5943
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: DisplayTextObjectFX
- Juan Carlos
- Posts: 969
- Joined: Mon Sep 06, 2010 1:02 pm
Re: DisplayTextObjectFX
It is a little complicated make a little example for you, but I'll try it.
Re: DisplayTextObjectFX
Whenever I’ve looked for bugs like this, it’s almost always turned out to be a minor issue in my own code.
While you are trying to build the “little example”, you might want to watch out for problems like these:
- A layer is covering the text objects that were created
- The text objects are transparent (SetFontColor can can be set to an ARGB value)
- The generated text objects have the same color as the background on which they are displayed and are therefore not visible
- The font size is too small
- The position could also be a cause, but probably not in your example, since there are fixed values there.
I don’t have any idea right now why something like this would happen only on Linux, but you have to start looking somewhere.
While you are trying to build the “little example”, you might want to watch out for problems like these:
- A layer is covering the text objects that were created
- The text objects are transparent (SetFontColor can can be set to an ARGB value)
- The generated text objects have the same color as the background on which they are displayed and are therefore not visible
- The font size is too small
- The position could also be a cause, but probably not in your example, since there are fixed values there.
I don’t have any idea right now why something like this would happen only on Linux, but you have to start looking somewhere.