Jump to content
Sign in to follow this  
riouken

rMsgBox - Easy and Customizable GUI Message box

Recommended Posts

rMsgBox

rMsgBox is a easy and user configurable GUI. I wanted to provide an easy to use message box similar in design and function to the Messagebox in C#. I wanted to handle all the UI scripting while the user focused on passing in their own data to my scripts. rMsgBox can be used as user notification, choice selection, conformation and many other uses.

Features -

* All GUI scripting is done - user only has to pass strings and arrays to my setup script.

* Can be called directly from and addaction or a direct call to the script.

* The message body can use a string or Structured text.

* Has 6 elements that the user can configure on the fly.

* Message

* Title

* 4 Buttons

* Can change button text and button actions.

* Light weight.

* Easy to use.

Limitations-

- Right now the size of the message box does not scale with the contents, so you will have to ensure your text and data does not go out of bounds on the gui. I am working on this and hopefully will be able to solve it.

How to use rMsgBox in your mission.

Put the rMsgBox folder in your main mission folder.

Place this line of code in your descripton.ext

descripton.ext:

#include <rmsgbox\rmsg_gui.hpp>[size=2][size=2]
[/size][/size]

Thats it. Now you can call rMsgBox in your mission.

How to pass Parameters to rMsgBox-

You need to pass the parameters to this file - "rmsgbox\rmsg_gui_setup.sqf"

They need to be passed as an array.

Only the first param is required the rest are optional.

[
Message,                  -Can use a String or Structured Text
Title,                        -String
["Button 1","Command"],        -Array format, pass two strings - the first is the button text, the second is the command when button is pressed.
["Button 2","Command"],        -Array format, pass two strings - the first is the button text, the second is the command when button is pressed.
["Button 3","Command"],        -Array format, pass two strings - the first is the button text, the second is the command when button is pressed.
["Button 4","Command"]         -Array format, pass two strings - the first is the button text, the second is the command when button is pressed.
]

Here is an example:

_CallrMsgBox = ["My Message","My Title",["Button 1","closeDialog 0;hint 'Button 1'"],["Button 2","hint 'Button 2';"],["Button 3","hint 'Button 3';"],["Button 4","hint 'Button 4';"]] execVM "rmsgbox\rmsg_gui_setup.sqf";

//if you do not want one of the options, just pass it an empty string, example:

// This wil leave out the Title and button two.

_CallrMsgBox = ["My Message","",["Button 1","closeDialog 0;hint 'Button 1'"],["",""],["Button 3","hint 'Button 3';"],["Button 4","hint 'Button 4';"]] execVM "rmsgbox\rmsg_gui_setup.sqf";


Helpful links:

https://community.bistudio.com/wiki/String

http://community.bistudio.com/wiki/Structured_Text

Please see the included readme.txt for more information.

Download:

Example mission including the rMsgBox scripts and several examples.

http://arma2.co/download?file=63541-rMsgBox.utes.zip - Arma2.co

http://www.mirrorcreator.com/files/0ZRMF7HY/rMsgBox.utes.zip_links

Just the rMsgBox scripts.

http://arma2.co/download?file=45095-rmsgbox.zip - Arma2.co

http://www.mirrorcreator.com/files/0O7W07EB/rmsgbox.zip_links

Images:

arma2oa2012123116540272.th.jpg

arma2oa2012123116540795.th.jpg

arma2oa2012123116541549.th.jpg

arma2oa2012123116542066.th.jpg

arma2oa2012123116542755.th.jpg

arma2oa2012123116543244.th.jpg

Edited by Riouken

Share this post


Link to post
Share on other sites

This could be useful if I ever get back to my pet project where I need a simple interface.

Just one problem though it here anyway to have these message boxes open while walking?

Share this post


Link to post
Share on other sites
This could be useful if I ever get back to my pet project where I need a simple interface.

Just one problem though it here anyway to have these message boxes open while walking?

No this is a dialog, That would have to be a Resource. I may look into some options for that. But that would be for ver 2.0.

Share this post


Link to post
Share on other sites

Ok thanks for that, it explains why I couldn't do that last time.

Share this post


Link to post
Share on other sites

You should use Arma2.Co to upload your work. The current downloads you have are scary, there's download buttons and timers everywhere, and all kinds of other "click me" buttons. One which I thought was the correct button took me to yet another page where I had to wait again on a timer for my download to be ready, only to find out it was't even for your file. Another which said "your file is ready" took me to a site to download a video converter. Another tryed to have me download a mplayer.exe. Others take me to download some ilivid program...w/e that is? I was just wanting to download your example mission LOL. Every download button takes me to a different page filled with other, numerous download links/buttons, inwhich want me to download various things and produce scary popups.

Just my 2c!

Edited by Iceman77

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  

×