{"action":"created","issue":{"url":"https://api.github.com/repos/marekburiak/ILI9341_due/issues/5","labels_url":"https://api.github.com/repos/marekburiak/ILI9341_due/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/marekburiak/ILI9341_due/issues/5/comments","events_url":"https://api.github.com/repos/marekburiak/ILI9341_due/issues/5/events","html_url":"https://github.com/marekburiak/ILI9341_due/issues/5","id":108968743,"number":5,"title":"high-level API functions for a touch button lib?","user":{"login":"VogonJeltz","id":11213519,"avatar_url":"https://avatars.githubusercontent.com/u/11213519?v=3","gravatar_id":"","url":"https://api.github.com/users/VogonJeltz","html_url":"https://github.com/VogonJeltz","followers_url":"https://api.github.com/users/VogonJeltz/followers","following_url":"https://api.github.com/users/VogonJeltz/following{/other_user}","gists_url":"https://api.github.com/users/VogonJeltz/gists{/gist_id}","starred_url":"https://api.github.com/users/VogonJeltz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VogonJeltz/subscriptions","organizations_url":"https://api.github.com/users/VogonJeltz/orgs","repos_url":"https://api.github.com/users/VogonJeltz/repos","events_url":"https://api.github.com/users/VogonJeltz/events{/privacy}","received_events_url":"https://api.github.com/users/VogonJeltz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-09-29T22:00:05Z","updated_at":"2015-09-30T09:58:39Z","closed_at":null,"body":"hi,\r\nin a discusion in the forum \r\nhttps://forum.arduino.cc/index.php?topic=350006.msg2416951#msg2416951\r\na user (ghlawrence2000)  lead me to this UTFT code:\r\n~~~\r\nvoid loop()\r\n{\r\n  int but1, but2, but3, but4, butX, butY, pressed_button;\r\n  boolean default_colors = true;\r\n \r\n  but1 = myButtons.addButton( 10,  20, 300,  30, \"Button 1\");\r\n  but2 = myButtons.addButton( 10,  60, 300,  30, \"Button 2\");\r\n  but3 = myButtons.addButton( 10, 100, 300,  30, \"Button 3\");\r\n  but4 = myButtons.addButton( 10, 140, 300,  30, \"Button 4\", BUTTON_DISABLED);\r\n  butX = myButtons.addButton(279, 199,  40,  40, \"a\", BUTTON_SYMBOL);\r\n  butY = myButtons.addButton(  0, 199, 100,  40, \"I\", BUTTON_SYMBOL | BUTTON_SYMBOL_REP_3X);\r\n  myButtons.drawButtons();\r\n\r\n \r\n  while(1)\r\n  {\r\n    if (myTouch.dataAvailable() == true)\r\n    {\r\n      pressed_button = myButtons.checkButtons();\r\n\r\n      if (pressed_button==butX)\r\n      {\r\n        if (myButtons.buttonEnabled(but4))\r\n          myButtons.disableButton(but4, true);\r\n        else\r\n          myButtons.enableButton(but4, true);\r\n      }\r\n      else if (pressed_button==butY)\r\n      {\r\n        if (default_colors)\r\n        {\r\n          myButtons.setButtonColors(VGA_YELLOW, VGA_RED, VGA_YELLOW, VGA_BLUE, VGA_GRAY);\r\n          myButtons.relabelButton(butY, \"_\");\r\n          myButtons.drawButtons();\r\n          default_colors=false;\r\n        }\r\n        else\r\n        {\r\n          myButtons.setButtonColors(VGA_WHITE, VGA_GRAY, VGA_WHITE, VGA_RED, VGA_BLUE);\r\n          myButtons.relabelButton(butY, \"I\");\r\n          myButtons.drawButtons();\r\n          default_colors=true;\r\n        }\r\n      }\r\n      if (pressed_button==but1)\r\n        // do stuff for but1\r\n      if (pressed_button==but2)\r\n        // do stuff for but2\r\n      if (pressed_button==but3)\r\n        // do stuff for but3\r\n      if (pressed_button==but4)\r\n        // do stuff for but4\r\n      if (pressed_button==-1)\r\n        // do stuff for nothing pressed\r\n    }\r\n  }\r\n}\r\n~~~\r\nmoreover, he pointed out that you already included UTFT libs into yourr code .\r\nSo would it be possible to have those UTFT funtions, e.g.\r\n~~~\r\nmyButtons.addButton\r\nmyButtons.setButtonColors\r\nmyButtons.drawButtons();\r\nif (pressed_button==but1)\r\n~~~\r\nwith your ILI9341_due lib as well?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/marekburiak/ILI9341_due/issues/comments/144344213","html_url":"https://github.com/marekburiak/ILI9341_due/issues/5#issuecomment-144344213","issue_url":"https://api.github.com/repos/marekburiak/ILI9341_due/issues/5","id":144344213,"user":{"login":"marekburiak","id":1153307,"avatar_url":"https://avatars.githubusercontent.com/u/1153307?v=3","gravatar_id":"","url":"https://api.github.com/users/marekburiak","html_url":"https://github.com/marekburiak","followers_url":"https://api.github.com/users/marekburiak/followers","following_url":"https://api.github.com/users/marekburiak/following{/other_user}","gists_url":"https://api.github.com/users/marekburiak/gists{/gist_id}","starred_url":"https://api.github.com/users/marekburiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marekburiak/subscriptions","organizations_url":"https://api.github.com/users/marekburiak/orgs","repos_url":"https://api.github.com/users/marekburiak/repos","events_url":"https://api.github.com/users/marekburiak/events{/privacy}","received_events_url":"https://api.github.com/users/marekburiak/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T09:58:39Z","updated_at":"2015-09-30T09:58:39Z","body":"I think most of the individuals that cook their own soup are doing it so it tastes the best for them and they cook it in a way they think it's the best. Compatibility with other soups is not so important unless one of your goals is a wide-spread adoption of your recipe for various reasons. That was certainly not my goal. The good thing about different soups is that you get different flavors and you learn different ways of cooking it. That will ultimately help you to cook your own soup with a flavor you like the best and in a way you think it's the best. The thing is that most of the soup eaters just want a restaurant."}}