{"action":"created","issue":{"url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/254","labels_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/254/labels{/name}","comments_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/254/comments","events_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/254/events","html_url":"https://github.com/PistonDevelopers/conrod/issues/254","id":55179496,"number":254,"title":"Started new design - label example","user":{"login":"bvssvni","id":1743862,"avatar_url":"https://avatars.githubusercontent.com/u/1743862?v=3","gravatar_id":"","url":"https://api.github.com/users/bvssvni","html_url":"https://github.com/bvssvni","followers_url":"https://api.github.com/users/bvssvni/followers","following_url":"https://api.github.com/users/bvssvni/following{/other_user}","gists_url":"https://api.github.com/users/bvssvni/gists{/gist_id}","starred_url":"https://api.github.com/users/bvssvni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvssvni/subscriptions","organizations_url":"https://api.github.com/users/bvssvni/orgs","repos_url":"https://api.github.com/users/bvssvni/repos","events_url":"https://api.github.com/users/bvssvni/events{/privacy}","received_events_url":"https://api.github.com/users/bvssvni/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PistonDevelopers/conrod/labels/Discussion","name":"Discussion","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-01-22T17:04:11Z","updated_at":"2015-01-30T10:22:01Z","closed_at":"2015-01-30T10:22:01Z","body":"I created a branch \"newdesign\" because I figured out it will be easier to make it back-end agnostic by redesigning it first. The new design uses the \"quack\" library.\r\n\r\n```Rust\r\n    // Current design\r\n    uic.label(\"Widget Demonstration\")\r\n        .position(demo.title_padding, 30.0)\r\n        .size(48u32)\r\n        .color(demo.bg_color.plain_contrast())\r\n        .draw(gl);\r\n\r\n    // New design\r\n    Label::new(\"Widget Demonstration\")\r\n        .set(Position([demo.title_padding, 30.0]))\r\n        .set(FontSize(48u32))\r\n        .set(demo.bg_color.plain_contrast())\r\n        .draw(uic, gl);\r\n```\r\n\r\nNotice that `UiContext` is moved to the `draw` method. This makes it easier to maintain the code because the generic parameters of `UiContext` doesn't have to be tracked through the entire API."},"comment":{"url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/comments/72180974","html_url":"https://github.com/PistonDevelopers/conrod/issues/254#issuecomment-72180974","issue_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/254","id":72180974,"user":{"login":"bvssvni","id":1743862,"avatar_url":"https://avatars.githubusercontent.com/u/1743862?v=3","gravatar_id":"","url":"https://api.github.com/users/bvssvni","html_url":"https://github.com/bvssvni","followers_url":"https://api.github.com/users/bvssvni/followers","following_url":"https://api.github.com/users/bvssvni/following{/other_user}","gists_url":"https://api.github.com/users/bvssvni/gists{/gist_id}","starred_url":"https://api.github.com/users/bvssvni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvssvni/subscriptions","organizations_url":"https://api.github.com/users/bvssvni/orgs","repos_url":"https://api.github.com/users/bvssvni/repos","events_url":"https://api.github.com/users/bvssvni/events{/privacy}","received_events_url":"https://api.github.com/users/bvssvni/received_events","type":"User","site_admin":false},"created_at":"2015-01-30T10:22:01Z","updated_at":"2015-01-30T10:22:01Z","body":"I'll close this since we'll use both quack and traits for now."}}