CreateTextObject using Align

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

Re: CreateTextObject using Align

Post by Juan Carlos »

You are very, very wrong, I am not looking for you to do the routines for me, once again you are one of those people who does not listen, I do not want your code, the code posted above, it is the simple way to avoid the typical message from Mr. Falkenhahn asking for a exact example, and in that example it can be seen how the text does not fit to the right margin, following the steps that the manual describes, but you have preferred, instead of contributing an idea, to blame the problem of not using Layers, and when you I have said that I am using them, it is when you did not like my answer and especially Mr. Perfect.
I could have written the entire code to show where I could go wrong and you kindly do it for me, and I sit comfortably in my easy chair waiting for praise for how good I am at nudging.
I'm already tired, because it's not the first time I've heard that the bug is from the programmer, not the program, and then see how people like you find the bugs and voila, that bug actually existed, while I have to pretend to be ignorant, or how Mr. Falkenhahn usually does ignore problems if I report them, well, this is a hobby, if you don't want to listen to suggestions, then don't be surprised by the criticism that there is about Hollywood.
And yes, as I know your next step, I use Hollywood because unfortunately there isn't anything better on the Amiga, but that doesn't give me the right to reply with +1.
User avatar
emeck
Posts: 169
Joined: Fri Apr 03, 2015 3:17 pm

Re: CreateTextObject using Align

Post by emeck »

Hi Templario,

I think you don't understand how alignment for TextObject works. As I understand, it "aligns inside" the TextObject. So if your text object is just one line, it doesn't really matters because the size of the "page" for that TextObject is the size of the text. So center, right, left or justified will look the same for that TextObject. If there are more than one line, then the alignment is visible, but with respect to the longest line in the text, inside that TextObject, not with respect to the display.

This very basic script shows what I mean:

Code: Select all

CreateTextObject(1,"Hello Templario\nThis is the second line.\nAnd this is the third one\nAlignment is left.",{Align = #LEFT})
DisplayTextObject(1, #CENTER,#CENTER-100)

CreateTextObject(2,"This is another TextObject\nThis is the second line.\nAnd this is the third one\nAlignment is right.",{Align = #RIGHT})
DisplayTextObject(2, #CENTER,#CENTER)

CreateTextObject(3,"This is the last TextObject\nThis is the second line.\nAnd this is the third one\nAlignment is justified.",{Align = #JUSTIFIED})
DisplayTextObject(3, #CENTER,#CENTER+100)

Repeat
    WaitEvent
Forever
So, TextObject's alignment property is not the alignment with the display, but with what is inside the TextObject.

If you need to align several TextObjects inside your display, you need to position them according to your needs.

Regards,
Enrique
PowerBook 5.2 MorphOS 3.15
PowerBook 5.8 MorphOS 3.15
Amiga 1200 BPPC/BVision AOS4.1 FE
User avatar
Juan Carlos
Posts: 891
Joined: Mon Sep 06, 2010 1:02 pm

Re: CreateTextObject using Align

Post by Juan Carlos »

emeck wrote: Thu Jul 20, 2023 4:26 pm Hi Templario,

I think you don't understand how alignment for TextObject works. As I understand, it "aligns inside" the TextObject. So if your text object is just one line, it doesn't really matters because the size of the "page" for that TextObject is the size of the text. So center, right, left or justified will look the same for that TextObject. If there are more than one line, then the alignment is visible, but with respect to the longest line in the text, inside that TextObject, not with respect to the display.

This very basic script shows what I mean:

Code: Select all

CreateTextObject(1,"Hello Templario\nThis is the second line.\nAnd this is the third one\nAlignment is left.",{Align = #LEFT})
DisplayTextObject(1, #CENTER,#CENTER-100)

CreateTextObject(2,"This is another TextObject\nThis is the second line.\nAnd this is the third one\nAlignment is right.",{Align = #RIGHT})
DisplayTextObject(2, #CENTER,#CENTER)

CreateTextObject(3,"This is the last TextObject\nThis is the second line.\nAnd this is the third one\nAlignment is justified.",{Align = #JUSTIFIED})
DisplayTextObject(3, #CENTER,#CENTER+100)

Repeat
    WaitEvent
Forever
So, TextObject's alignment property is not the alignment with the display, but with what is inside the TextObject.

If you need to align several So, TextObject's alignment property is not the alignment with the display, but with what is inside the TextObject.

If you need to align several TextObjects inside your display, you need to position them according to your needs.s inside your display, you need to position them according to your needs.

Regards,
Enrique
Hola Enrique, gracias por tú respuesta, el TextObject lo estoy usando con Layers, lo he usando sin Layers en una tabla de records, y cada línea es creada con el contenido de la tabla, yo he creado un sencillo ejemplo sin las líneas de código evitando leer lo del IMHO, y el resultado a sido el mismo, he preguntado por si era un bug del Hollywood porque como verás el ejemplo creado está calcado de los pasos que dice el manual para conseguir el efecto deseado resultando no funcionar, el ejemplo que has creado está bien para texto sencillo como mí ejemplo pero el problema persistirá, dado que los records no tienen siempre los mismos datos y números.
Por ejemplo en la que va a ser mí última aventura point and click en los títulos de crédito he tenido el mismo problema y al final he tenido que alinear las líneas a mano para que quedarán como los títulos de crédito de las películas, ni con el align ni con el Worwrap queda perfecto, al final tienes que trucarlo a mano para que quede efectivo, y me cansa porque al final parece que el Hollywood es fantástico pero muchas veces es porque tenemos que falsear o trucar las supuestas instrucciones. Y lo peor es que el sujeto A.F. en vez de dar la cara envia a un lacayo y encima se atrava a escribir +1, tendré que darle las gracias, otras veces ni responde para evitar que se vean las vergüenzas del Hollywood, eso sí si tu planteamiento es erroneo y no es un bug, ya se encarga de darte en los morros. Francamente con eso de que no hay nada mejor en Amiga es ya pasarse y abusar de la ilusión de la gente por mantener el hobby del Amiga vivo.
Y esto es todo porque igual se me calienta la boca y es peor, el mayor defecto que tiene el hobby del Amiga son los Mesias...
Gracias por tú tiempo, veré como lo apaño, y si no lo dejaré como está y si la gente me pregunta echaré la culpa al autor, como hace el cuando se la echa a los programadores de los sistemas operativos.
No hacer una ventana de resquester en condiones porque no le sale de los coj.. que da vergüenza en un Windows y Linux un requester tan cutre, y luego digan que este software es profesional...
Flinx
Posts: 192
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: CreateTextObject using Align

Post by Flinx »

Juan Carlos wrote: Thu Jul 20, 2023 9:27 pm Y lo peor es que el sujeto A.F. en vez de dar la cara envia a un lacayo
Siento haber intentado ayudarte de vez en cuando. No tenía ni idea de lo desagradable que eres.
User avatar
Juan Carlos
Posts: 891
Joined: Mon Sep 06, 2010 1:02 pm

Re: CreateTextObject using Align

Post by Juan Carlos »

Ya empezamos con las manias persecutorias, desagradable son las respuestas de tú amigo al que defiendes, si llevaras 20 años con el Hollywood como llevo yo, y cada vez que tienes una duda o problema te encuentras con la indiferencia, o con respuestas bruscas, entenderias, porque algunas personas, o bien han dejado este barco, o dan respuestas contundentes, lo que me sorprende es tú fibra sensible, no ha sido mí intención ofenderte, pero tal vez, seas de ese núcleo alemán, todo hay que decirlo, que me critica, insulta, en los roros en vuestro idioma, ayudarme, bueno, esta vez no has leído mí planteamiento, el ejmplo que tuve que poner fue lo más sencillo y paso a paso de los que describe el manual, tu respuesta más que una ayuda, fue, usa Layers, para ajustar los márgenes del CreateTextObject, eso es de poca ayuda o nula, porque podía haber puesto todo el código, y habría visto el típico mensaje de poner código sencillo, esto lo he hecho y en su lugar he recibido tú respuesta y el +1 del de siempre, lo cual si que es desagradable, y más c uando llevas 20 años pagando por un software incompleto y con bugs, pero en fin, no te moleste en ayudarme, yo con esto no voy a preguntar más sobre los bugs, esperare a que gente como tú le digais al Sr. Andreas donde están que a vosotros os hace más caso, a los demás nos espera gastar dinero esperando que ese bug se corriga, y en algunas ocasiones hay que esperar dos y tres actualizaciones de pago para verlas corregidas.
El que paga exige, esa es la máxima en el mundo comercial, en el hobby del Amiga se a convertido, en paga, paga, y si no te funciona te callas y no exigas, así va el hobby...
Flinx
Posts: 192
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: CreateTextObject using Align

Post by Flinx »

All right. I thought you weren't going to write anything now, and I was actually going to because of the insults. But it seems to be important to you. Still, I think you should moderate your tone.

I don't have a better answer than the one with the layers. Without layers, the text lines that are to be aligned together must be created together, and then displaying the individual lines with effects is not possible. This is also what emeck showed you with his example. With independent CreateTextObject() commands a common alignment to the right is not doable, because they don't have a common right border to align something to. After all, the position of the text is not determined until DisplayTextObject(), and by then the (already aligned) text object has long been finished.
This has an inner logic and is not a bug.
Hence my approach to calculate the margin by oneself and to set the position of the individual lines based on their width, but that only works with layers.

Let's wait and see if someone else has an idea.
And dares to write in this thread...
User avatar
Juan Carlos
Posts: 891
Joined: Mon Sep 06, 2010 1:02 pm

Re: CreateTextObject using Align

Post by Juan Carlos »

Flinx wrote: Fri Jul 21, 2023 1:39 pm All right. I thought you weren't going to write anything now, and I was actually going to because of the insults. But it seems to be important to you. Still, I think you should moderate your tone.

I don't have a better answer than the one with the layers. Without layers, the text lines that are to be aligned together must be created together, and then displaying the individual lines with effects is not possible. This is also what emeck showed you with his example. With independent CreateTextObject() commands a common alignment to the right is not doable, because they don't have a common right border to align something to. After all, the position of the text is not determined until DisplayTextObject(), and by then the (already aligned) text object has long been finished.
This has an inner logic and is not a bug.
Hence my approach to calculate the margin by oneself and to set the position of the individual lines based on their width, but that only works with layers.

Let's wait and see if someone else has an idea.
And dares to write in this thread...
I am a ogre, perhaps, the problem is in the documentation, that explain how do the things in a simple way and its examples, when the instructions need to be elaborated more to get the visual effects or result.
The problem was not with you but with the +1 as answer. Because the Hollywood isn't perfect but in theory this bugs section is to find bugs and problems to to improve it, respecting the one who writes the possible errors, not making fun of him, or ignoring him, as usually happens.
User avatar
Allanon
Posts: 732
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: CreateTextObject using Align

Post by Allanon »

Juan Carlos wrote: Wed Jul 19, 2023 2:24 pm I found this problem with the instruction CreateTextObject always it create the text object with the left align; I tryed to use with center and right but always the text object is showed to left by default, where is the problem, in below easy example, is visible this problem:

Code: Select all

;Always CreateTextObject uses Align=#LEFT
CreateTextObject(1, "DINERO")
CreateTextObject(2, "Perico 1000", {Align=#LEFT})
CreateTextObject(3, "Perico 30", {Align=#RIGHT})
CreateTextObject(4, "Perico 9", {Align=#CENTER})

DisplayTextObjectFX(1, 300, 10, {Type=#ZOOMCENTER, Speed=10}) 
DisplayTextObjectFX(2, 280, 30, {Type=#ZOOMCENTER, Speed=5})
DisplayTextObjectFX(3, 280, 50, {Type=#ZOOMCENTER, Speed=5})
DisplayTextObjectFX(4, 280, 70, {Type=#ZOOMCENTER, Speed=5})

EscapeQuit(False)
Repeat
  WaitEvent
Forever
Thanks for suggestions ideas, etc,
I don't know if my suggestion has been already said because I've stopped to read comments because they was irritating me, but here is a simple solution without involving layers and retaining your code almost as is:

Code: Select all

;Always CreateTextObject uses Align=#LEFT
CreateTextObject(1, "DINERO")
CreateTextObject(2, "Perico 1000", {Align=#LEFT}) ;<-- as said by others it referes to the "inside" area
CreateTextObject(3, "Perico 30", {Align=#RIGHT})
CreateTextObject(4, "Perico 9", {Align=#CENTER})

DisplayTextObjectFX(1, #CENTER, 10, {Type=#ZOOMCENTER, Speed=10})  ; <-- X = #CENTER , here instead you can refer to the display
DisplayTextObjectFX(2, #LEFT, 30, {Type=#ZOOMCENTER, Speed=5})
DisplayTextObjectFX(3, #RIGHT, 50, {Type=#ZOOMCENTER, Speed=5})
DisplayTextObjectFX(4, #CENTER, 70, {Type=#ZOOMCENTER, Speed=5})

EscapeQuit(False)
Repeat
  WaitEvent
Forever
Post Reply