Do optimization in Piano applet (#1047)
This commit is contained in:
committed by
GitHub
parent
a2931ea290
commit
486eaeae52
@@ -14,15 +14,16 @@ local inst
|
|||||||
local offset
|
local offset
|
||||||
local tempoffset=0
|
local tempoffset=0
|
||||||
|
|
||||||
local lastPlayBGM
|
local generateVKey
|
||||||
local showingKey
|
local showingKey
|
||||||
local pianoVK={} -- All piano key can be appear on the screen, want to see? Check the end of the code
|
local pianoVK={} -- All piano key can be appear on the screen, want to see? Check the end of the code
|
||||||
local touches={}
|
local touches={}
|
||||||
|
|
||||||
local keyCount=0 -- Get key count (up to 626, can pass), used to check if we need to launch Lua's garbage collector or not
|
local keyCount=0 -- Get key count (up to 262, can be larger), used to check if we need to launch Lua's garbage collector or not
|
||||||
local textObj={} -- We will keep all text objects of note here, only used for virutal keys
|
local textObj={} -- We will keep all text objects of note here, only used for virutal keys
|
||||||
local lastKeyTime -- Last time any key pressed
|
local lastKeyTime -- Last time any key pressed
|
||||||
|
|
||||||
|
local lastPlayBGM
|
||||||
local scene={}
|
local scene={}
|
||||||
|
|
||||||
-- Rename all virtual key's text
|
-- Rename all virtual key's text
|
||||||
@@ -91,6 +92,7 @@ function scene.enter()
|
|||||||
keyCount=0
|
keyCount=0
|
||||||
lastKeyTime=nil
|
lastKeyTime=nil
|
||||||
|
|
||||||
|
generateVKey()
|
||||||
_notHoldCS()
|
_notHoldCS()
|
||||||
_showVirtualKey(MOBILE)
|
_showVirtualKey(MOBILE)
|
||||||
end
|
end
|
||||||
@@ -144,7 +146,7 @@ function scene.keyUp()
|
|||||||
if (
|
if (
|
||||||
not kbIsDown('lctrl','rctrl','lshift','rshift') -- If we are not holding Ctrl or Shift keys
|
not kbIsDown('lctrl','rctrl','lshift','rshift') -- If we are not holding Ctrl or Shift keys
|
||||||
) and not moIsDown(1) -- and the left mouse button is not being held
|
) and not moIsDown(1) -- and the left mouse button is not being held
|
||||||
-- The implementationo is really wild but I hope it will good enough to keep the virtual keys from bugs
|
-- The implementation is really wild but I hope it will good enough to keep the virtual keys from bugs
|
||||||
then _notHoldCS() end
|
then _notHoldCS() end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -158,9 +160,7 @@ function scene.draw()
|
|||||||
|
|
||||||
-- Drawing virtual keys
|
-- Drawing virtual keys
|
||||||
if showingKey then
|
if showingKey then
|
||||||
for _,key in pairs(pianoVK) do
|
for _,key in pairs(pianoVK) do key:draw() end
|
||||||
key:draw()
|
|
||||||
end
|
|
||||||
gc.setLineWidth(1)
|
gc.setLineWidth(1)
|
||||||
gc.setColor(COLOR.Z)
|
gc.setColor(COLOR.Z)
|
||||||
gc.line(685.5,297,685.5,642)
|
gc.line(685.5,297,685.5,642)
|
||||||
@@ -168,11 +168,9 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function scene.update(dt)
|
function scene.update(dt)
|
||||||
for _,key in pairs(pianoVK) do
|
for _,key in pairs(pianoVK) do key:update(nil,dt) end
|
||||||
key:update(nil,dt)
|
|
||||||
end
|
|
||||||
|
|
||||||
if lastKeyTime and keyCount>626 and TIME()-lastKeyTime>10 then
|
if lastKeyTime and keyCount>262 and TIME()-lastKeyTime>10 then
|
||||||
collectgarbage()
|
collectgarbage()
|
||||||
lastKeyTime=nil
|
lastKeyTime=nil
|
||||||
keyCount=0
|
keyCount=0
|
||||||
@@ -186,101 +184,57 @@ scene.widgetList={
|
|||||||
WIDGET.newKey {name='offset+' ,x=475 ,y=60,w=60 ,h=60,fText=CHAR.key.right,code=pressKey"ralt",hideF=function() return not showingKey end},
|
WIDGET.newKey {name='offset+' ,x=475 ,y=60,w=60 ,h=60,fText=CHAR.key.right,code=pressKey"ralt",hideF=function() return not showingKey end},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Set virtual keys (seperate from ZFramework)
|
-- Generate virtual keys (seperate from ZFramework, to use only in this scene)
|
||||||
-- Using hashtable to reduce usage time
|
-- Using hashtable to reduce usage time
|
||||||
pianoVK={
|
generateVKey=function()
|
||||||
-- Number row: 01234567890-= 13
|
local allRow={
|
||||||
['1' ]=WIDGET.newKey{x= 75,y=335,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('1' ) end},
|
{'1','2','3','4','5','6','7','8','9','0' ,'-','=','backspace'},
|
||||||
['2' ]=WIDGET.newKey{x= 165,y=335,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('2' ) end},
|
{'q','w','e','r','t','y','u','i','o','p','[' ,']','\\'},
|
||||||
['3' ]=WIDGET.newKey{x= 255,y=335,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('3' ) end},
|
{'a','s','d','f','g','h','j','k','l',';','\'','return'},
|
||||||
['4' ]=WIDGET.newKey{x= 345,y=335,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('4' ) end},
|
{'z','x','c','v','b','n','m',',','.','/',},
|
||||||
['5' ]=WIDGET.newKey{x= 435,y=335,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('5' ) end},
|
}
|
||||||
['6' ]=WIDGET.newKey{x= 525,y=335,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('6' ) end},
|
local keyColorInHomeRow={'R','W','P','N','Z','Z','O','L','G','C','Z','Z'}
|
||||||
['7' ]=WIDGET.newKey{x= 615,y=335,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('7' ) end},
|
|
||||||
['8' ]=WIDGET.newKey{x= 755,y=335,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('8' ) end},
|
|
||||||
['9' ]=WIDGET.newKey{x= 845,y=335,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('9' ) end},
|
|
||||||
['0' ]=WIDGET.newKey{x= 935,y=335,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('0' ) end},
|
|
||||||
['-' ]=WIDGET.newKey{x=1025,y=335,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('-' ) end},
|
|
||||||
['=' ]=WIDGET.newKey{x=1115,y=335,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('=' ) end},
|
|
||||||
['backspace']=WIDGET.newKey{x=1205,y=335,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('backspace') end},
|
|
||||||
|
|
||||||
-- Top row: QWERTYUIOP[]\ 13
|
for row,keysInRow in pairs(allRow) do
|
||||||
['q' ]=WIDGET.newKey{x= 75,y=425,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('q' ) end},
|
for keyIndex,keyChar in pairs(keysInRow) do
|
||||||
['w' ]=WIDGET.newKey{x= 165,y=425,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('w' ) end},
|
-- Create the base first
|
||||||
['e' ]=WIDGET.newKey{x= 255,y=425,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('e' ) end},
|
local K=WIDGET.newKey{
|
||||||
['r' ]=WIDGET.newKey{x= 345,y=425,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('r' ) end},
|
x=75+90*(keyIndex-1)+50*(keyIndex>7 and 1 or 0),
|
||||||
['t' ]=WIDGET.newKey{x= 435,y=425,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('t' ) end},
|
y=335+90*(row-1),
|
||||||
['y' ]=WIDGET.newKey{x= 525,y=425,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('y' ) end},
|
w=75,h=75,
|
||||||
['u' ]=WIDGET.newKey{x= 615,y=425,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('u' ) end},
|
|
||||||
['i' ]=WIDGET.newKey{x= 755,y=425,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('i' ) end},
|
|
||||||
['o' ]=WIDGET.newKey{x= 845,y=425,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('o' ) end},
|
|
||||||
['p' ]=WIDGET.newKey{x= 935,y=425,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('p' ) end},
|
|
||||||
['[' ]=WIDGET.newKey{x=1025,y=425,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('[' ) end},
|
|
||||||
[']' ]=WIDGET.newKey{x=1115,y=425,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown(']' ) end},
|
|
||||||
['\\']=WIDGET.newKey{x=1205,y=425,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('\\') end},
|
|
||||||
|
|
||||||
-- Home row ASDFGHJKL;''<ENTER> 12
|
font=35,fText='',sound=false,
|
||||||
['a' ]=WIDGET.newKey{x= 75,y=515,w=75,h=75,sound=false,font=35,fText='',color='R',code=function() scene.keyDown('a' ) end},
|
color=row==3 and keyColorInHomeRow[keyIndex] or 'Z',
|
||||||
['s' ]=WIDGET.newKey{x= 165,y=515,w=75,h=75,sound=false,font=35,fText='',color='W',code=function() scene.keyDown('s' ) end},
|
code=function() scene.keyDown(keyChar) end
|
||||||
['d' ]=WIDGET.newKey{x= 255,y=515,w=75,h=75,sound=false,font=35,fText='',color='P',code=function() scene.keyDown('d' ) end},
|
}
|
||||||
['f' ]=WIDGET.newKey{x= 345,y=515,w=75,h=75,sound=false,font=35,fText='',color='N',code=function() scene.keyDown('f' ) end},
|
|
||||||
['g' ]=WIDGET.newKey{x= 435,y=515,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('g' ) end},
|
|
||||||
['h' ]=WIDGET.newKey{x= 525,y=515,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('h' ) end},
|
|
||||||
['j' ]=WIDGET.newKey{x= 615,y=515,w=75,h=75,sound=false,font=35,fText='',color='O',code=function() scene.keyDown('j' ) end},
|
|
||||||
['k' ]=WIDGET.newKey{x= 755,y=515,w=75,h=75,sound=false,font=35,fText='',color='L',code=function() scene.keyDown('k' ) end},
|
|
||||||
['l' ]=WIDGET.newKey{x= 845,y=515,w=75,h=75,sound=false,font=35,fText='',color='G',code=function() scene.keyDown('l' ) end},
|
|
||||||
[';' ]=WIDGET.newKey{x= 935,y=515,w=75,h=75,sound=false,font=35,fText='',color='C',code=function() scene.keyDown(';' ) end},
|
|
||||||
['\'' ]=WIDGET.newKey{x=1025,y=515,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('\'' ) end},
|
|
||||||
['return']=WIDGET.newKey{x=1115,y=515,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('return') end},
|
|
||||||
|
|
||||||
-- Bottom row ZXCVBNM,./ 10
|
-- Then modify the base to get the key we expected
|
||||||
['z']=WIDGET.newKey{x= 75,y=605,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('z') end},
|
function K:update(activateState,dt)
|
||||||
['x']=WIDGET.newKey{x=165,y=605,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('x') end},
|
-- activateState: 0=off, 1=on then off, 2=on
|
||||||
['c']=WIDGET.newKey{x=255,y=605,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('c') end},
|
local activationTime=self.activationTime or 0
|
||||||
['v']=WIDGET.newKey{x=345,y=605,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('v') end},
|
local maxTime=6.2
|
||||||
['b']=WIDGET.newKey{x=435,y=605,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('b') end},
|
|
||||||
['n']=WIDGET.newKey{x=525,y=605,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('n') end},
|
if activateState~=nil then self.activateState=activateState
|
||||||
['m']=WIDGET.newKey{x=615,y=605,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('m') end},
|
elseif (self.activateState==1 and activationTime==maxTime) or not self.activateState then self.activateState=0 end
|
||||||
[',']=WIDGET.newKey{x=755,y=605,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown(',') end},
|
-- LIKELY NOT POSSIBLE TO DO
|
||||||
['.']=WIDGET.newKey{x=845,y=605,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('.') end},
|
-- Holding key: self.activateState=activateState and activateState or not activationTime>maxTime and self.activateState or 0 end
|
||||||
['/']=WIDGET.newKey{x=935,y=605,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() scene.keyDown('/') end},
|
if dt then
|
||||||
|
if self.activateState>0 then self.activationTime=min(activationTime+dt*60,maxTime)
|
||||||
-- Ctrl and Shift 2
|
elseif activationTime>0 then self.activationTime=max(activationTime-dt*30,0)
|
||||||
['ctrl' ]=WIDGET.newKey{x=1115,y=605,w=75 ,h=75,sound=false,font=35,fText='',color='Z',code=function() if not tempoffset==-1 then _holdingCtrl() else _notHoldCS() end end},
|
end
|
||||||
['shift']=WIDGET.newKey{x=1205,y=605,w=75 ,h=75,sound=false,font=35,fText='',color='Z',code=function() if not tempoffset== 1 then _holdingShift() else _notHoldCS() end end},
|
end
|
||||||
}
|
|
||||||
|
|
||||||
-- Set objects text
|
|
||||||
pianoVK.ctrl :setObject(CHAR.key.ctrl )
|
|
||||||
pianoVK.shift:setObject(CHAR.key.shift)
|
|
||||||
-- Overwrite some functions
|
|
||||||
for _,K in pairs(pianoVK) do
|
|
||||||
-- Overwrite the update function
|
|
||||||
function K:update(activateState,dt)
|
|
||||||
-- activateState
|
|
||||||
-- 0 - Off
|
|
||||||
-- 1 - On then off
|
|
||||||
-- 2 - On
|
|
||||||
local ATV=self.ATV
|
|
||||||
local maxTime=6.2
|
|
||||||
|
|
||||||
if activateState~=nil then self.activateState=activateState
|
|
||||||
elseif (self.activateState==1 and ATV==maxTime) or not self.activateState then self.activateState=0 end
|
|
||||||
|
|
||||||
-- LIKELY NOT POSSIBLE TO DO
|
|
||||||
-- Holding key: self.activateState=activateState and activateState or not ATV>maxTime and self.activateState or 0 end
|
|
||||||
|
|
||||||
if dt then
|
|
||||||
if self.activateState>0 then
|
|
||||||
self.ATV=min(ATV+dt*60,maxTime)
|
|
||||||
elseif ATV>0 then
|
|
||||||
self.ATV=max(ATV-dt*30,0)
|
|
||||||
end
|
end
|
||||||
|
K.getCenter,K.drag,K.release=nil
|
||||||
|
pianoVK[keyChar]=K
|
||||||
|
K=nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Remove unnecessary function (reduce memory usage)
|
|
||||||
function K:getCenter() end
|
-- Special case
|
||||||
function K:drag() end
|
pianoVK.ctrl =WIDGET.newKey{x=1115,y=605,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() if not tempoffset==-1 then _holdingCtrl() else _notHoldCS() end end}
|
||||||
function K:release() end
|
pianoVK.ctrl :setObject(CHAR.key.ctrl )
|
||||||
|
pianoVK.shift=WIDGET.newKey{x=1205,y=605,w=75,h=75,sound=false,font=35,fText='',color='Z',code=function() if not tempoffset== 1 then _holdingShift() else _notHoldCS() end end}
|
||||||
|
pianoVK.shift:setObject(CHAR.key.shift)
|
||||||
end
|
end
|
||||||
|
|
||||||
return scene
|
return scene
|
||||||
@@ -55,8 +55,8 @@ local function _scanDict(D)
|
|||||||
end
|
end
|
||||||
local function _getList() return result[1] and result or dict end
|
local function _getList() return result[1] and result or dict end
|
||||||
|
|
||||||
local textBox=WIDGET.newTextBox{name='infoBox',x=320,y=180,w=862,h=526,font=25,fix=true}
|
local contentBox=WIDGET.newTextBox{name='contentBox',x=320,y=180,w=862,h=526,font=25,fix=true}
|
||||||
local inputBox=WIDGET.newInputBox{name='input',x=20,y=110,w=762,h=60,font=40,limit=32}
|
local inputBox=WIDGET.newInputBox{name='inputBox',x=20,y=110,w=762,h=60,font=40,limit=32}
|
||||||
local listBox=WIDGET.newListBox{name='listBox',x=20,y=180,w=280,h=526,font=30,lineH=35,drawF=function(item,id,ifSel)
|
local listBox=WIDGET.newListBox{name='listBox',x=20,y=180,w=280,h=526,font=30,lineH=35,drawF=function(item,id,ifSel)
|
||||||
-- Background
|
-- Background
|
||||||
if ifSel then
|
if ifSel then
|
||||||
@@ -75,7 +75,7 @@ local function _updateContentBox()
|
|||||||
_t,t=pcall(function() return _getList()[listBox.selected].content end)
|
_t,t=pcall(function() return _getList()[listBox.selected].content end)
|
||||||
if not _t then t={"???"} end
|
if not _t then t={"???"} end
|
||||||
local _w,c=FONT.get(currentFontSize):getWrap(t,840)
|
local _w,c=FONT.get(currentFontSize):getWrap(t,840)
|
||||||
textBox:setTexts(c)
|
contentBox:setTexts(c)
|
||||||
end
|
end
|
||||||
-- Clear the result
|
-- Clear the result
|
||||||
local function _clearResult()
|
local function _clearResult()
|
||||||
@@ -130,9 +130,8 @@ end
|
|||||||
-- Changing font size, z=0 --> reset
|
-- Changing font size, z=0 --> reset
|
||||||
local function _setZoom(z)
|
local function _setZoom(z)
|
||||||
currentFontSize=MATH.clamp(z~=0 and currentFontSize+z or 25,15,40)
|
currentFontSize=MATH.clamp(z~=0 and currentFontSize+z or 25,15,40)
|
||||||
textBox.font=currentFontSize
|
contentBox.font=currentFontSize
|
||||||
textBox.lineH=currentFontSize*7/5 -- Recalculate the line's height
|
contentBox:reset()
|
||||||
textBox.capacity=math.ceil((textBox.h-10)/textBox.lineH)
|
|
||||||
_updateContentBox()
|
_updateContentBox()
|
||||||
MES.new("check",z~=0 and text.dict.sizeChanged:repD(currentFontSize) or text.dict.sizeReset,1.26)
|
MES.new("check",z~=0 and text.dict.sizeChanged:repD(currentFontSize) or text.dict.sizeReset,1.26)
|
||||||
end
|
end
|
||||||
@@ -166,7 +165,7 @@ function scene.wheelMoved(_,y)
|
|||||||
if WIDGET.sel==listBox then
|
if WIDGET.sel==listBox then
|
||||||
listBox:scroll(-y)
|
listBox:scroll(-y)
|
||||||
else
|
else
|
||||||
textBox:scroll(-y)
|
contentBox:scroll(-y)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function scene.keyDown(key)
|
function scene.keyDown(key)
|
||||||
@@ -174,7 +173,7 @@ function scene.keyDown(key)
|
|||||||
|
|
||||||
-- Switching selected items
|
-- Switching selected items
|
||||||
if key=='up' or key=='down' then
|
if key=='up' or key=='down' then
|
||||||
textBox:scroll(key=='up' and -1 or 1)
|
contentBox:scroll(key=='up' and -1 or 1)
|
||||||
elseif (key=='left' or key=='pageup' or key=='right' or key=='pagedown') then
|
elseif (key=='left' or key=='pageup' or key=='right' or key=='pagedown') then
|
||||||
_jumpover(key,love.keyboard.isDown('lctrl','rctrl','lalt','ralt','lshift','rshift') and 12)
|
_jumpover(key,love.keyboard.isDown('lctrl','rctrl','lalt','ralt','lshift','rshift') and 12)
|
||||||
elseif key=='cC' or key=='c' and love.keyboard.isDown('lctrl','rctrl') then
|
elseif key=='cC' or key=='c' and love.keyboard.isDown('lctrl','rctrl') then
|
||||||
@@ -251,7 +250,7 @@ function scene.gamepadDown(key)
|
|||||||
if Joystick:isGamepadDown('a') then
|
if Joystick:isGamepadDown('a') then
|
||||||
_setZoom(key=='dpup' and 5 or -5)
|
_setZoom(key=='dpup' and 5 or -5)
|
||||||
else
|
else
|
||||||
textBox:scroll(key=='dpup' and -3 or 3)
|
contentBox:scroll(key=='dpup' and -3 or 3)
|
||||||
end
|
end
|
||||||
elseif key=='dpleft' or key=='dpright' then
|
elseif key=='dpleft' or key=='dpright' then
|
||||||
_jumpover(key:gsub('dp',''),Joystick:isGamepadDown('a') and 12)
|
_jumpover(key:gsub('dp',''),Joystick:isGamepadDown('a') and 12)
|
||||||
@@ -308,7 +307,7 @@ scene.widgetList={
|
|||||||
WIDGET.newText{name='title',x=100,y=15,font=70,align='L'},
|
WIDGET.newText{name='title',x=100,y=15,font=70,align='L'},
|
||||||
listBox,
|
listBox,
|
||||||
inputBox,
|
inputBox,
|
||||||
textBox,
|
contentBox,
|
||||||
WIDGET.newKey{name='link',x=1234,y=520,w=60,font=45,fText=CHAR.icon.globe,code=pressKey'application',hideF=function() return not (listBox.selected>0 and _getList()[listBox.selected].url) end},
|
WIDGET.newKey{name='link',x=1234,y=520,w=60,font=45,fText=CHAR.icon.globe,code=pressKey'application',hideF=function() return not (listBox.selected>0 and _getList()[listBox.selected].url) end},
|
||||||
WIDGET.newKey{name='copy',x=1234,y=590,w=60,font=40,fText=CHAR.icon.copy,code=pressKey'cC',hideF=function() return not (listBox.selected>0) end},
|
WIDGET.newKey{name='copy',x=1234,y=590,w=60,font=40,fText=CHAR.icon.copy,code=pressKey'cC',hideF=function() return not (listBox.selected>0) end},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user