User Tag List

Results 1 to 4 of 4

Thread: Any way to make Background System Box scale its height to number of words wrapped?

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)
    SlightlyRadioactive's Avatar
    Join Date
    Nov 2018
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Any way to make Background System Box scale its height to number of words wrapped?

    I'm trying to create a branching dialogue system where all lines of text are loaded from a .txt file into different Background System Boxes that will be reused often, is there any way to calculate the number of words wrapped so I can use an expression to dynamically change it's size? Or is there any example of how to create my own word wrapper to handle this?

  2. #2
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,256
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Yes, by using Calculate Text Rect object.

  3. #3
    Clicker Install Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    defisym's Avatar
    Join Date
    Jun 2017
    Location
    Asia
    Posts
    479
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    If you need to support non-english:
    https://github.com/defisym/OpenFusio...ensions/NeoStr
    Change object size & row/col space & align in runtime, with expressions to return the widest line / last char pos, etc.
    This object is based on GDI+ (Like DX9), all characters are drawn to a bitmap surface, so some issues like “disappear when strings with shader are too close”, “blank char in the beginning disappears under DX 11”, “alpha channel messed under DX 11” in built in string object doesn’t exist here.
    Still buggy, please do rigorous test before using it in your game.

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)
    SlightlyRadioactive's Avatar
    Join Date
    Nov 2018
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by NaitorStudios View Post
    Yes, by using Calculate Text Rect object.
    It seems this is exactly what I was looking for. Thanks!

Similar Threads

  1. Replies: 12
    Last Post: 30th June 2020, 10:19 PM
  2. How to make a sprite scale and then disappear
    By nicklowkc in forum Fusion 2.5
    Replies: 3
    Last Post: 24th November 2015, 10:22 AM
  3. How do I make games scale to the window size?
    By 7cubed in forum Fusion 2.5
    Replies: 5
    Last Post: 28th June 2014, 04:07 AM
  4. Replies: 0
    Last Post: 15th March 2014, 06:36 AM
  5. Replies: 17
    Last Post: 8th January 2007, 11:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •