{"id":13896515,"url":"https://github.com/andsve/dirtylarry","last_synced_at":"2025-05-05T21:44:33.079Z","repository":{"id":136712949,"uuid":"63240761","full_name":"andsve/dirtylarry","owner":"andsve","description":"A quick and dirty GUI library for Defold.","archived":false,"fork":false,"pushed_at":"2020-05-04T12:30:10.000Z","size":332,"stargazers_count":71,"open_issues_count":4,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-02T20:57:51.686Z","etag":null,"topics":["defold","defold-library"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andsve.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-07-13T11:33:12.000Z","updated_at":"2025-03-26T21:32:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"21554888-6d3f-4d5f-8781-8cf277ffa3a4","html_url":"https://github.com/andsve/dirtylarry","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/andsve%2Fdirtylarry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andsve%2Fdirtylarry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andsve%2Fdirtylarry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andsve%2Fdirtylarry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andsve","download_url":"https://codeload.github.com/andsve/dirtylarry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252582245,"owners_count":21771634,"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":["defold","defold-library"],"created_at":"2024-08-06T18:02:58.677Z","updated_at":"2025-05-05T21:44:33.062Z","avatar_url":"https://github.com/andsve.png","language":"Lua","funding_links":[],"categories":["Lua","Libraries"],"sub_categories":["Programming Language"],"readme":"![dirtylarry logo](doc/dirtylarry.png)\n\n# dirtylarry\nA quick and dirty GUI library for [Defold](https://www.defold.com/).\n\n# Usage\n1. Add latest zip URL as a [dependency](http://www.defold.com/manuals/libraries/#_setting_up_library_dependencies) in your Defold project: `https://github.com/andsve/dirtylarry/archive/master.zip`\n\n2. Add one of the supplied GUI template files, located in `dirtylarry/*.gui`, to your GUI scene.\n\n3. In your GUI script, add `local dirtylarry = require \"dirtylarry/dirtylarry\"` to the top and make sure the script has [acquired input focus](http://www.defold.com/manuals/input/#_acquiring_and_releasing_input_focus).\n\n4. Then add the corresponding function inside your `on_input`:\n    * `dirtylarry/input.gui`:\n    ```Lua\n    dirtylarry:input(\"node_id\", action_id, action, gui.KEYBOARD_TYPE_DEFAULT, \"Default text\")\n    ```\n    * `dirtylarry/button.gui`:\n    ```Lua\n    dirtylarry:button(\"node_id\", action_id, action, function ()\n        print(\"button was pressed\")\n    end)\n    ```\n    * `dirtylarry/checkbox*.gui`:\n    ```Lua\n    self.checkbox_value = dirtylarry:checkbox(\"node_id\", action_id, action, self.checkbox_value)\n    ```\n    * `dirtylarry/radio*.gui`:\n    ```Lua\n    self.radio_value = dirtylarry:radio(\"node_a_id\", action_id, action, \"a\", self.radio_value)\n    self.radio_value = dirtylarry:radio(\"node_b_id\", action_id, action, \"b\", self.radio_value)\n    ```\n    * `dirtylarry/slider.gui`\n    ```Lua\n    self.slider_value = dirtylarry:slider(\"slider\", action_id, action, -1.0, 1.0, self.slider_value)\n    ```\n\n5. In the `input/game.input_binding`, add the following triggers:\n   * *Key Triggers*: Input: `key-backspace`, Action: `backspace`\n   * *Mouse Triggers*: Input: `mouse-button-1`, Action: `touch`\n   * *Text Triggers*: Input: `text`, Action: `text`\n   * *Text Triggers*: Input: `marked-text`, Action: `marked_text`\n\nFor more usage examples take a look at [main/examples.gui_script](main/examples.gui_script) and [dirtylarry/dirtylarry.lua](dirtylarry/dirtylarry.lua) for configurational options.\n\n## Examples\n* Using the built in font:\n![Example project with Defold default font](doc/example_vera_font.png)\n* Using [Input](http://input.fontbureau.com/) font:\n![Example project with Input font](doc/example_input_font.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandsve%2Fdirtylarry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandsve%2Fdirtylarry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandsve%2Fdirtylarry/lists"}