mIRC Home    About    Download    Register    News    Help

Print Thread
#184994 03/09/07 05:16 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
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,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Why not just set the location to centered?

SladeKraven #185000 03/09/07 05:58 PM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
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
  ...
}

Riamus2 #185001 03/09/07 06:07 PM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
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).

Joined: Apr 2004
Posts: 755
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 755
dialog -r $dname

works too smile

Mpdreamz #185006 03/09/07 06:46 PM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
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!

Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
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