Author Topic: New feature: vertical text alignment  (Read 7086 times)

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
New feature: vertical text alignment
« on: June 13, 2018, 03:30:53 PM »
I’ve added some additional flags to fe.text.align property
Align.TopCentre
Align.TopLeft
Align.TopRight
Align.BottomCentre
Align.BottomLeft
Align.BottomRight





I would like you to test it with your fonts and report if it aligns nicely.
I’m attaching a compiled attract.exe x64 and an example layout for testing

https://1drv.ms/u/s!Ag7uFeM0f_fzhOM9Eb2a5bKE6dKv1g
« Last Edit: June 13, 2018, 05:47:33 PM by Oomek »

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: New feature: vertical text alignment
« Reply #1 on: June 13, 2018, 05:22:44 PM »
i will have a go,   and report back tomorrow  thanks...

Q: this am64 you compiled would not happen to be the one
that is set up to run your new ambiance theme would it?   ;D ;D

maybee.......


update:
 it is saying that the archive is damaged   ,,when you try to open...
will try later
« Last Edit: June 13, 2018, 05:26:03 PM by jedione »
help a friend....

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: New feature: vertical text alignment
« Reply #2 on: June 13, 2018, 05:38:53 PM »
No. It’s a separate fork. I will merge them if there were no issues.

The file was too large, I’ve swapped it with the link to my OneDrive.
« Last Edit: June 13, 2018, 05:48:57 PM by Oomek »

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: New feature: vertical text alignment
« Reply #3 on: June 13, 2018, 08:03:54 PM »
cool thanks,    ;)
help a friend....

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: New feature: vertical text alignment
« Reply #4 on: June 15, 2018, 10:39:05 AM »
Added the following align modes:

Align.TopLeft, Align.TopRight, Align.TopCentre,
Align.BottomLeft, Align.BottomRight, Align.BottomCentre,
Align.MiddleLeft, Align.MiddleRight, Align.MiddleCentre

The modes:
Align.MiddleLeft, Align.MiddleRight, Align.MiddleCentre

replace the:
Align.Left, Align.Right, Align.Centre

The old align modes:
Align.Left, Align.Right, Align.Centre
are still working like before for compatibility reasons





The old alignment modes were quite unreliable causing random vertical shift depending on the font used.
If your custom font is off vertically and your text aligment is set to Align.Left you just swap it with Align.MiddleLeft and it should be positioned pixel-perfect
« Last Edit: June 15, 2018, 10:44:44 AM by Oomek »

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: New feature: vertical text alignment
« Reply #5 on: June 15, 2018, 07:51:37 PM »
REALLY GREAT WORK...THANKS
help a friend....

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: New feature: vertical text alignment
« Reply #6 on: June 16, 2018, 06:53:35 AM »
Your exe is not compatible with :

Code: [Select]
if (fe.load_module("Debug")) log <- Log();

Not run with my theme layout and not shows "last_run.log" file.
Nacer a los 15 años Una novela de iOtero

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: New feature: vertical text alignment
« Reply #7 on: June 16, 2018, 10:19:18 AM »
Thanks for the work , I love this new feature.
I have tried and I dont know if something is going wrong.



Super Sidekicks 2 , Super Sidekicks 3 the word "Super" has dissapeard.

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: New feature: vertical text alignment
« Reply #8 on: June 17, 2018, 01:05:41 PM »
The word "Super" disappears because of the bug? in AM which I’m currently working on I fixed already. If the text does not fit into the box AM cuts the sides and leaves only the middle part if word_wrap is enabled. Weird decision, but that’s how it was originally coded.

Update:

I asked Andrew to explain if it's whether a bug or feature. I need to know that before I pull the changes to Github.
Below is the video describing that odd behaviour. Both text boxes have default align modes.

https://www.youtube.com/watch?v=7QEVZ5mDMjc
« Last Edit: June 17, 2018, 06:54:04 PM by Oomek »

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: New feature: vertical text alignment
« Reply #9 on: June 17, 2018, 01:06:13 PM »
Your exe is not compatible with :

Code: [Select]
if (fe.load_module("Debug")) log <- Log();

Not run with my theme layout and not shows "last_run.log" file.

Thanks, I’ll look into it. Maybe it’s because I renabled the old debug window in the make file. If you compile it from my branch it should work.

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: New feature: vertical text alignment
« Reply #10 on: June 18, 2018, 12:48:15 AM »

Thanks, I’ll look into it. Maybe it’s because I renabled the old debug window in the make file. If you compile it from my branch it should work.


 ;D ;D ;Dhttp://forum.attractmode.org/index.php?topic=2278.0;topicseen ;D ;D ;D
Nacer a los 15 años Una novela de iOtero

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: New feature: vertical text alignment
« Reply #11 on: June 18, 2018, 02:33:42 AM »
Your exe is not compatible with :

Code: [Select]
if (fe.load_module("Debug")) log <- Log();

Not run with my theme layout and not shows "last_run.log" file.

Can you explain what is the purpose and describe the functionality of that plugin?

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: New feature: vertical text alignment
« Reply #12 on: June 18, 2018, 03:56:53 AM »
Is a AM DEBUG mode.
Generate a file "last_run.log" with the console messages, and errors found, and/or the data you want in your layout with a code like this:

Code: [Select]
::print(" > DEBUG: " + fe.game_info(Info.Emulator) + "\n");

https://github.com/keilmillerjr/debug-module
« Last Edit: June 18, 2018, 04:01:49 AM by zlagos »
Nacer a los 15 años Una novela de iOtero

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: New feature: vertical text alignment
« Reply #13 on: June 18, 2018, 04:35:20 AM »
Hmm, i still don’t see any benefit of using it. Isn’t using a console version quicker in debugging?

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: New feature: vertical text alignment
« Reply #14 on: June 18, 2018, 08:45:32 AM »
I use a version compiled in June 2018 by Mark Ormond to use the options by display and not just by layout, and I only have that exe.

Never i used debugger for console.
Nacer a los 15 años Una novela de iOtero