Jump to content

icons


Guest LAS

Recommended Posts

Ok, so how would I add icons, no better yet, is there a place I can learn this? - Yes I'm very sure this has been asked, but still, I need to learn how to add icons to a nicklist style dialog. Like the dialog:

 

dialog nicklist {
 title ""
 size -1 -1 60 308
 option dbu
 list 1, 0 8 60 300, size
 edit , 2, 0 -2 60 10, read center
}

 

yea thats simple, but its something like that.

Link to comment
Share on other sites

on*:dialog:nicklist:init:*:{

^when the nicklist opens

 dll $mdx SetMircVersion $version

^using mdx.dll set mircversion o the version
 dll $mdx MarkDialog $dname

^with mdx.dll Markdialog
 dll $mdx SetMircVersion $version
 dll $mdx MarkDialog $dname
 dll $mdx SetFont $dname

^set font to the dialog's name (nicklist)
 dll $mdx SetFont $dname 1 14 50 verdana

^set font to what you want, 1 represents the listbox id number, 14 50 represent the size of the text and verdana represents the font chosen.
 dll $mdx SetColor $dname

^set the colour of the font
 dll $mdx SetColor 1,3 text $rgb(0,0,139)

^set the colour type on the text, in id's 1 and three

dll $mdx SetControlMDX $dname 1 ListView noheader smallicon hottrack single > dlls\views.mdx

^ set the control on the listbox as noheader, with smallicons, hottrack and single, use the following paths dlls/views.mdx.


did -i $dname 1 1 iconsize normal small

^add to the dialog in the list box ( 1 1 being the id - mdx works differently like that) set the normal iconsize to small
 did -i $dname 1 1 seticon normal 0, $+ Pics\owner.ico

^add to the list normal icon in the path pics\owner.ico
 did -i $dname 1 1 seticon normal 0, $+ Pics\host.ico

^same explanation as the owner
 did -i $dname 1 1 seticon normal 0, $+ Pics\Spec.ico
 did -i $dname 1 1 seticon normal 0, $+ Pics\voice.ico

 did -i $dname 1 1 settxt color $rgb(0,0,139)

^this actually adds the colour in, without this you will not get colour in there
 nickinlist

^ alias to get nicks in the list

That was simple, now im hoping that you now how to get names into the nicklist if not here is how we do it:

alias nickinlist {
 did -r nicklist 1 

^Remove all the text and stuff in the list
 var %n 1

^set %n to 1
 while (%n <= $nick($active,0)) {

^while %n (1) is less then nicks in the active channel
   did -a nicklist 1 0 + $nicklisticon($nick($active,%n)) $nick($active,%n)

^add to the nicklist in id 1 $nicklisticon is the alias for the icons which we set earlier, add nicks in avtive channel
   inc %n

^including %n
 }
}

Ok now we have all this, we need to set the icons in the nicklist:

alias nicklisticon {  

 if ($1 isowner $active) return 1

^if nick is owner in the channel return the icon to be one
 elseif ($1 isop $active) return 2

^else if the nick is op in the channel return the icon to be two
 elseif (*+*m* iswm $chan($active).mode) && ($1 !isvoice $active) return 4

^if +m is in the room modes and nick is less than voice return to be four
 elseif (*+*m* !iswm $chan($active).mode) && ($1 isvoice $active) return 3

^if +m is not in room modes and nick is voiced return to be three
 elseif (*+*m* iswm $chan($active).mode) && ($1 isvoice $active) return 3

^if +m is in room modes and nick is voice return to be three
 elseif (*+*m* !iswm $chan($active).mode) && ($1 !isvoice $active) return 3

^if +m is not in modes and nick is not voiced return to be three.



Hope this helps - Binime

 

got this from a group im a member of. credits to Binime

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...