User Tag List

Results 1 to 7 of 7

Thread: toggle between two states in application menu - checked

  1. #1
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    496
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    toggle between two states in application menu - checked

    For some reason I cant get fusion to switch between two states - checked and unchecked in the app menu.

    Basically in my logic I want the menu item to become checked when i click on it while it is unchecked. Then become unchecked if I click on it when it is checked.
    Sadly this doesnt seem to be simple in mmf If I use two simple conditions, one is elliminating the other whatever I do with the damn thing.

    Can someone please share a simple example file where this simple feature actually works? Thanks in advance

  2. #2
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jan 2014
    Location
    Paris, France
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use flags.

    -> User click on menu -> invert menu's flag 0

    -> Compare flag state -> is on -> set checked
    -> Compare flag state -> is off -> set unchecked

  3. #3
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    496
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    I really dislike flags! :0 Is there any other way?

    Btw here is the file I am struggling with. Can we get it to work without flags?
    checkBoxMenuProblem.mfa

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Please, reconsider flags, they are just perfect for this

    You only need to toggle flag on menu selected,
    and base checking on flag status.
    This won't trigger twice.
    Can't think of better/quicker ways (assuming you'll have at least one object to steal flag from )

  5. #5
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    496
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    I dont understand why my example is not working (triggering twice). Its almost as if the "is checked" condition does not work at all

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator

    Join Date
    Jul 2006
    Posts
    1,018
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If the menu item is clicked in one frame, the green events are true for the whole frame, from the first line to the last line of code.

    So if you now ask for "is option selected" it becomes true for all your two events where you're using it.
    In the first code line the option will be checked if the option is checked. If so it will be unchecked. NOW it is unchecked immediately.
    Now in the second code line you ask to check the option if it's not checked. So it will be checked.

    And because of that your option will always be checked.
    If you move code line 2 above line 1 the option will always be unchecked (except start of frame because it's your default from the menu editor).

    Using a flag to restrict this behavior or to use their state as the state for the option is the best way to go.

  7. #7
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    496
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Ah I see. Thank you for explaining

Similar Threads

  1. [Idea] Legacy Menu Button Toggle!
    By Bipolar_Games in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 31st July 2013, 02:40 PM
  2. INI Problem > Works only if "Create INI file in Application Data folder" is checked.
    By Hawanna in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th June 2012, 06:47 PM
  3. Toggle MMF application to launch on startup
    By Ryan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th May 2012, 10:56 PM
  4. Full screen / Windowed checked menu item
    By Nickydude in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 22nd September 2008, 06:00 PM
  5. Menubug? not checked items appears checked
    By Tiles in forum File Archive
    Replies: 0
    Last Post: 15th October 2007, 12:17 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
  •