User Tag List

Results 1 to 3 of 3

Thread: Find XY of character in string / Old school DOD menus

  1. #1
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,135
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Find XY of character in string / Old school DOD menus

    I'm playing around with different options for an old text-based dos menu system. I want to be able to arrow up and down through a list of text (shown with Active System Object). I can do so with a ">" to signify the current line but I'd like to do so with an inverted rectangle that is sized and positioned appropriately. This will involve variable text sizes so I can't just +/- from the Y position of that rectangle.

    Any ideas are welcome.

    I'm also having trouble making that list scroll so text isn't shoved offscreen.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,156
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Size of the font, if you use "common" types, is roughly its height in pixels,
    this could give you some hints on lines Y position

    (font size + line spacing) * number of lines - line spacing = Y of cursor (average)

    but can't think of this being very solid, as fonts tend to vary much, and font size is very approximative

    I don't think there's a proper solution if you want to let users change fonts at will
    (unless you pick a specific list of fonts and "hardcode" each one, measuring them with precision)

    Other couple ideas:

    - text blitting (the most solid, but probably a little more awkward and less flexible)

    - using a special character as the rectangle:

  3. #3
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,135
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Find XY of character in string / Old school DOD menus

    Yeah, I'm thinking hard coding specific fonts is the only way. I like making this very open-ended but that may not be an option in this instance. I can deal with a set series of fonts but now I need to determine their line spacing at variable font sizing.

    Does Active System Objecy have measurable line spacing?

Similar Threads

  1. Find string in string in any case?
    By ratty in forum Fusion 2.5
    Replies: 4
    Last Post: 6th July 2015, 03:44 PM
  2. Find String in String issues
    By DistantJ in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 13th February 2013, 01:35 PM
  3. Help Find string
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 6th December 2009, 02:57 PM
  4. Where to find string.mfx?
    By DJ_Wild in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 22nd November 2007, 10:20 AM
  5. Where i can find string.cox ?
    By lorddongle in forum Extension Development
    Replies: 7
    Last Post: 22nd March 2007, 10:44 AM

Posting Permissions

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