Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    drawTextEx() Features!

    Coding
    3
    3
    360
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dave
      Dave Fuze Team last edited by Dave

      There are a couple of features of drawTextEx() which I think users may not be aware of - I'm posting here as a precursor to of course updating the Help section in Fuze4 Nintendo Switch to make this as clear as possible.

      Colour Markdown

      This one is really neat - you can embed colour commands into the string when using drawTextEx() to make changing colours mid-string a breeze!

      For example:

      drawTextEx( "[cyan]Hello my name is [bisque]Dave!", {100, 100}, 30 )
      

      The colour name and square brackets are ignored when printing, but they still count in temrs of the length of the string.

      Glyphs

      It's possible to print Controls Glyphs using particular strings in drawTextEx() - this makes drawing tutorial text or UI panels really nice and polished looking. Here is a list of all the supported glyphs:

      "CONTROLS_A"
      "CONTROLS_B"
      "CONTROLS_X"
      "CONTROLS_Y"
      "CONTROLS_DPAD"
      "CONTROLS_STICK_LEFT"
      "CONTROLS_STICK_RIGHT"
      "CONTROLS_L3"
      "CONTROLS_R3"
      "CONTROLS_L"
      "CONTROLS_R"
      "CONTROLS_ZL"
      "CONTROLS_ZR"
      "CONTROLS_MINUS"
      "CONTROLS_PLUS"
      

      Simpy use one of these in your text string and see the awesome results. You could also combine it with the colour markdown! For example:

      drawTextEx( "[cyan]Press [yellow]CONTROLS_A", {100, 100}, 30 )
      

      NOTE: These glyphs do not work when using different fonts set by setFont() - you will have to change font back to default before using the controls glyphs.

      Hope this makes some lives easier! These features are super useful. If you didn't know about them, try them out!

      1 Reply Last reply Reply Quote 10
      • Skullo
        Skullo last edited by

        Thanks, I didn't know about Glyphs, I'll give them a try!

        1 Reply Last reply Reply Quote 1
        • SteveZX81
          SteveZX81 F last edited by

          Thanks Dave, or should I say Mr Bisque? 'drawTextEx( "[cyan]Hello my name is [bisque]Dave!", {100, 100}, 30 )' haha!
          This is very helpful indeed!

          1 Reply Last reply Reply Quote 2
          • First post
            Last post