Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Syntax html in lua [ label: setText("<br> <img><b> <i>") ] #929

Open
2 of 5 tasks
kojimhojo opened this issue Oct 15, 2024 · 0 comments
Open
2 of 5 tasks
Labels
Status: Pending Test This PR or Issue requires more testing

Comments

@kojimhojo
Copy link

kojimhojo commented Oct 15, 2024

Priority

Missing Content

Area

  • Data
  • Source
  • Docker
  • Other

What is missing?

store:

OTC
image

Cipsoft
image

Modal

OTC
image
Cipsoft
image

local talk = TalkAction("!modal")

function talk.onSay(player, words, param)
    local imageUrl = "https://img.freepik.com/premium-vector/qr-code-vector-icon_389832-989.jpg?w=360"
    local imageHtml = "<img src='" .. imageUrl .. "' width='210' height='210'>"
    local message = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500.<br><br>" .. imageHtml .. "<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>"

    local menu = ModalWindow{
        title = "Lorem Ipsum",
        message = message
    }

    menu:addButton("Close")
    menu:sendToPlayer(player)
    return false
end

talk:separator(" ")
talk:groupType("normal")
talk:register()

Code of Conduct

  • I agree to follow this project's Code of Conduct
@github-actions github-actions bot added the Status: Pending Test This PR or Issue requires more testing label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Test This PR or Issue requires more testing
Projects
None yet
Development

No branches or pull requests

1 participant