Jump to content
Sign in to follow this  
albertfish

Menu Extension

Recommended Posts

Menu Extension

by: albertfish





banner-420x120.png

news_download_a3_3.png

Description

This mod introduces a couple new buttons into the in game menu. These buttons can be expanded to reveal several other buttons that can be added in by mission makers and mod makers. These buttons can be used to open GUI displays through the menus. This mod aims to make it easy to mod makers to add custom GUIs to the game menus.

For mission makers and script makers, this can be a great alternative to having actions in the scroll wheel menu.

Features

  • Ability to add buttons to the Mod Settings and Mission Settings menus
  • Accordion style expanding menus
  • Able to scroll thorugh button if there more than 10

Installation

Extract the contents into your Arma 3 install directory.

Now you must add this to the startup paramerters for Arma. To do so, right click Arma 3 and go to properties. From there select launch options and enter the following:

-mod=@af_MenuExtension;

Download

You can download the mod here.

Usage

For Mod Makers

To add a button to the Mod Settings menu, you have to make an entry into the ModSettingsMenuEntries class. The format is as follows:

class MenuExtension_Entries
{
class MenuExtensionExample
{
	buttonText = "Example Button";
	resource = "MEExampleDisplay";
               function = "fnc_ShowExampleDisply";
};
};

Where

MenuExtensionExample is a class name of your choosing.

buttonText is the text that will appear on the button.

resource is the classname for the GUI you would like to launch.

function name of the custom function that will create the dialog. This can also be the name of a script you want to execute. This parameter is optional.

To check if the mod is installed you can do:

isClass(configFile >> "CfgPatches" >> "af_MenuExtension")

For Mission Makers

To add a button to the Mission Settings menu you simply have to make a call to af_fnc_AddMenuItem.

For Example:

["Example Button", "MEExampleDisplay", "UIExample\show_gui.sqf;"] call af_fnc_AddMenuItem;	

The first parameter is the text that will appear on the button.

The second parameter classname of the dialog that you are opening.

The third parameter is the function or script that will be executed when the button is clicked.

To delete a button from the Mission Settings menu you simply have to make a call to af_fnc_DeleteMenuItem.

For Example:

["Example Button"] call af_fnc_DeleteMenuItem;	

The parameter is the text that is displayed on the button.

Changelog

22/11/14 - Version 2.1

  • Added a function option that allows this mod to call a function to create the dialog
  • No longer requires you to use closeDisplay

10/11/14 - Version 2.0

  • Updated to work with the latest version of Arma 3
  • Removed the pages when more than 10 buttons are added and replaced it with the ability to scroll
  • Empty menus will no longer be displayed
  • Now works in single player missions
  • Removed the CBA dependency
  • Changed function names to better follow the BIS convention

1/12/13 - Version 1.0

  • Initial Release

Please let me know if you come across any issues with this mod.

Edited by albertfish

Share this post


Link to post
Share on other sites

^^ Yeah really neat. Good job mate. Keep that voice away from women as well .... too sexy.

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Could this be used to re-add the ability to access the 3D Editor from the main menu? Great addon by the way!

Share this post


Link to post
Share on other sites

Thank you Foxhound!

Could this be used to re-add the ability to access the 3D Editor from the main menu? Great addon by the way!

That is a pretty interesting idea. I have not tried to launch the 3D editor yet, but from what I have seen it seems that you have to launch Arma 3 differently than normal. This makes me think it would not be possible. I'll look into this a little bit when I am free.

Share this post


Link to post
Share on other sites
Thank you Foxhound!

That is a pretty interesting idea. I have not tried to launch the 3D editor yet, but from what I have seen it seems that you have to launch Arma 3 differently than normal. This makes me think it would not be possible. I'll look into this a little bit when I am free.

The only thing different from before is that ArmA 3 has to have a command line parameter set to load a 3D mission file on startup, I'm guessing this is the way it is simply because they've gotten rid of the shortcut/dialog to access it; which is why I ask.

Share this post


Link to post
Share on other sites

Great mod!

Is there a possibility for mission makers to add sub-menus?

Share this post


Link to post
Share on other sites

Thanks for the bump Phoenix. I was looking for this thread and couldn't find it. I guess that's what you can bookmark threads for. Great little addon you got here.

Additional question because maybe you happen to know. Is there any way to disable certain buttons? For example the respawn button.

Share this post


Link to post
Share on other sites

Just dropping by for giving my thanks!

Really appreciated mod cleaning up the action menu in a nice way =)

Would be cool if the mod settings could be hidden instead of greying it out.

Share this post


Link to post
Share on other sites

Update 1.24 isn't compatible with this addon anymore, it breaks the main menu. Hotfix maybe?

Share this post


Link to post
Share on other sites

Hello! I took a hiatus from Arma to deal with other priorities. As a result this mod was not updated to work with newer versions of Arma 3. However, I am back, and I wanted to get this mod updated and working again. Sorry for the delay.

Changelog

10/11/14 - Version 2.0

  • Updated to work with the latest version of Arma 3
  • Removed the pages when more than 10 buttons are added and replaced it with the ability to scroll
  • Empty menus will no longer be displayed
  • Now works in single player missions
  • Removed the CBA dependency
  • Changed function names to better follow the BIS convention

Please let me know if you come across any issues with this mod.

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Edited by Guest
CBA removed as requirement

Share this post


Link to post
Share on other sites

New mod 2.0 available at withSIX. Download now by clicking:

banner-420x120.png

@albertfish;

You are now able to manage your own promo pages of your content on our web platform and soon also publish new content yourself.

To do so, please hit 'this is me' button on the page while logged in and follow the quick and safe claim procedure to get connected to your work.

For now you can send new content or releases our way through withsix.wetransfer.com or add your notification at getsatisfaction.withsix.com.

Share this post


Link to post
Share on other sites

@kecharles28, Thank you!

@Foxhound, thank for you updating. In the last update I removed CBA from the requirements, but it is listed as a requirement on Armaholic. Would you be able to remove that please :).

Share this post


Link to post
Share on other sites

albertfish, in my weather mod, menu entries are a bit buried inside the support menu (0-8) which I personally do not like. But as you know, we often do stuff into 0-8, 0-0 or action menu, because thats just the shortest way to success. I'm interested in using your system, but as you may guess do not want to add another dependency: i.e. I would like to include all needed code of your mod. Would you allow this and under which cirumstances? Credits? Hmm, having asked this, I'm thinking if this would conflict with an already running instance of your mod. Maybe a global variable in your mod would help then, to be able to check if your mod is running...

Share this post


Link to post
Share on other sites
albertfish, in my weather mod, menu entries are a bit buried inside the support menu (0-8) which I personally do not like. But as you know, we often do stuff into 0-8, 0-0 or action menu, because thats just the shortest way to success. I'm interested in using your system, but as you may guess do not want to add another dependency: i.e. I would like to include all needed code of your mod. Would you allow this and under which cirumstances? Credits? Hmm, having asked this, I'm thinking if this would conflict with an already running instance of your mod. Maybe a global variable in your mod would help then, to be able to check if your mod is running...

You could check to see if the mod is installed

if (isClass(configFile >> "CfgPatches" >> "af_MenuExtension")) then
{
   // Add stuff to menu
}
else
{
   // Add stuff to support menu
};

I have not checked, but the only conflict I can think of when running two instances is that the one that is loaded first will get overwritten, which shouldn't been an issue.

Another option is to just include the .pbo with you .pbo files. That way people don't have to download another mod. I'll have to see if there are any issues when multiple instances are run.

Share this post


Link to post
Share on other sites

Hello, I just released version 2.1!

This version adds the ability to supply a function that will be called when the button is pressed. This allows you to pass in a script that will create the dialog, instead of having my mod create the dialog for you. This should make it a lot easier to integrate this mod with other mods.

You can download this version here.

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×