Announcement

Collapse
No announcement yet.

Need a way to get text attribute settings

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need a way to get text attribute settings

    You have a txt_Set() to set all the possible txt attributes.
    It sure would be nice to have a txt_Get() so we could get the current settings.
    (Which is very useful when you have to use debug routines that need to write to the screen, and you don't want to mess up the settings for the routine you are debugging.)

    It would be REALLY nice is there were txt_SaveState() and txt_RestoreState() methods.

  • #2


    Actually, thanks for the report, it didn't make it to the doc, but txt_Set, gfx_Set, and the text and graphics shortcuts do actually return the current value, eg:-

    txt_Set(TEXT_COLOUR, RED);
    print([HEX]txt_Set(TEXT_COLOUR, BLUE));

    will print 0xF800 (the old RED value) in blue text.

    This allows you to do - say:-

    oldFGcolr := txt_FGcolour(GREEN); // save current text colour
    ...
    ... program body
    ...
    txt_FGcolour(oldFGcolr); // restore original colour
    Regards,
    Dave

    Comment

    Working...
    X