Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ui")
- pinScreen = class.class(ui.screen, function(self, monitor)
- ui.screen.init(self, monitor)
- self.buttons = {}
- self.buttons[0] = {"0", 2,15}
- self.buttons[1] = {"1", 2,11}
- self.buttons[2] = {"2", 9,11}
- self.buttons[3] = {"3",16,11}
- self.buttons[4] = {"4", 2, 7}
- self.buttons[5] = {"5", 9, 7}
- self.buttons[6] = {"6",16, 7}
- self.buttons[7] = {"7", 2, 3}
- self.buttons[8] = {"8", 9, 3}
- self.buttons[9] = {"9",16, 3}
- self.pin = ""
- self.pinDisplayText = "----"
- for i, v in pairs(self.buttons) do
- local button = ui.button(v[1], self:pinClickEvent, i)
- button:setPos(v[2], v[3]):setSize(5, 3)
- self:addControl(button)
- end
- end)
- function pinScreen:pinClickEvent(button)
- print(button.tag)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement