twig / dcxdll

Dialog Control eXtensions for mIRC
BSD 3-Clause "New" or "Revised" License
23 stars 2 forks source link

IP Address - new proposals to fix and improve for updating #55

Open EpicNet opened 2 years ago

EpicNet commented 2 years ago

I am using "mIRC v7.66" + "DCX dll v3.1-git428" in system "Windows 8.1 x64".

My proposals for what needs to be corrected and added in "IP Address", to make it maximally functional and beautiful:

  1. Add a new type of border with to customizable the thickness in pixels. For example +a new flag: "/xdid -x dcx 4 +a 1".
  2. Add to new type of border possibility to color customization. For example +a new flag: "/xdid -C dcx 4 +a $rgb(255,0,0)".
  3. Add customizable background color of the control. For example: "/xdid -C dcx 4 +b $rgb(0,0,0)".
  4. Add customizable color for selected (highlighted) part of the IP address (instead of the standard blue).
  5. Add customizable IP address color. For example: "/xdid -C dcx 4 +t $rgb(255,0,0)".
  6. Add customizable line position by using indents, separately on each side. Something similar to CSS (margin/padding).
  7. Add a the ability to remove the set focus on one of the IP address fields.
  8. Fix the incorrect setting of the range. Fires only after setting and moving focus to another field: "/xdid -g".
  9. Add a new functionality for the style transparent, so that only the background can become transparent (without affecting the IP address and border) and the transparency level was regulation using the command: "/xdid -R dcx 4 +b 2 [0-255]" - through the number +b 2, so as not to break backward compatibility for those who use the effect through the number +b 1.

P.S. Perhaps I did not take into account something, forgot to mention or lost sight of what else needs to be done, or on the contrary, made a request about something useless, or maybe after that you have new interesting ideas, therefore, in order to avoid misunderstandings expressed in multiple corrections and rewriting of the code - we can always preliminarily think about this update and discuss in detail the innovations in the chat, so that this control becomes versatile enough, functional, maximally customizable and suitable for any design, in a own peculiar style. Thanks.


image

Here is a test piece of script to reproduce this the problem. To run the script click on "F5" or enter the command "/ipaddress_test":

alias F5 { ipaddress_test }
alias ipaddress_test {
  if ($dialog(ipaddress_test)) .dialog -x ipaddress_test | else { .dialog -m ipaddress_test ipaddress_test }
}
dialog ipaddress_test {
  title "IP Address test"
  icon $mircexe,0
  option pixels
  size -1 -1 200 120
}
on *:DIALOG:ipaddress_test:init:0:{
  .dcx Mark $dname ipaddress_test_work
  .xdialog -b $dname +ty
  .xdialog -g $dname +b $rgb(20,20,27)
  .xdialog -c $dname 1 ipaddress 25 25 150 20 notheme transparent
  .xdid -x $dname 1 +b
  .xdid -R $dname 1 +b 1 130
  .xdid -f $dname 1 +a ansi 8 Comic Sans MS
  .xdid -C $dname 1 +bk $rgb(0,0,0)
  .xdid -C $dname 1 t $rgb(255,0,0)
  .xdid -a $dname 1 255.255.100.100
  .xdid -g $dname 1 1 10 200
  .xdid -j $dname 1 1
  .xdialog -c $dname 2 ipaddress 25 50 150 20
  .xdid -a $dname 2 11.22.33.44
  .xdialog -c $dname 3 ipaddress 25 75 150 20
  .xdid -a $dname 3 158.39.204.62
}
alias ipaddress_test_work {}