Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var loginInput = true;
- onEvent("registerButton", "click", function(event) {
- setScreen("registerScreen");
- });
- onEvent("loginButton", "click", function(event2) {
- setScreen("homeScreen");
- });
- //if (getKeyValue(textInput("TextLogin", "asdasda"))) {
- // loginInput === true;
- //} else {
- // loginInput === false;
- //}
- /*
- //if (loginInput === true ) {
- onEvent("createAccount", "click", function(event3) {
- setScreen("homeScreen");
- });
- } else {
- onEvent("createAccount", "click", function(event) {
- setScreen("homeScreen");
- });
- }
- //textInput("loginButton", "text");
- onEvent("loginButton", "click", function(event2) {
- setScreen("notification");
- */
- onEvent("createAccount", "click", function(event3) {
- createRecord("LoginInformation", {username:(getText("inputUsername")), password:(getText("inputPassword")), email:(getText("inputEmail"))}, function(record) {
- });
- });
- onEvent("loginButton", "click", function(event4) {
- readRecords("LoginInformation", {}, function(records2) {
- for (var i =0; i < records.length; i++) {
- if ((getText("TextLogin") == (records[i]).username) && (getText("password") == (records[i]).password)) {
- setScreen("homeScreen");
- }
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement