Git Product home page Git Product logo

morningtea's Introduction

MorningTea

My DTS prototype

Issues templet

Description of issue

Console errors

Steps to reproduce

Related Configuration Files

Create a Gist (https://gist.github.com/) for each configuration file related to this issue

Feedback :

learning .lua , java and python

morningtea's People

Contributors

joshuachz avatar

Watchers

James Cloos avatar

morningtea's Issues

Action test can't pass

Description of issue

  • The number button. action can't pass the test
    The test button can’t pass the if type(action) == “number” test, I can’t find the reason.
    Code:
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

Console errors

  • nil

Steps to reproduce

Related Configuration Files

Comparing bar can't display

Description of issue

  • Can't display the comparing bar

Console errors

image

Steps to reproduce

Related Configuration Files

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 )

100.png
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.