Jump to content
Sign in to follow this  
ManDay

Dialgos

Recommended Posts

I set up the dialog with "movingEnable = true;" (called by an Action in the action menu) but when I call up the action there comes a mousepointer and I cant move until I close the dialog.

What I want to achieve is an eventHandler for a keyPress (which can only be done thru dialogs as far as i know).

I know a mission where you have that kind of effect.

Share this post


Link to post
Share on other sites
Quote[/b] ]I set up the dialog with "movingEnable = true

That just allows you to move the dialog around the screen.

Someone posted an example for this, but I can't remember his name sad_o.gif

Anyway, here's what he did:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">WaitUntil {!(IsNull finddisplay(46))};

finddisplay(46) displayseteventhandler ["Keydown","_This ExecVM ""KeyPress.sqf"""];

Share this post


Link to post
Share on other sites

Check this Dialog Editor Preview thread which has a discussion that there are 2 similarly named commands:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

movingEnabled=true; // spelling?

movingEnable=true; // spelling?

moving=true;

Not sure about the spelling of the command. One seems to be for moving the dialog, the other for moving yourself while the dialog is open. Not sure which is which but perhaps it might help though?

Share this post


Link to post
Share on other sites
Quote[/b] ]I set up the dialog with "movingEnable = true

That just allows you to move the dialog around the screen.

That's not true from what I can tell. How else would such dialogs be realized then (those which do not prohibit moving and shooting - for instance just simple text-cut and all that)

€: All right Iball, synchronized posting - great.#

any idea where ColonelSandersLite got that huge list from? which bin? which cpp?

Share this post


Link to post
Share on other sites

No. Neither works.

Quote[/b] ]movingEnable lets the player move when the dialog is displayed, not makes it movable.
Quote[/b] ]http://community.bistudio.com/wiki/User:Manny/Dialogs_%28Work_in_progress%29

movingEnable boolean sets whether or not the player is hindered from aiming or moving while the dialog is open.

Nothing works for me. Any ideas why?

Share this post


Link to post
Share on other sites
Quote[/b] ]I set up the dialog with "movingEnable = true

That just allows you to move the dialog around the screen.

That's not true from what I can tell.

I think UNN is right.
Quote[/b] ]How else would such dialogs be realized then (those which do not prohibit moving and shooting - for instance just simple text-cut and all that)

U just explained the difference between Dialog and Display.

Share this post


Link to post
Share on other sites
Quote[/b] ]I set up the dialog with "movingEnable = true

That just allows you to move the dialog around the screen.

That's not true from what I can tell.

I think UNN is right.
Quote[/b] ]How else would such dialogs be realized then (those which do not prohibit moving and shooting - for instance just simple text-cut and all that)

U just explained the difference between Dialog and Display.

May I solicit your help then? It's not that important anymore to me but I still want to know how to raise a display (? right) where you can still move. Can you tell me how "movingEnable", displays and dialogs play together?

e: what is createDisplay good for as it requires a parent display to be existant? how can i create a topnode display then?

what is the difference between display and dialog at all as i can get a dialog with "findDisplay"?

UNN: I cant get the EH to work:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_bool_diag = createDialog "ctrlParaDiag";

_dis_diag = findDisplay 1;

_ctrl_test = _dis_diag displayCtrl 2;

_ctrl_test ctrlSetText "EH ADDED";

_ctrl_test ctrlSetEventHandler[ "keyDown","emp_test setDammage 1;" ];

e: awww - now i understand what's the problem. the biki is fuckin split up into two senseless parts crazy_o.gif half of the reference is under "GUI Control" the other Half is under "Interaction"....

btw: the biki is wrong. there is sais the event handlers were called "on..." like "onMouseEnter".

actually its "MouseEnter" without a "on"

Share this post


Link to post
Share on other sites

I cannot answer your questions because

I havent got the time nor the passion anymore (like I had in OFP)to desperately find out how things work.Also the use of SQF and Displays requires U almost to be a programmer or equal (education i never had).

Somehow its hard to understand why there isnt more info from official sources.

Anyway,I had the same intrest like U have,as Displays seems more "userfriendly" then Dialogs as they dont interrupt the game,seems to have more options in shape/color..etc

If its any good to you,"The Armory" uses alot of Displays,open up these missions and try to understand.

Share this post


Link to post
Share on other sites
Quote[/b] ]Someone posted an example for this, but I can't remember his name

Anyway, here's what he did:

Code Sample  

WaitUntil {!(IsNull finddisplay(46))};

finddisplay(46) displayseteventhandler ["Keydown","_This ExecVM ""KeyPress.sqf"""];

This is definately the work of Mandoble.

He can be contacted on OFPEC

Share this post


Link to post
Share on other sites
Quote[/b] ]That's not true from what I can tell. How else would such dialogs be realized then (those which do not prohibit moving and shooting - for instance just simple text-cut and all that)

They may well be hardcoded into the engine, as the movingEnable option has been around since OFP. But it would be handy if Displays could be used like dialogs, while still allowing you to play the game.

Quote[/b] ]btw: the biki is wrong. there is sais the event handlers were called "on..." like "onMouseEnter".

actually its "MouseEnter" without a "on"

I think it depends on how you assign the event handler. If it's done with the ctrlSetEventHandler command you have to remove the on. If you define them using Description.ext then it's as the wiki says.

Quote[/b] ]This is definately the work of Mandoble.

No he wasn't called Mandoble. Thats actualy my code, I added the waituntil becuase it was running from an init event. The guy I'm thinking of had the clever idea of looping through all the Display indexes to find the one thats currently open.

Share this post


Link to post
Share on other sites
They may well be hardcoded into the engine, as the movingEnable option has been around since OFP. But it would be handy if Displays could be used like dialogs, while still allowing you to play the game.

Cant imagine that as its possible to just find the "cutRsc" (like FadeIn and stuff) somewhere in the configs. Just need to know how.

Maybe it also depends on how you call a Dialog. See "createDisplay" vs. "createDialog" f.e. No idea how to create a "Dialog". if you figure out or already know - please tell me.

yes, thank you - i already found that out (EH) - it works fine now. so it's not more up to my "personal intrest" :>

still i think that issue with displays is very intresting but i m currently not sure about who understands what

Share this post


Link to post
Share on other sites
Quote[/b] ]No idea how to create a "Dialog". if you figure out or already know - please tell me.

For Dialogs I used a tutorial on the wiki:

Dialog_Control

Can't find anything similar for Displays, so can't do much in the way of tests.

Quote[/b] ]yes, thank you - i already found that out (EH) - it works fine now. so it's not more up to my "personal intrest" :>

The wiki should be updated. I only came across it recently for one event, so thanks for confirming it happens with others to.

Quote[/b] ]still i think that issue with displays is very intresting but i m currently not sure about who understands what

Yeah, I think they need some serious investigation. I believe one difference with Displays v Dialogs is, you can package a Display inside a pbo. That was never possible with Dialogs in OFP.

Share this post


Link to post
Share on other sites

Aww. I my mistake. I didnt want to say "Dialogs" but "Displays". So we d agree.

Share this post


Link to post
Share on other sites

Just FYI guys, try moving when you order a squadmate to do the gear action while the dialog is open. It works I haven't gotten around to figuring out just why it works yet.

Share this post


Link to post
Share on other sites
Quote[/b] ]Just FYI guys, try moving when you order a squadmate to do the gear action while the dialog is open.

Yeah, I just took a look. It works when you pickup gear yorself to. The camera commands work to via the Numpad and you can use the alternative move keys. But the mouse and cursor keys look as though they are mapped to the dialog controls by default.

Share this post


Link to post
Share on other sites

Say, what do I need for coloring that Style80 (ST_BACKGROUND)?

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  

×