Project

General

Profile

Actions

Feature #5591

open

editbox

Added by James Fraser 6 months ago. Updated 6 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
06/02/2022
Due date:
% Done:

0%

Estimated time:
Operative System:
All

Description

A feature that i use to love in mIRC was having the non active editboxes to be colored differently than the active one

Would be great to see it on adiirc

thank you

Barbara

Actions #1

Updated by Per Amundsen 6 months ago

Try this:

on *:ACTIVE:*:{
  setcolors
}

on *:APPACTIVE:{
  setcolors
}

alias setcolors {
  var %s 0
  while (%s < $scon(0)) {
    inc %s
    scon %s

    var %w 0
    while (%w < $window(*, 0)) {
      inc %w
      var %type = $window(*, %w).type

      ; sets the editbox color for inactive windows, using $color(N) or $rgb() decimal or RRR,GGG,BBB format
      ; var %background = $color(4)
      ; var %text = $color(5)
      ; var %background = $rgb(255,0,0)
      ; var %text = $rgb(0,0,255)
      ; var %background = 255,0,0
      ; var %text = 0,0,255

      var %background = $color(1)
      var %text = $color(0)

      if ($appactive && $window(*, %w).wid == $activewid) {

        ; for the active window, use the editbox color options
        %background = $ocolor(29)
        %text = $ocolor(30)
      }

      if (%type == status) {
        editbox -sk %background
        editbox -sc %text
      }
      else if (%type == channel) || (%type == query) {
        editbox -k $window(*, %w) %background
        editbox -c $window(*, %w) %text
      }
    }
  }
}
Actions

Also available in: Atom PDF