mIRC Homepage
Posted By: Kurdish_Assass1n New Dialog Features - 24/07/06 05:04 AM
I had a few ideas for Dialogs.. (I use Dialog Studio)
ok..

[*]First of all, I was wondering if there was an option to disable the "X" in dialogs, It would be nice if that was possible.

[*]Second, I was wondering if there were something to add colors to a dialog, sort of like the "CTRL + K" box?

[*]And last, it would also be nice if we could change fonts in dialogs as well.

Anyone think any of these are good ideas? Please give your opinions.
Posted By: RusselB Re: New Dialog Features - 24/07/06 05:58 AM
You can monitor for that first option via your dialog script. Clicking the "X" returns the same ID as your cancel button, or if you don't have one, returns $null

For colors and fonts, I believe (although I haven't used these myself) that DCX & MDX both support these options for dialogs.
Posted By: PhantasyX Re: New Dialog Features - 24/07/06 04:04 PM
I like the first idea of maybe a mode to hide the "[X]" button on dialogs.
Posted By: hixxy Re: New Dialog Features - 24/07/06 04:09 PM
Nice ideas, but extra dialog features have been suggested many many times and not much has happened. I wouldn't get your hopes up.
Posted By: Kurdish_Assass1n Re: New Dialog Features - 24/07/06 04:26 PM
Quote:
You can monitor for that first option via your dialog script. Clicking the "X" returns the same ID as your cancel button, or if you don't have one, returns $null

For colors and fonts, I believe (although I haven't used these myself) that DCX & MDX both support these options for dialogs.

yea, I think it does as well, the problem is that I make dialogs when needed, like, In most cases, I give them out, and, if I wanted to add color, I wouldn't want to have to give the the dll, and the other scripting, because, I tried DCX yesterday, (I think that was it) and it had a few dlls, and a lot of files/folders, and, I wouldn't want to give that out, it also had a lot of custom identifiers, so, it would be nice if we could get that as well.
Posted By: Mpdreamz Re: New Dialog Features - 24/07/06 04:43 PM
You only need the DCX.dll and copy paste the DCX/XDIALOG/XDID aliases from the dcx_tools.mrc to make DCX work.
Posted By: Kurdish_Assass1n Re: New Dialog Features - 24/07/06 09:42 PM
Quote:
You can monitor for that first option via your dialog script. Clicking the "X" returns the same ID as your cancel button, or if you don't have one, returns $null


Hey Russel, can you please explain this a little more, I'm wanting to disable the 'X' in dialogs.
Posted By: RusselB Re: New Dialog Features - 24/07/06 11:04 PM
Code:
 dialog new_table {
  title "New Project"
  size -1 -1 124 94
  option pixels
  button "OK", 1, 15 15 75 25, ok
  button "Cancel", 2, 15 45 75 25, cancel
}
menu * {
  New Table : dialog $iif(!$dialog(new_table),-md,-ev) new_table new_table
}
on *:dialog:new_table:close:*:{
  echo 4 -a $iif($did,$did,NULL)
}
 

If you click the OK button, then the script echoes 1
If you click the Cancel button, then the script echoes 2
If you click the X, then the script echoes 2

If you remove the line with the Cancel button in it, then run the script and click the X, you'll see NULL

I hope this is sufficient explanation for your requirements.
Posted By: Kurdish_Assass1n Re: New Dialog Features - 25/07/06 01:20 AM
I'm talking about disabling the 'X'
here's an example:

I'm wanting to do the same thing as the disabled button, to the X button, either that, or hide it, where they can't click it, I hope I explained it better.
Posted By: RusselB Re: New Dialog Features - 25/07/06 02:21 AM
I understand, and while at the moment I can't see an advantage to having that, I also can't see a disadvantage either.

In any case, until (and if) this is implemented, a non-perfect workaround could look like
Code:
 dialog new_table {
  title "New Project"
  size -1 -1 124 94
  option pixels
  button "OK", 1, 15 15 75 25, ok
  button "Cancel", 2, 15 45 75 25, cancel
}
menu * {
  New Table : dialog $iif(!$dialog(new_table),-md,-ev) new_table new_table
}
on *:dialog:new_table:close:*:{
  if !$did {
    dialog -md new_table new_table
  }
}
 
Posted By: ARcanUSNUMquam Re: New Dialog Features - 25/07/06 05:05 AM
Quote:
First of all, I was wondering if there was an option to disable the "X" in dialogs, It would be nice if that was possible.


I think that is a really bad idea. Not giving users a way out is bad. Think of a dialog where there is no button (or a button that does nothing), and thus no way to get rid of it since the X is not there. The malicious use for this is just too high.
Posted By: RusselB Re: New Dialog Features - 25/07/06 05:29 AM
Anyone that creates a dialog that doesn't have a way of closing it, shouldn't be coding dialogs for others to use. I, for one, have never seen a dialog that has been scripted for someone else to use that hasn't contained a Cancel button. It's one of the easiest pieces of a dialog to code.
Posted By: ARcanUSNUMquam Re: New Dialog Features - 25/07/06 05:30 AM
You are thinking benevolently. Think maliciously.
Posted By: RusselB Re: New Dialog Features - 25/07/06 05:42 AM
I'm thinking realistically based upon my knowledge of dialogs (or as realistically as I can for 1:40 am)
Posted By: ARcanUSNUMquam Re: New Dialog Features - 25/07/06 05:43 AM
Maybe I'm just a bit more paranoid than the average dialog user. /me looks at the RSS feeds of Secunia, Netcraft, SecurityFocus.
Posted By: Om3n Re: New Dialog Features - 25/07/06 06:51 AM
I can not see the harm in having a flag that creates the dialog without the [x] in the corner, but i would definately insist on 1 condition. Using the flag to hide the [x] should NOT render the [esc] key unable to escape out of the dialog.

I know there are other ways people could render a dialog unclosable, but they would require more effort, and to be honest i really dont see much of a reason somebody with mal-intentions would choose to spend their time on such a trivial thing when they could just do whatever they intend in the background.
Posted By: hixxy Re: New Dialog Features - 25/07/06 12:40 PM
Quote:
The malicious use for this is just too high.


Why? Scripts can run regardless of whether or not there's a close button. Remember that closing the dialog will trigger a script, so what if that is the malicious one?
Posted By: billythekid Re: New Dialog Features - 25/07/06 08:50 PM
theres always the alternative of using a dialog framed @window. that can run with no[x]

also, dcx can make dialogs with no titlebar/[x] etc.

btk
Posted By: KingTomato Re: New Dialog Features - 25/07/06 09:27 PM
Alternative to the "malicious" nature (of which i see VERY minimal; as hixxy pointed out, scripts can be done with or without a gui), the ability to remove the [X] perhaps in the presence of a cancel button would be nice.
© mIRC Discussion Forums