mIRC Home    About    Download    Register    News    Help

Print Thread
#184994 03/09/07 05:16 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I'd like to see the -C switch to center dialog when first opened.

SladeKraven #184999 03/09/07 05:52 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Why not just set the location to centered?


Invision Support
#Invision on irc.irchighway.net
SladeKraven #185000 03/09/07 05:58 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
May be helpful I suppose. In case you're not aware though, this is already scriptable:

Code:
on *:dialog:moo:init:0:{
  dialog -s $dname $calc(($window(-1).w / 2) - ($dialog($dname).w / 2)) $&
    $calc(($window(-1).h / 2) - ($dialog($dname).h / 2)) -1 -1
}


Not to mention of course you can use the size line in the table definition to make it centred by default:
Code:
dialog moo {
  ...
  size -1 -1 height width
  ...
}


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Riamus2 #185001 03/09/07 06:07 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Well you might use the same dialog table for more than one dialog, with each needing different positioning. Or I guess you might want the dialog to be positioned based on a setting somewhere or depending on the situation, but this is all still settable using existing methods as noted in my other post (just a little more code required).


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
dialog -r $dname

works too smile


$maybe
Mpdreamz #185006 03/09/07 06:46 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Oh yeah, and that. blush

* starbucks_mafia goes back to versions.txt to see when that was added.

Hmm... added in v5.61 back in 1999, you'd think I'd have found that switch by now!


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Thanks for your feedback. I was aware it could be scripted. I just figured it could be useful because it's used in @windows even though you can specify the xywh etc.


Link Copied to Clipboard