lots of changes
@ -36,12 +36,12 @@ new=function(r,b,g)
|
||||
__unm = function (c1)
|
||||
return Color.new(-c1[1],-c1[2],-c1[2])
|
||||
end,
|
||||
__tostring = function(c)
|
||||
return "("..c[1]..","..c[2]..","..c[3]..")"
|
||||
end,
|
||||
__eq = Color.EQ,
|
||||
__lt = Color.LT,
|
||||
__le = Color.LE,
|
||||
__tostring = function(self)
|
||||
return "("..self[1] ..","..self[1] ..","..self[1] ..")"
|
||||
end
|
||||
}
|
||||
local temp = {r/255,b/255,g/255,1}
|
||||
setmetatable(temp, mt)
|
||||
@ -63,23 +63,27 @@ IndexColor=function(name,r,b,g)
|
||||
if type(r)=="string" then
|
||||
r,b,g=tonumber(string.sub(r,1,2),16),tonumber(string.sub(r,3,4),16),tonumber(string.sub(r,5,6),16)
|
||||
end
|
||||
Color[string.lower(name)]=Color.new(r,b,g)
|
||||
Color[string.upper(name)]=Color.new(r,b,g)
|
||||
Color[string.upper(string.sub(name,1,1))..string.lower(string.sub(name,2))]=Color.new(r,b,g)
|
||||
_Color[string.lower(name)]=Color.new(r,b,g)
|
||||
_Color[string.upper(name)]=Color.new(r,b,g)
|
||||
_Color[string.upper(string.sub(name,1,1))..string.lower(string.sub(name,2))]=Color.new(r,b,g)
|
||||
end,
|
||||
Darken=function(color,v)
|
||||
currentR=color[1]
|
||||
currentG=color[2]
|
||||
currentB=color[3]
|
||||
return Color.new((currentR*255) * (1 - v),(currentG*255) * (1 - v),(currentB*255) * (1 - v))
|
||||
return Color.new((color[1]*255) * (1 - v),(color[2]*255) * (1 - v),(color[3]*255) * (1 - v))
|
||||
end,
|
||||
Lighten=function(color,v)
|
||||
currentR=color[1]
|
||||
currentG=color[2]
|
||||
currentB=color[3]
|
||||
return Color.new(currentR*255 + (255 - (currentR*255)) * v,currentG*255 + (255 - (currentG*255)) * v,currentB*255 + (255 - (currentB*255)) * v)
|
||||
return Color.new(color[1]*255 + (255 - (color[1]*255)) * v,color[2]*255 + (255 - (color[2]*255)) * v,color[3]*255 + (255 - (color[3]*255)) * v)
|
||||
end
|
||||
}
|
||||
_Color = {}
|
||||
setmetatable(Color,{
|
||||
__index = function(self,k)
|
||||
local c = _Color[k]
|
||||
return Color.new(c[1]*255,c[2]*255,c[3]*255)
|
||||
end,
|
||||
})
|
||||
Color.IndexColor("Black",20,20,20)
|
||||
Color.IndexColor("WHITE",255,255,255)
|
||||
Color.IndexColor("MAROON",128,20,20)
|
||||
|
||||
@ -54,8 +54,11 @@ function gui:Clickable()
|
||||
if not(x) then
|
||||
return true
|
||||
end
|
||||
if self.isclipped then
|
||||
return not(mx>x+w or mx<x or my>y+h or my<y)
|
||||
end
|
||||
return true
|
||||
end
|
||||
function gui:canPress()
|
||||
local ref = self
|
||||
if self.ClipReference then ref = self.ClipReference end
|
||||
|
||||
@ -17,13 +17,16 @@ function gui:drawR()
|
||||
self.height=(self.Parent.height*self.scale.size.y)+self.offset.size.y
|
||||
local b=true
|
||||
for i,v in pairs(_GuiPro.Clips) do
|
||||
if self:isDescendant(v)==true then
|
||||
if self:isDescendant(v) then
|
||||
b=false
|
||||
end
|
||||
end
|
||||
if b==true then
|
||||
self.isclipped = false
|
||||
if b then
|
||||
love.graphics.setStencilTest()
|
||||
love.graphics.setScissor()
|
||||
else
|
||||
self.isclipped = true
|
||||
end
|
||||
if self.DrawRulesB then
|
||||
for dr=1,#self.DrawRulesB do
|
||||
@ -54,21 +57,17 @@ function gui:drawR()
|
||||
love.graphics.rectangle("line", self.x-(b/2), self.y-(b/2), self.width+b, self.height+b,(self.rx or 1)*self.DPI,(self.ry or 1)*self.DPI,(self.segments or 1)*self.DPI)
|
||||
end
|
||||
if string.find(self.Type, "Text") then
|
||||
if self.text~=nil and self.TextFormat == "center" then
|
||||
love.graphics.setColor(self.TextColor[1],self.TextColor[2],self.TextColor[3],self.TextVisibility)
|
||||
love.graphics.setFont(self.Font)
|
||||
if self.text~=nil and self.TextFormat == "center" then
|
||||
love.graphics.printf(self.text, self.x+(self.width-self.Font:getWidth(self.text))/2, self.y+(self.height-self.Font:getHeight())/2, self.width, "left",self.TextRotaion)
|
||||
elseif self.text~=nil and self.TextFormat == "middleleft" then
|
||||
love.graphics.setColor(self.TextColor[1],self.TextColor[2],self.TextColor[3],self.TextVisibility)
|
||||
love.graphics.setFont(self.Font)
|
||||
love.graphics.printf(self.text, self.x + (self.XTween or 0), self.y+(self.height-self.Font:getHeight())/2, self.width, "left",self.TextRotaion)
|
||||
elseif self.text~=nil and self.TextFormat == "middleright" then
|
||||
love.graphics.setColor(self.TextColor[1],self.TextColor[2],self.TextColor[3],self.TextVisibility)
|
||||
love.graphics.setFont(self.Font)
|
||||
love.graphics.printf(self.text, self.x + (self.XTween or 0), self.y+(self.height-self.Font:getHeight())/2, self.width, "right",self.TextRotaion)
|
||||
elseif self.text~=nil and self.TextFormat == "middlecenter" then
|
||||
love.graphics.printf(self.text, self.x + (self.XTween or 0), self.y+(self.height-self.Font:getHeight())/2, self.width, "center",self.TextRotaion)
|
||||
else
|
||||
love.graphics.setColor(self.TextColor[1],self.TextColor[2],self.TextColor[3],self.TextVisibility)
|
||||
love.graphics.setFont(self.Font)
|
||||
love.graphics.printf(self.text, self.x + (self.XTween or 0), self.y, self.width, self.TextFormat,self.TextRotaion)
|
||||
end
|
||||
end
|
||||
|
||||
@ -5,10 +5,11 @@ function gui:newImageButton(i,name, x, y, w, h, sx ,sy ,sw ,sh)
|
||||
c.Visibility=0
|
||||
c.ImageVisibility=1
|
||||
c.rotation=0
|
||||
c:OnEnter(function()
|
||||
c.BorderSize = 0
|
||||
c:OnMouseEnter(function()
|
||||
love.mouse.setCursor(_GuiPro.CursorH)
|
||||
end)
|
||||
c:OnExit(function()
|
||||
c:OnMouseExit(function()
|
||||
love.mouse.setCursor(_GuiPro.CursorN)
|
||||
end)
|
||||
return c
|
||||
|
||||
@ -6,5 +6,6 @@ function gui:newImageLabel(i,name, x, y, w, h, sx ,sy ,sw ,sh)
|
||||
c.Visibility=0
|
||||
c.ImageVisibility=1
|
||||
c.rotation=0
|
||||
c.BorderSize = 0
|
||||
return c
|
||||
end
|
||||
@ -1,4 +1,4 @@
|
||||
function gui:newScrollMenu(name)
|
||||
function gui:newScrollMenu(name,SC,MC)
|
||||
local temp = self:newFullFrame(name)
|
||||
temp.ref = {
|
||||
[[setNewFont(16)]],
|
||||
@ -9,10 +9,13 @@ function gui:newScrollMenu(name)
|
||||
temp.Visibility = 0
|
||||
local ScrollY = temp:newFrame(name.."ScrollY",-20,0,20,0,1,0,0,1)
|
||||
temp.scroll = ScrollY
|
||||
ScrollY.Color=Color.new(80,80,80)
|
||||
local cc = self.Color
|
||||
local c1,c2=Color.new(cc[1]*255,cc[2]*255,cc[3]*255),Color.new(cc[1]*255+20,cc[2]*255+20,cc[3]*255+20)
|
||||
print(cc[1]-20,cc[2]-20,cc[3]-20)
|
||||
ScrollY.Color=SC or c1
|
||||
ScrollY.allowOverlapping = true
|
||||
ScrollY.Mover = ScrollY:newFrame(name.."MoverY",5,5,10,80)
|
||||
ScrollY.Mover.Color = Color.new(60,60,60)
|
||||
ScrollY.Mover.Color = MC or c2
|
||||
local func = function(b,self,x,y,nn)
|
||||
temp.symbolicY = y
|
||||
if y>45 and y<self.height-45 then
|
||||
@ -65,17 +68,29 @@ function gui:newScrollMenu(name)
|
||||
local height = height or 30
|
||||
temp.max = temp.max + padding-- + height
|
||||
if obj then
|
||||
obj:SetDualDim(nil,temp.max-padding,nil,height,nil,nil,1)
|
||||
obj:SetDualDim(0,temp.max-padding+padding,0,height,0,0,1)
|
||||
obj:setParent(self.first)
|
||||
end
|
||||
local c = obj or self.first:newTextLabel(text,text,0,temp.max-padding,0,height,0,0,1)
|
||||
local c = obj or self.first:newTextLabel(text,text,0,temp.max-padding+padding,0,height,0,0,1)
|
||||
if not obj then
|
||||
c:Mutate(temp.ref)
|
||||
end
|
||||
c.adjustment = padding + height
|
||||
temp.max = temp.max + height
|
||||
c.staticpos = temp.max
|
||||
c.LID = #temp.list
|
||||
temp.list[#temp.list+1] = c
|
||||
return c
|
||||
end
|
||||
function temp:removeItem(obj)
|
||||
local id = obj.LID
|
||||
if not id then error("GUI object is not part of this menu!") end
|
||||
self.max = self.max - obj.adjustment
|
||||
local adj = obj.adjustment
|
||||
obj:Destroy()
|
||||
for i = id+1,#self.list do
|
||||
self.list[i]:setDualDim(nil,self.list[i].offset.pos.y-adj)
|
||||
end
|
||||
end
|
||||
return temp
|
||||
end
|
||||
BIN
Visual Novel/GuiManager/icons/Thumbs.db
Normal file
BIN
Visual Novel/GuiManager/icons/accept.png
Normal file
|
After Width: | Height: | Size: 781 B |
BIN
Visual Novel/GuiManager/icons/add.png
Normal file
|
After Width: | Height: | Size: 733 B |
BIN
Visual Novel/GuiManager/icons/anchor.png
Normal file
|
After Width: | Height: | Size: 523 B |
BIN
Visual Novel/GuiManager/icons/application.png
Normal file
|
After Width: | Height: | Size: 464 B |
BIN
Visual Novel/GuiManager/icons/application_add.png
Normal file
|
After Width: | Height: | Size: 619 B |
BIN
Visual Novel/GuiManager/icons/application_cascade.png
Normal file
|
After Width: | Height: | Size: 524 B |
BIN
Visual Novel/GuiManager/icons/application_delete.png
Normal file
|
After Width: | Height: | Size: 610 B |
BIN
Visual Novel/GuiManager/icons/application_double.png
Normal file
|
After Width: | Height: | Size: 533 B |
BIN
Visual Novel/GuiManager/icons/application_edit.png
Normal file
|
After Width: | Height: | Size: 703 B |
BIN
Visual Novel/GuiManager/icons/application_error.png
Normal file
|
After Width: | Height: | Size: 656 B |
BIN
Visual Novel/GuiManager/icons/application_form.png
Normal file
|
After Width: | Height: | Size: 467 B |
BIN
Visual Novel/GuiManager/icons/application_form_add.png
Normal file
|
After Width: | Height: | Size: 592 B |
BIN
Visual Novel/GuiManager/icons/application_form_delete.png
Normal file
|
After Width: | Height: | Size: 605 B |
BIN
Visual Novel/GuiManager/icons/application_form_edit.png
Normal file
|
After Width: | Height: | Size: 714 B |
BIN
Visual Novel/GuiManager/icons/application_form_magnify.png
Normal file
|
After Width: | Height: | Size: 612 B |
BIN
Visual Novel/GuiManager/icons/application_get.png
Normal file
|
After Width: | Height: | Size: 581 B |
BIN
Visual Novel/GuiManager/icons/application_go.png
Normal file
|
After Width: | Height: | Size: 634 B |
BIN
Visual Novel/GuiManager/icons/application_home.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Visual Novel/GuiManager/icons/application_key.png
Normal file
|
After Width: | Height: | Size: 670 B |
BIN
Visual Novel/GuiManager/icons/application_lightning.png
Normal file
|
After Width: | Height: | Size: 656 B |
BIN
Visual Novel/GuiManager/icons/application_link.png
Normal file
|
After Width: | Height: | Size: 701 B |
BIN
Visual Novel/GuiManager/icons/application_osx.png
Normal file
|
After Width: | Height: | Size: 487 B |
BIN
Visual Novel/GuiManager/icons/application_osx_terminal.png
Normal file
|
After Width: | Height: | Size: 525 B |
BIN
Visual Novel/GuiManager/icons/application_put.png
Normal file
|
After Width: | Height: | Size: 585 B |
BIN
Visual Novel/GuiManager/icons/application_side_boxes.png
Normal file
|
After Width: | Height: | Size: 478 B |
BIN
Visual Novel/GuiManager/icons/application_side_contract.png
Normal file
|
After Width: | Height: | Size: 547 B |
BIN
Visual Novel/GuiManager/icons/application_side_expand.png
Normal file
|
After Width: | Height: | Size: 581 B |
BIN
Visual Novel/GuiManager/icons/application_side_list.png
Normal file
|
After Width: | Height: | Size: 510 B |
BIN
Visual Novel/GuiManager/icons/application_side_tree.png
Normal file
|
After Width: | Height: | Size: 483 B |
BIN
Visual Novel/GuiManager/icons/application_split.png
Normal file
|
After Width: | Height: | Size: 520 B |
BIN
Visual Novel/GuiManager/icons/application_tile_horizontal.png
Normal file
|
After Width: | Height: | Size: 432 B |
BIN
Visual Novel/GuiManager/icons/application_tile_vertical.png
Normal file
|
After Width: | Height: | Size: 492 B |
BIN
Visual Novel/GuiManager/icons/application_view_columns.png
Normal file
|
After Width: | Height: | Size: 493 B |
BIN
Visual Novel/GuiManager/icons/application_view_detail.png
Normal file
|
After Width: | Height: | Size: 576 B |
BIN
Visual Novel/GuiManager/icons/application_view_gallery.png
Normal file
|
After Width: | Height: | Size: 555 B |
BIN
Visual Novel/GuiManager/icons/application_view_icons.png
Normal file
|
After Width: | Height: | Size: 476 B |
BIN
Visual Novel/GuiManager/icons/application_view_list.png
Normal file
|
After Width: | Height: | Size: 473 B |
BIN
Visual Novel/GuiManager/icons/application_view_tile.png
Normal file
|
After Width: | Height: | Size: 465 B |
BIN
Visual Novel/GuiManager/icons/application_xp.png
Normal file
|
After Width: | Height: | Size: 426 B |
BIN
Visual Novel/GuiManager/icons/application_xp_terminal.png
Normal file
|
After Width: | Height: | Size: 507 B |
BIN
Visual Novel/GuiManager/icons/arrow_branch.png
Normal file
|
After Width: | Height: | Size: 582 B |
BIN
Visual Novel/GuiManager/icons/arrow_divide.png
Normal file
|
After Width: | Height: | Size: 677 B |
BIN
Visual Novel/GuiManager/icons/arrow_down.png
Normal file
|
After Width: | Height: | Size: 379 B |
BIN
Visual Novel/GuiManager/icons/arrow_in.png
Normal file
|
After Width: | Height: | Size: 600 B |
BIN
Visual Novel/GuiManager/icons/arrow_inout.png
Normal file
|
After Width: | Height: | Size: 551 B |
BIN
Visual Novel/GuiManager/icons/arrow_join.png
Normal file
|
After Width: | Height: | Size: 626 B |
BIN
Visual Novel/GuiManager/icons/arrow_left.png
Normal file
|
After Width: | Height: | Size: 345 B |
BIN
Visual Novel/GuiManager/icons/arrow_merge.png
Normal file
|
After Width: | Height: | Size: 484 B |
BIN
Visual Novel/GuiManager/icons/arrow_out.png
Normal file
|
After Width: | Height: | Size: 594 B |
BIN
Visual Novel/GuiManager/icons/arrow_redo.png
Normal file
|
After Width: | Height: | Size: 625 B |
BIN
Visual Novel/GuiManager/icons/arrow_refresh.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Visual Novel/GuiManager/icons/arrow_refresh_small.png
Normal file
|
After Width: | Height: | Size: 506 B |
BIN
Visual Novel/GuiManager/icons/arrow_right.png
Normal file
|
After Width: | Height: | Size: 349 B |
BIN
Visual Novel/GuiManager/icons/arrow_rotate_anticlockwise.png
Normal file
|
After Width: | Height: | Size: 608 B |
BIN
Visual Novel/GuiManager/icons/arrow_rotate_clockwise.png
Normal file
|
After Width: | Height: | Size: 602 B |
BIN
Visual Novel/GuiManager/icons/arrow_switch.png
Normal file
|
After Width: | Height: | Size: 683 B |
BIN
Visual Novel/GuiManager/icons/arrow_turn_left.png
Normal file
|
After Width: | Height: | Size: 516 B |
BIN
Visual Novel/GuiManager/icons/arrow_turn_right.png
Normal file
|
After Width: | Height: | Size: 489 B |
BIN
Visual Novel/GuiManager/icons/arrow_undo.png
Normal file
|
After Width: | Height: | Size: 631 B |
BIN
Visual Novel/GuiManager/icons/arrow_up.png
Normal file
|
After Width: | Height: | Size: 372 B |
BIN
Visual Novel/GuiManager/icons/asterisk_orange.png
Normal file
|
After Width: | Height: | Size: 760 B |
BIN
Visual Novel/GuiManager/icons/asterisk_yellow.png
Normal file
|
After Width: | Height: | Size: 743 B |
BIN
Visual Novel/GuiManager/icons/attach.png
Normal file
|
After Width: | Height: | Size: 391 B |
BIN
Visual Novel/GuiManager/icons/award_star_add.png
Normal file
|
After Width: | Height: | Size: 853 B |
BIN
Visual Novel/GuiManager/icons/award_star_bronze_1.png
Normal file
|
After Width: | Height: | Size: 733 B |
BIN
Visual Novel/GuiManager/icons/award_star_bronze_2.png
Normal file
|
After Width: | Height: | Size: 755 B |
BIN
Visual Novel/GuiManager/icons/award_star_bronze_3.png
Normal file
|
After Width: | Height: | Size: 754 B |
BIN
Visual Novel/GuiManager/icons/award_star_delete.png
Normal file
|
After Width: | Height: | Size: 849 B |
BIN
Visual Novel/GuiManager/icons/award_star_gold_1.png
Normal file
|
After Width: | Height: | Size: 753 B |
BIN
Visual Novel/GuiManager/icons/award_star_gold_2.png
Normal file
|
After Width: | Height: | Size: 770 B |
BIN
Visual Novel/GuiManager/icons/award_star_gold_3.png
Normal file
|
After Width: | Height: | Size: 781 B |
BIN
Visual Novel/GuiManager/icons/award_star_silver_1.png
Normal file
|
After Width: | Height: | Size: 714 B |
BIN
Visual Novel/GuiManager/icons/award_star_silver_2.png
Normal file
|
After Width: | Height: | Size: 734 B |
BIN
Visual Novel/GuiManager/icons/award_star_silver_3.png
Normal file
|
After Width: | Height: | Size: 738 B |
BIN
Visual Novel/GuiManager/icons/basket.png
Normal file
|
After Width: | Height: | Size: 669 B |
BIN
Visual Novel/GuiManager/icons/basket_add.png
Normal file
|
After Width: | Height: | Size: 752 B |
BIN
Visual Novel/GuiManager/icons/basket_delete.png
Normal file
|
After Width: | Height: | Size: 773 B |
BIN
Visual Novel/GuiManager/icons/basket_edit.png
Normal file
|
After Width: | Height: | Size: 811 B |
BIN
Visual Novel/GuiManager/icons/basket_error.png
Normal file
|
After Width: | Height: | Size: 794 B |
BIN
Visual Novel/GuiManager/icons/basket_go.png
Normal file
|
After Width: | Height: | Size: 777 B |
BIN
Visual Novel/GuiManager/icons/basket_put.png
Normal file
|
After Width: | Height: | Size: 733 B |
BIN
Visual Novel/GuiManager/icons/basket_remove.png
Normal file
|
After Width: | Height: | Size: 738 B |
BIN
Visual Novel/GuiManager/icons/bell.png
Normal file
|
After Width: | Height: | Size: 789 B |
BIN
Visual Novel/GuiManager/icons/bell_add.png
Normal file
|
After Width: | Height: | Size: 816 B |
BIN
Visual Novel/GuiManager/icons/bell_delete.png
Normal file
|
After Width: | Height: | Size: 824 B |
BIN
Visual Novel/GuiManager/icons/bell_error.png
Normal file
|
After Width: | Height: | Size: 813 B |
BIN
Visual Novel/GuiManager/icons/bell_go.png
Normal file
|
After Width: | Height: | Size: 836 B |
BIN
Visual Novel/GuiManager/icons/bell_link.png
Normal file
|
After Width: | Height: | Size: 850 B |
BIN
Visual Novel/GuiManager/icons/bin.png
Normal file
|
After Width: | Height: | Size: 476 B |
BIN
Visual Novel/GuiManager/icons/bin_closed.png
Normal file
|
After Width: | Height: | Size: 363 B |
BIN
Visual Novel/GuiManager/icons/bin_empty.png
Normal file
|
After Width: | Height: | Size: 475 B |
BIN
Visual Novel/GuiManager/icons/bomb.png
Normal file
|
After Width: | Height: | Size: 793 B |
BIN
Visual Novel/GuiManager/icons/book.png
Normal file
|
After Width: | Height: | Size: 593 B |