Author Topic: Text styling questions  (Read 12904 times)

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: Text styling questions
« Reply #15 on: October 11, 2017, 07:42:22 PM »
ya this is working , for uppercase,
but.
it is dropping the magic tokin of  [!Players] at the end of it.

Code: [Select]
function title(){
  local text = fe.game_info(Info.Title );
  local text = fe.game_info(Info.Title );
  return text.toupper();
}
local title = fe.add_text("[!title] PLAYERS   [!Players] ", flx*0.185, fly*0.080, flw*0.300, flh*0.500 );
title.charsize = 47;
title.alpha = 255;
title.font="mad";
title.set_rgb( 255, 0, 0 );
title.align = Align.Left;
title.rotation = ( 90 );


//*********************************************************


function title(){
  local text = fe.game_info(Info.Title);
  return text.toupper();
}
local title = fe.add_text("[!title]", flx*0.185, fly*0.080, flw*0.300, flh*0.500 );
title.charsize = 47;
title.alpha = 255;
title.font="mad";
title.set_rgb( 255, 255, 0 );
title.align = Align.Left;
title.rotation = ( 90 );


pic


by the way thanks for your help!
« Last Edit: October 11, 2017, 07:43:59 PM by jedione »
help a friend....

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: Text styling questions
« Reply #16 on: October 11, 2017, 08:22:43 PM »
ok got it working..thanks for your code.....

final post and code.....

Code: [Select]
function title(){
  local text = fe.game_info(Info.Title ) ;
  local text = fe.game_info(Info.Title ) ;

  return text.toupper();
}
local title = fe.add_text("[!title] PLAYERS  [Players] ", flx*0.185, fly*0.080, flw*0.300, flh*0.500 );
title.charsize = 32;
title.alpha = 255;
title.font="mad";
title.set_rgb( 255, 0, 0 );
title.align = Align.Left;
title.rotation = ( 90 );

//*********************************************************

function title(){
  local text = fe.game_info(Info.Title);
  return text.toupper();
}
local title = fe.add_text("[!title]", flx*0.185, fly*0.080, flw*0.300, flh*0.500 );
title.charsize = 32;
title.alpha = 255;
title.font="mad";
title.set_rgb( 255, 255, 0 );
title.align = Align.Left;
title.rotation = ( 90 );

pic =


ALL UPPER CASE  GOOD TO GO THANK YOU.
« Last Edit: October 11, 2017, 08:25:07 PM by jedione »
help a friend....

jdye82

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Text styling questions
« Reply #17 on: October 12, 2017, 01:21:27 AM »
Brilliant.

Thank you keilmillerjr and jedione for your help and time on this. Will give it a go this evening (UK).

jdye82

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Text styling questions
« Reply #18 on: October 13, 2017, 12:54:42 AM »
OK, I have no idea where I'm going wrong, but I still can't get this to work.

Here's the code.

Code: [Select]
function title(){
  local text = fe.game_info(Info.Title);
  return text.toupper();
}

local title = fe.add_text("[!title]  PLAYS: [PlayedCount]", flx*0.235, fly*0.02, flw*0.600, flh*0.500 );

Using this, the text doesn't display at all, so something's off. As soon as I remove the function and stop trying to make the text uppercase, it's fine. So it's definitely the function causing the issues  :(

Any final thoughts? If not, I'll learn to live with it, or will find a suitable replacement uppercase font.

kent79

  • Hero Member
  • *****
  • Posts: 842
    • View Profile
Re: Text styling questions
« Reply #19 on: October 13, 2017, 01:51:44 AM »
OK, I have no idea where I'm going wrong, but I still can't get this to work.

Here's the code.

Code: [Select]
function title(){
  local text = fe.game_info(Info.Title);
  return text.toupper();
}

local title = fe.add_text("[!title]  PLAYS: [PlayedCount]", flx*0.235, fly*0.02, flw*0.600, flh*0.500 );

Using this, the text doesn't display at all, so something's off. As soon as I remove the function and stop trying to make the text uppercase, it's fine. So it's definitely the function causing the issues  :(

Any final thoughts? If not, I'll learn to live with it, or will find a suitable replacement uppercase font.

Could you mind provide nut file to us for checking?

jdye82

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Text styling questions
« Reply #20 on: October 13, 2017, 03:30:41 AM »
Sure. Attached

kent79

  • Hero Member
  • *****
  • Posts: 842
    • View Profile
Re: Text styling questions
« Reply #21 on: October 13, 2017, 05:58:01 AM »
Please update filtername fucntion as below  :)

function filtername(){
     local text = fe.filters[1];
     return text.name.toupper();
}

jdye82

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Text styling questions
« Reply #22 on: October 13, 2017, 10:35:04 AM »
Please update filtername fucntion as below  :)

function filtername(){
     local text = fe.filters[1];
     return text.name.toupper();
}

OK. So, the ROM name/title is now showing - and working in uppercase!!

BUT, The filer/list name is not showing now. So it looks like there's something wrong with fe.filters[1] ?

kent79

  • Hero Member
  • *****
  • Posts: 842
    • View Profile
Re: Text styling questions
« Reply #23 on: October 13, 2017, 04:26:43 PM »
I think you set a incorrect x axis location (outside of screen)

local filter2 = fe.add_text("LIST:", flx*1.18, fly*0.02, flw*0.600, flh*0.500 );

Please try to change it to flx*0.1



« Last Edit: October 13, 2017, 05:41:24 PM by kent79 »

jdye82

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Text styling questions
« Reply #24 on: October 14, 2017, 01:25:39 AM »
I think you set a incorrect x axis location (outside of screen)

local filter2 = fe.add_text("LIST:", flx*1.18, fly*0.02, flw*0.600, flh*0.500 );

Please try to change it to flx*0.1

Unfortunately that's not the issue. The text is being rotated 90 degrees, which is why it needs the odd positioning. The text "LIST:" is still visible, just not the filter/list name. So the problem definitely appears to be in the function?

kent79

  • Hero Member
  • *****
  • Posts: 842
    • View Profile
Re: Text styling questions
« Reply #25 on: October 14, 2017, 03:35:06 AM »
local filter1 = fe.add_text("LIST: [!filtername]", flx*0.18, fly*0.02, flw*0.600, flh*0.500 );

Please change this line


jdye82

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Text styling questions
« Reply #26 on: October 14, 2017, 07:03:17 AM »
Honestly, that's not the problem.

If I swap [!filtername] with [FilterName] it works fine (but is obviously not in capitals). The issue I'm having is that the function isn't working.

kent79

  • Hero Member
  • *****
  • Posts: 842
    • View Profile
Re: Text styling questions
« Reply #27 on: October 14, 2017, 07:14:11 AM »
Honestly, that's not the problem.

If I swap [!filtername] with [FilterName] it works fine (but is obviously not in capitals). The issue I'm having is that the function isn't working.

Actually, did you try to change ? What is your result?

local filter1 = fe.add_text("LIST: [!filtername]", flx*0.18, fly*0.02, flw*0.600, flh*0.500 );

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: Text styling questions
« Reply #28 on: October 14, 2017, 07:33:39 AM »
ya the magic tokins
[DisplayName][FilterName]
are not displayed,  all the others are like [Emulator], [Name], ext...are because your calling .info

this is because their is no scraped or add info for this category  [DisplayName] @t       romlists>snes.cfg
ie:#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons

im sure this is were .info is pulled from

ill mess with it anf see what i can find out after work..peace
help a friend....

jdye82

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Text styling questions
« Reply #29 on: October 14, 2017, 10:12:26 AM »
Honestly, that's not the problem.

If I swap [!filtername] with [FilterName] it works fine (but is obviously not in capitals). The issue I'm having is that the function isn't working.

Actually, did you try to change ? What is your result?

local filter1 = fe.add_text("LIST: [!filtername]", flx*0.18, fly*0.02, flw*0.600, flh*0.500 );

This just moved the text ("LIST:") to the other side of the screen, but the filter name from the function is still not working.