changeset 22:45e1e612df44

Texture and visibility settings applied during frame creation
author Nenue
date Wed, 23 Dec 2015 08:19:11 -0500
parents 4ce99f995339
children 2c2a84163606
files Devian.lua
diffstat 1 files changed, 15 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Devian.lua	Tue Dec 22 02:32:10 2015 -0500
+++ b/Devian.lua	Wed Dec 23 08:19:11 2015 -0500
@@ -28,7 +28,9 @@
   backblend = 'BLEND',
   frontdrop = {1,1,1,1},
   frontgrad = {'VERTICAL', 0.1, 0.1, 0.1, 0.9, 0, 0, 0, 0.9},
-  frontblend = 'BLEND'
+  frontblend = 'BLEND',
+  frontborder = {1,0,0,1},
+  backborder = {0,0,1,0.75},
 }
 
 
@@ -237,7 +239,7 @@
   --print(unpack(db.frontdrop))
   --print(unpack(db.frontgrad))
   --print(db.frontblend)
-  D.raise_ct = D.raise_ct + 1
+  -- D.raise_ct = D.raise_ct + 1
   c:Raise()
   c.out.backdrop:SetTexture(unpack(db.frontdrop))
   c.out.backdrop:SetGradientAlpha(unpack(db.frontgrad))
@@ -245,7 +247,7 @@
   db.current_channel = c.index
 
   for _, part in pairs(c.border) do
-    part:SetTexture(1,0,0,1)
+    part:SetTexture(unpack(db.front_border))
   end
 
   for id, bc in pairs(D.console) do
@@ -259,7 +261,7 @@
       bc.out.backdrop:SetBlendMode(db.backblend)
 
       for _, part in pairs(bc.border) do
-        part:SetTexture(0,0,0.5,0.6)
+        part:SetTexture(unpack(db.back_border))
       end
     end
 
@@ -284,6 +286,12 @@
   f:SetSize(vars.width, vars.height)
   f:Lower()
   f.out:SetFont(db.font, db.fontsize, db.fontoutline)
+  if (db.current_channel == i) then
+    f:out:SetTexture(unpack(db.frontdrop))
+  else
+    f:out:SetTexture(unpack(db.backdrop))
+  end
+
   f.Save = Console_Save
   f.Minimize = Console_Minimize
   f.Maximize = Console_Maximize
@@ -307,6 +315,8 @@
   end
   if vars.minimized then
     f:Minimize()
+  else
+    f:Maximize()
   end
 
   return f
@@ -553,7 +563,7 @@
     _G.oldprint = D.oldprint
   end
 
-  self.raise_ct = 0
+  --self.raise_ct = 0
   self.last_channel = 0
   self.num_channels = 0
   self.console = {}