Jump to content

Recommended Posts

Solved:

 

Hello Guys.

 

I want to make a little tool that makes it easier to spawn items.

 

for expaple:

 

i want to start a script, that opens the dialog, where i can enter the classname of the item in a "text box"(so i can easily choose whicht item i want to spawn) and i want to do the same with the amount of the item.

 

So that the two values that i've entered in these two "text boxes" can be used in the script as a variable.

 

Can anyone tell me how to make this Dialog and combind it with the script? ^-^

 

Regards,

Shirotaku

 

PS: Sorry for my bad english xD

 

 

 

---------------------------------

 

Not Solved:

 

can any1 tell me how to open a dialog via a ,sqf-script ? ^-^

The dialog and the script are in a arma 3 modification, but the dialog is not opening, when using:

 

 

 

_handle=createdialog "shiro_dialog";

 

 

Share this post


Link to post
Share on other sites

I've started my dialogs creation first steps here:

 

then you can read this: https://community.bistudio.com/wiki/Dialog_Control

Ah. Thank you very much! I thought i have to do the whole dialog on my own by typing words in the .hpp file. Never knew that the GUI-Editor even exist xD

 

 

Thank you very much! ♥

Share this post


Link to post
Share on other sites

As far as I remember you don't even need to create trigger with GUI call, it's now implemented in dev console.

Share this post


Link to post
Share on other sites

As far as I remember you don't even need to create trigger with GUI call, it's now implemented in dev console.

Yeah. That's the only thing i knew 'bout the gui-editor ^-^ thank you so much :)

Share this post


Link to post
Share on other sites

Yeah. That's the only thing i knew 'bout the gui-editor ^-^ thank you so much :)

 

A real good tip if you are new to using the gui-editor is to press F1 and read through that little page. Also its always good to save your finished GUI to a file and store that somewhere safe in case you need to add more elements later on.

 

This is how my recently saved GUI looks like in code.

$[
	1.063,
	["AdminMenuGUI",[[0,0,1,1],0.025,0.04,"GUI_GRID"],0,0,0],
	[2203,"background-inv",[1,"",["0.566952 * safezoneW + safezoneX","0.225 * safezoneH + safezoneY","0.144205 * safezoneW","0.418 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]],
	[2200,"menubackground",[1,"",["0.572102 * safezoneW + safezoneX","0.324 * safezoneH + safezoneY","0.133905 * safezoneW","0.308 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]],
	[2201,"headerBackground",[1,"",["0.572102 * safezoneW + safezoneX","0.258 * safezoneH + safezoneY","0.133905 * safezoneW","0.066 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]],
	[1100,"headerText",[1,"",["0.577253 * safezoneW + safezoneX","0.269 * safezoneH + safezoneY","0.123604 * safezoneW","0.044 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]]
]

 If i copy this to the clipboard i only need to open up the GUI editor to have the gui show up again. Real handy when you need to edit or add!

Share this post


Link to post
Share on other sites

As far as I remember you don't even need to create trigger with GUI call, it's now implemented in dev console.

can you tell me how to use this dialog in a modification? 

 

i added the dialog files to the description.ext (in the modification)

#include "\Dialoges\defines.hpp"
#include "\Dialoges\dialogs.hpp"

then i'm trying to open the dialoge 

_handle=createdialog "shiro_dialog";

everytime i'm trying this i'm getting the error

Resource shiro_dialog not found

can you plase help me to fix that? :c

Share this post


Link to post
Share on other sites

can you tell me how to use this dialog in a modification? 

 

i added the dialog files to the description.ext (in the modification)


#include "\Dialoges\defines.hpp"
#include "\Dialoges\dialogs.hpp"

.......

 

 

try using 

#include "Dialoges\defines.hpp"
#include "Dialoges\dialogs.hpp"

Share this post


Link to post
Share on other sites

 

try using 

#include "Dialoges\defines.hpp"
#include "Dialoges\dialogs.hpp"

still doesn't wok

Share this post


Link to post
Share on other sites

still doesn't wok

Actually I only need this dialog for one script. Is it possible to open the dialog just while running the scipt without using a description.ext or somthing ^-^

Share this post


Link to post
Share on other sites

If you still need help, try this:

 

First, make sure you have lines below in the GUI config:

In my case:

 

LUKI_myDialogTemplate.hpp

class LUKI_myDialogTemplate
{
idd = -1; 
movingEnable = false; 
enableSimulation = true;
objects[] = { }; 

Note: I recommend to export the GUI in the config format (key shortcut Shift + Ctrl + S) while you're in GUI Editor.

 

Second step is to define this GUI to the description.ext file ... so simply put on the first line:

 

description.ext

#include "dialoges\LUKI_myDialogTemplate.hpp"

Then you can simply create/show this dialog where you want by this line (for example in the init.sqf):

 

init.sqf

createDialog "LUKI_myDialogTemplate";
Hope this will solve your problem.  ;)

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

×