Calculate text rectangle extension

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hey again guys,

    So I am using text-rectangle calculation extension to calculate the background for my text pop-ups. Only problem is, it doesn't work. From what I've gathered it seems it is just broken in the new version of Fusion.
    How do you guys do this thing since apparently there is no object for this anymore and there are insufficient tools for measuring fonts in Fusion?
    Is there a monospace font included in Fusion, and if not; can I download one and then embed it in the game?
    I was thinking maybe I could make my own system if I had monospace font, but I of course need to be able to include the font with my game, unless Fusion comes with a monospace font.
    Also, I would prefer to use Tahoma. But I am at a complete loss, there seems to be no way for me to do this, except getting into extension making.
    If all else fails, I will have to redesign my UI to work without text-boxes. But come on, this is such a core thing how can this be so hard.

    Thanks!

  • Please login to see this link.

    Wow! Very much appreciated! <3

    So how does this work, I assume you don't charge money for this since you posted it here? Do you want attribution in credits, and if so do you want to be called Defisym? If you want another name, of course we can discuss that in private later. One question though, I read the documentation on the site but I can't figure out if it's possible for me to change the background (box) color?

    Also, this isn't compatible with android and IOS is it?

    Edited once, last by MistaSub (September 4, 2023 at 7:47 AM).

  • So how does this work, I assume you don't charge money for this since you posted it here? Do you want attribution in credits, and if so do you want to be called Defisym? If you want another name, of course we can discuss that in private later.

    Just like the fusion logo in game when you purchased developer, it's up to you.

    Quote

    One question though, I read the documentation on the site but I can't figure out if it's possible for me to change the background (box) color?

    You cannot change the background color but you can change the text color.

    Quote

    Also, this isn't compatible with android and IOS is it?

    It's not compatible as it's based on GDI, which is Windows only. Anyway, it's open source so you can find someone else to port it, by moving to a cross platform font lib, which can do font embedding, get the size of a character, and render to a bitmap. However, current code base didn't take that into account so it doesn't have a good abstract, many contents are mixed in.

  • very nice object! but I cant get the render clip setting to work? the overflow is always shown?

    Clip: text out of visable frame area won't be rendered.
    Sorry for the lack of document as it's not a finished extension.
    It's not that useful as usually you won't render text that much and it still need to calculate all text's format before rendering. So there's not much help about performance for most cases. And may causes issue if you zoom or rotate it.

    Quote

    also cant find the multipixeloutline shader that is used in the examples?

    It’s just for testing if there is any issue when shader involves alpha channel, and the border offset feature, which will make the render texture a bit larger so contents shader draws won’t be clipped.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!