{"id":16963561,"url":"https://github.com/coderobe/nestley","last_synced_at":"2025-03-21T16:26:28.214Z","repository":{"id":94540220,"uuid":"159990113","full_name":"coderobe/nestley","owner":"coderobe","description":"NES-style UI lib for crixel","archived":false,"fork":false,"pushed_at":"2018-12-14T23:41:01.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T11:44:25.664Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderobe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-01T21:46:12.000Z","updated_at":"2019-04-14T10:41:36.000Z","dependencies_parsed_at":"2023-03-13T16:59:06.438Z","dependency_job_id":null,"html_url":"https://github.com/coderobe/nestley","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderobe%2Fnestley","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderobe%2Fnestley/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderobe%2Fnestley/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderobe%2Fnestley/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderobe","download_url":"https://codeload.github.com/coderobe/nestley/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244827808,"owners_count":20517005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T23:25:16.666Z","updated_at":"2025-03-21T16:26:28.191Z","avatar_url":"https://github.com/coderobe.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NEStley\n\nNES-style UI library for crixel inspired by https://github.com/BcRikko/NES.css\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n```yaml\ndependencies:\n  NEStley:\n    github: fliegermarzipan/nestley\n```\n2. Run `shards install`\n\n## Current Status\n\n![Preview](preview.png)\n\n## Usage\n\n```crystal\nrequire \"NEStley\"\nrequire \"crixel\"\nrequire \"fontanyl\"\n\nwidth = 400_u32\nheight = 300_u32\n\nimg = Crixel::SixelImage.new(width, height)\nfont = Fontanyl::BDF.new(\"font.bdf\")\n\nentities = [] of NEStley::Entity\n\n# Create a container for our elements (optional)\ncont = NEStley::BorderedOpaqueContainer.new(400_u32, 300_u32, 0, 0, NEStley::Color::LIGHT.value, NEStley::Color::DARK.value)\nentities \u003c\u003c cont\n\n# Add a button or two\ncont \u003c\u003c NEStley::Button.new(130_u32, 60_u32, 30, 200, NEStley::Color::SUCCESS.value)\ncont \u003c\u003c NEStley::Button.new(130_u32, 60_u32, 240, 200, NEStley::Color::ERROR.value)\n\n# Add some text\ncont \u003c\u003c NEStley::Textbox.new(340_u32, 150_u32, 30, 30, NEStley::Color::DARK.value)\n  .set_font(font).set_msg(\"Hello, World!\")\n\nheight.times do |y|\n  width.times do |x|\n    drawn = false\n    entities.reverse_each do |entity|\n      if entity.needs_redraw? \u0026\u0026 entity.wants_coord?(x, y)\n        img.set(x, y, entity.color_at(x, y))\n        drawn = true\n        break\n      end\n    end\n    img.set(x, y, 0xffffff_u32) unless drawn\n  end\nend\nentities.each do |entity|\n  entity.drawn!\nend\n\nimg.render_naive_full\n```\n\n## Development\n\nTODO: Write development instructions here\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/fliegermarzipan/nestley/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Robin Broda](https://github.com/coderobe) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderobe%2Fnestley","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderobe%2Fnestley","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderobe%2Fnestley/lists"}