{"id":13690101,"url":"https://github.com/OnfireNetwork/dialogui","last_synced_at":"2025-05-02T06:31:45.894Z","repository":{"id":130984848,"uuid":"217364449","full_name":"OnfireNetwork/dialogui","owner":"OnfireNetwork","description":"A very simple ui system for basic dialogs in Onset","archived":false,"fork":false,"pushed_at":"2021-01-10T16:08:20.000Z","size":513,"stargazers_count":18,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-12T15:43:18.989Z","etag":null,"topics":["gui","html","library","lua","onset","ui"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OnfireNetwork.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":"2019-10-24T18:14:09.000Z","updated_at":"2021-05-24T00:23:45.000Z","dependencies_parsed_at":"2023-04-11T21:27:24.435Z","dependency_job_id":null,"html_url":"https://github.com/OnfireNetwork/dialogui","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/OnfireNetwork%2Fdialogui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnfireNetwork%2Fdialogui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnfireNetwork%2Fdialogui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnfireNetwork%2Fdialogui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OnfireNetwork","download_url":"https://codeload.github.com/OnfireNetwork/dialogui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251998596,"owners_count":21678005,"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":["gui","html","library","lua","onset","ui"],"created_at":"2024-08-02T16:00:43.654Z","updated_at":"2025-05-02T06:31:45.884Z","avatar_url":"https://github.com/OnfireNetwork.png","language":"Lua","readme":"# DialogUI\nA very simple ui system for basic dialogs in Onset\n\n## Example\n*!!! Make sure to put dialogui before your gamemode in server_config.json or it won't work !!!*\n```lua\nlocal Dialog = ImportPackage(\"dialogui\")\n\nlocal test = Dialog.create(\"New Character\", \"Choose your character information\", \"Create\", \"Cancel\")\nDialog.addTextInput(test, 1, \"First Name:\")\nDialog.addTextInput(test, 1, \"Last Name:\")\nDialog.addSelect(test, 1, \"Gender:\", 1, \"Male\", \"Female\", \"Apache Helicopter\")\n\nDialog.show(test)\n\nAddEvent(\"OnDialogSubmit\", function(dialog, button, firstName, lastName, gender)\n  if dialog ~= test then\n    return\n  end\n  if button == 1 then\n    AddPlayerChat(\"Character created:\")\n    AddPlayerChat(\"First Name = \"..firstName)\n    AddPlayerChat(\"Last Name = \"..lastName)\n    AddPlayerChat(\"Gender = \"..gender)\n  else\n    AddPlayerChat(\"Cancelled character creation!\")\n  end\nend)\n```\n![image](/screenshots/character-menu.png)\n\n## Available functions\n```lua\ncreate(title, text, ...buttons)\nsetButtons(dialog, column, ...buttons)\naddTextInput(dialog, column, label)\naddSelect(dialog, column, label, size, ...options)\nsetSelectOptions(dialog, column, input, ...options)\nsetSelectLabeledOptions(dialog, column, input, options)\naddCheckbox(dialog, column, label)\nsetVariable(dialog, name, value)\nsetAutoclose(dialog, autoclose)\nshow(dialog)\nclose()\ndestroy(dialog)\ngetCurrent()\nisVisible()\nsetDialogTheme(dialog, theme)\nsetGlobalTheme(theme)\n```\n\n## Variables\nIn some strings you may use variables to dynamically change parts of the text of certain dialogs. This may also be used to dynamically hide or display buttons because buttons with a length of 0 aren't displayed. The syntax for variables is `{some_variable}`\n\n## Themes\nThere are multiple themes and you can create your own ones.\n- default-dark\n- saitama\n- flat\n\nTo set the global theme:\n```lua\nDialog.setGlobalTheme(\"flat\")\n```\nTo set a theme for just one dialog\n```lua\nDialog.setDialogTheme(dialog, \"flat\")\n```\n","funding_links":[],"categories":["Packages and Plugins"],"sub_categories":["Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOnfireNetwork%2Fdialogui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOnfireNetwork%2Fdialogui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOnfireNetwork%2Fdialogui/lists"}