My DTS prototype
Create a Gist (https://gist.github.com/) for each configuration file related to this issue
Feedback :
License: MIT License
My DTS prototype
Create a Gist (https://gist.github.com/) for each configuration file related to this issue
Feedback :
if type(action) == “number”
test, I can’t find the reason.local numberButtonsArray = {
--{centerX, centerY + 20, 1},
{label = "1", action = 1, key = "1", backgroundColor = colors.numpadBackground, labelColor = colors.numpadLabel},
{label = "2", action = 2, key = "1", backgroundColor = colors.numpadBackground, labelColor = colors.numpadLabel},
{label = "3", action = 3, key = "1", backgroundColor = colors.numpadBackground, labelColor = colors.numpadLabel},
{label = "4", action = 4, key = "1", backgroundColor = colors.numpadBackground, labelColor = colors.numpadLabel},
{label = "5", action = 5, key = "1", backgroundColor = colors.numpadBackground, labelColor = colors.numpadLabel},
{label = "6", action = 6, key = "1", backgroundColor = colors.numpadBackground, labelColor = colors.numpadLabel},
{label = "7", action = 7, key = "1", backgroundColor = colors.numpadBackground, labelColor = colors.numpadLabel},
{label = "8", action = 8, key = "1", backgroundColor = colors.numpadBackground, labelColor = colors.numpadLabel},
{label = "9", action = 9, key = "1", backgroundColor = colors.numpadBackground, labelColor = colors.numpadLabel},
{label = "0", action = 0, key = "1", backgroundColor = colors.numpadBackground, labelColor = colors.numpadLabel},
{label = "+/-", action = "sign", key = "sign", backgroundColor = colors.numpadBackground, labelColor = colors.numpadLabel},
--{label = "-", action = 1, key = "1", backgroundColor = colors.numpadBackground, labelColor = colors.numpadLabel},
{label = "backspace", action = 1, key = "1", backgroundColor = colors.numpadBackground, labelColor = colors.numpadLabel},
}
local action = self.actoin
local phase = self.phase
--print (phase)
if ("ended" == phase) then
print ("number button test has been preseed")
if type(action) == "number" then
print ("number action test passed")
if displayStr and displayStr: len () < maxLength then
displayStr = displayStr .. action
--display the number
calcScreen: setLable (displayStr)
end
end
end
end
-- set w = buttonWidth and h = buttonHeight
local w, h = buttonWidth, buttonHeight
-- set data = numberButtonArray when useing it in a for loop will replace the index by i
local data = numberButtonsArray[1]
-- when placing the button will use this
local position = 0
--create the test number button
local testButton = newButton(data.label, w, h, data.backgroundColor, data.labelColor)
testButton: addEventListener("touch", buttonTouch)
sceneGroup: insert(testButton)
testButton.x = centerX- 25
testButton.y = centerY+ 25
testButton.action = data.action
return testButton.action
local widget = require( "widget" )
-- Image sheet options and declaration
-- For testing, you can copy/save the image under "Visual Customization" above
local options = {
frams = {
{
x = 5,
y = 5,
width = 200,
height = 18,
},
{
x = 5,
y = 40,
width = 200,
height = 18,
},
},
sheetContentWidth = 384,
sheetContentHeight = 64
}
local progressSheet = graphics.newImageSheet( "100.png", options )
-- Create the widget
local progressView = widget.newProgressView(
{
sheet = progressSheet,
fillOuterLeftFrame = 1,
fillOuterMiddleFrame = 1,
fillOuterRightFrame = 1,
fillOuterWidth = 200,
fillOuterHeight = 18,
fillInnerLeftFrame = 2,
fillInnerMiddleFrame = 2,
fillInnerRightFrame = 2,
fillWidth = 220,
fillHeight = 64,
width = 200,
isAnimated = true
}
)
-- Set the progress to 50%
progressView:setProgress( 0.5 )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.