User Tag List

Results 1 to 6 of 6

Thread: OHeight changes but OWidth stays constant

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question OHeight changes but OWidth stays constant

    So I noticed that if I get a string's OWidth it will be the X size of the string object, but if I get a string's OHeight it will be dependent on how many lines the string currently has. Is there a way to get the OHeight of a string object based on its actual Y height and not based on how far down the text is wrapping?

    For example, if I have a string with the dimensions of 500x500 and the line "hello", the game will report 500 for the OHeight but only 100 for the OHeight. But if the line reads, "Hello, this is a longer line that will extend from the first line down to the second line of the box" it will still read 500 for the OWidth but the OHeight will read 150 because the string is longer.

    I am not sure if this is intended or a bug.

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    523
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Maybe YScale? I've never tried getting the the actual width/height of a string object before but I know OHeight and YScale are the two functions to grab heights.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Workaround

    Quote Originally Posted by dsilvers View Post
    Maybe YScale? I've never tried getting the the actual width/height of a string object before but I know OHeight and YScale are the two functions to grab heights.
    The string object doesn't have a YScale. I noticed that using Bottom Edge of Y doesn't work either. The only workaround I've found so far is to have a line at the bottom edge of the object and capture (save in a variable) the OHeight of the string object at the beginning of the frame before the alterable string is changed. It looks something like this:
    bottom.jpg

  4. #4
    Clicker 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)
    Diogen's Avatar
    Join Date
    Feb 2016
    Location
    Zaporizhzhya, Ukraine
    Posts
    47
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    OWidth and OHeight returns size of string object not text size. To get the text size i tried to use the Calc Text Rect extension. But it often returns incorrect text sizes.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    523
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    To be fair there are a lot of functions I wish strings had, even alterable values (though there is ONE hack you can use for this, it's pretty lolzy, but you'll have to find it for yourself). The one I would absolutely DIE for would be some way to calculate text cursor position, so if we're making a custom text editor, say, in a fullscreen app, we'd be able to take the location of the text cursor in a related Edit object and place an Active object at that point in a string. I am yet to find a way to do this.

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Diogen View Post
    OWidth and OHeight returns size of string object not text size. To get the text size i tried to use the Calc Text Rect extension. But it often returns incorrect text sizes.
    This is what I'm saying. OHeight does not return the height of the string object. It returns the height of the string object down to the farthest point of actual text. If the string object dimensions are 500x500, but the text inside the object does not reach Y 500, it won't report OHeight as 500.

Similar Threads

  1. Time reversal in a constant-running scene
    By Corybander in forum Fusion 2.5
    Replies: 7
    Last Post: 2nd January 2017, 09:40 AM
  2. Constant Frame Rate Struggles
    By Psychoplasmics in forum Fusion 2.5
    Replies: 20
    Last Post: 13th October 2016, 12:52 PM
  3. Constant Crash (ba be)
    By crashkandicoot in forum Fusion 2.5
    Replies: 2
    Last Post: 15th March 2016, 05:10 AM
  4. Arrangement constant des objets en Y
    By LPA134 in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 19th January 2012, 10:22 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
  •