Page 1 of 5 12345 LastLast
Results 1 to 10 of 41

Thread: Dialog Template, plus Standard Dialogs

  1. #1
    I have completed version 1.1 of a simple Dialog Template Framework. Hopefully I can get some feedback on improving it.

    Goal:
    The goal is to provide a basic dialog framework to allow other users to include standard dialogs and to create new dialogs (utilising the template) in their missions, to provide a more user friendly interface.

    Features:
    - A base dialog template (which you can modify to create a new one fairly easily)
    - A popup menu system (for dialogs and MapClicks). You can avoid dialog code totally by using this.
    - A basic Yes/No dialog
    (Planning a few more base dialogs in future)
    - Base control classes separated into separate files - (hopefully) no need to edit it, in general
    - Uses full inheritence, minimising the code you work with significantly
    - A color scheme (which you can alter - saves fussing with colors for all controls & dialogs)
    - Hundreds of color constants
    - Dialog specific functions script (only a few functions so far).

    Notes:
    Remember, the focus of this is the dialogs themselves. The functionality and scripting required behind all this may still be missing.
    (Eg: The popup menu may have a "Request pickup" menu item, but clicking it may not necessarily do anything functional yet.)

    Downloads: v1.1
    - Armaholic
    - Stavanger┬┤s Militaria
    - UploadPower (temp)

    Screenshots:
    - Base Dialog with sample controls
    - YesNo Dialog
    - PopupMenu MapClick

    - Debug Dialog
    - Hints examples

    - PopupMenu TerrainDetail example
    - PopupMenu ViewDistance example
    - PopupMenu HQ example
    - PopupMenu Support example
    - PopupMenu Voting example





    Future Plans:
    - Additional standard dialogs.
    Eg: debug output dialog, Text/Ok dialog, Image/Ok dialog
    - More controls in the base dialog
    - Need a better system for tracking IDD's & IDC's.
    - Menu definition strucuture is currently array based, but could easily be converted to use class definitions instead.

    Problems:
    - Missing command to GetMousePosition (to match setMousePosition). There might be a work around for it, using dialog events.

    Mission Developer Usage - Creating a new dialog or popup menu for a mission.
    See the second post (just below) in this thread.
    Last edited by Dr_Eyeball; Apr 17 2009 at 04:12. Reason: reformat

  2. #2
    Gunnery Sergeant Dr_Eyeball's Avatar
    Join Date
    Dec 17 2005
    Location
    Australia
    Posts
    594
    Author of the Thread
    Related resources links:
    - to be advised. (None at this stage. Was going to be a few links to other dialog projects.)


    Changelog:
    Code Sample
    Code:
    v1.1 change log
    ============
    Main changes:
    --------------
    - Expand the PopupMenu functionality to a usable level.
    - Added a debug output dialog, which logs any data type, auto parses arrays and allows word wrapped text viewing for long outputs.
    - Added structured hint examples (HintStructuredText.sqf), for those who want to avoid dialogs where possible.
    
    Minor change details:
    --------------------
    - restructured folders and file locations to a more sensible modular structure
    - Popup menu now includes: 
      - disabling menus, 
      - hints, 
      - temp click markers, 
      - menu activation via shortcut key (default T key - "TeamSwitch" key)
     - automatic parameter substitution into Actions and Captions (for mapClick pos, player pos, current waypoint pos, gridRef's for all pos's, etc).
      - provisions for current waypoint handling 
        - Since there is no GetCurrentWaypoint command yet, it defaults to first waypoint. 
        - However another "Logistics" project which I will release will handle this better.
    - minor bug fixes & removal of irrelevant code
    - further standardise base control class definitions (DialogControlClasses.hpp)
      - all class properties are now initialized with a default value to prevent ArmA warnings (only demonstrated classes)
      - fix control class sounds



    Mission Developer Usage - Incorporating the PopUp menus into a mission.

    These are just rough details.

    • for existing missions, do not copy mission.sqm, description.ext, init.sqf & stringtable.csv
    • copy the other project sub-folders and their files
    • modify/merge description.ext
    • modify/merge init.sqf
    • add radio/action menu items to activate the popup menu script, similar to the way it was done in PopupMenuInit.sqf, or leave it as is
    • modify CreatePopupMenu.sqf with the array containing your desired menu structure


    To simplify this final stage, simply replace the entire contents of the file CreatePopupMenu.sqf with this code block, then expand with the ideas from the original file:
    Code Sample
    Code:
    _MenuStructureArray =
    [
      ["MainMenu",
        [
          ["Caption", "My Menu"],
          ["Items",
            [
              [ ["Item", "Item 1"], ["Action", "nul=[1] execVM 'Item.sqf';"] ],
              [ ["Item", "Item 2"], ["Action", "nul=[2] execVM 'Item.sqf';"] ]
            ]
          ]
        ]
      ]
    ];
    nul=_MenuStructureArray execVM "Dialogs\Common\PopupMenu.sqf";
    


    Mission Developer Usage - Creating a new dialog for a mission.

    These are just rough details.

    • for existing missions, do not copy mission.sqm, description.ext, init.sqf & stringtable.csv
    • copy the other project sub-folders and their files
    • modify/merge description.ext
    • modify/merge init.sqf
    • Copy and rename MyTestDialog.hpp & MyTestDialog.sqf to your preference into the same folder. Eg: NewDialog.hpp & NewDialog.sqf
    • In your 2 new files, globally search & replace the prefix "LOC3_" to your preference. Eg: "ABC_"
    • In your 2 new files, globally search & replace the word "MyTestDialog" to your preference. Eg: "NewDialog"
    • Modify description.ext to include your new dialog class definition.
      Eg: Code Sample
      Code:
      #include "Dialogs\NewDialog.hpp"
    • Add a temp action to display your new dialog, similar to the way it was done in SampleDialogsInit.sqf
      Code Sample
      Code:
      _Action = player addAction ["New Dialog", "Dialogs\NewDialog.sqf", [ /* params */ ], 0, false, false, "" ];
    • (Save and) Reload your mission in the editor (to reread the description.ext file & new hpp files)
    • If reloading works, that's a very good sign, otherwise examine arma.rpt for error log.
    • Test that your dialog works
    • If all is working, modify your new dialog to suit.



    Please report any errors with the above "usage" procedures.
    Last edited by Dr_Eyeball; Apr 17 2009 at 04:19. Reason: reformat

  3. #3
    I so want to download this, but the dl side you have chosen simply doesn't work for me

  4. #4
    Downloading now. I definatly want to use these

  5. #5
    Nice Idea, I'm sure this will prove usefull. Any chance of adding a template for the camera views you get during a missions breifing?

  6. #6
    Eyeball you rock man! I was just about to get into learning this.
    When you kill a man you're a murderer.....Kill many and you're a conqueror....Killem all and you're a GOD!

  7. #7
    Just downloaded!

    Congratulation for this good idea!


  8. #8
    Dr Eyeball is there any way i can get this to start at the start of the mission though the init without using the action menu.

    Quote Originally Posted by [b
    Quote[/b] ]_Action = player addAction ["> Test Yes No Dialog", "Dialogs\Common\ActivateYesNoDialogViaActi on.sqf",
    ***[ ["Question", "The <t color=&#39;#f000ff00&#39;>helicopter</t> is now over the landing zone.<br/> Do you want to eject from the helicopter?"] ] ];
    everytime i try this i get an error no question when the diologue appears..

    Quote Originally Posted by [b
    Quote[/b] ]nul=execVM "Dialogs&#92;Common&#92;ActivateYesNoDialogViaActi on.sqf",
    ["Question", "The <t color=&#39;#f000ff00&#39;>helicopter</t> is now over the landing zone.<br/> Do you want to eject from the helicopter?"];



    MattXR ( MxR )

    Check out my Twitter BIS Fans and Sub!
    -- MRKCCO Twitter --


  9. #9
    I just need to complement you that this may prove to be the most significant contribution to the community of all the scripts I have seen. Dialogs/UI is by far the hardest, most time consuming process in mission making, but is the most crucial aspect of us moving beyond the limitations of the action & radio menus for commands.

    I&#39;m looking forward to working with v1 and future revisions&#33;

  10. #10
    Im implemeting these into my missions with working scripts i just need to knw how to set the diologue off from a script and not the action menu.

Page 1 of 5 12345 LastLast

Posting Permissions

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