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

Add variadic arguments #73

Open
armoha opened this issue Oct 13, 2021 · 0 comments
Open

Add variadic arguments #73

armoha opened this issue Oct 13, 2021 · 0 comments

Comments

@armoha
Copy link
Contributor

armoha commented Oct 13, 2021

settbl, StringBuffer.print, eprintln are functions with variadic arguments but there's no ergonomic way to use them in classic view. Lua function is not intuitive; it has no difference between writing code manually and not beginner friendly.

Better interface proposal:

  • settbl
    Replace [StatTxtTbl] from start position [Offset] with new text: [Add more..]
    (encoding: [CP949]) <- optional with default value

Stepwise example to write settbl("Marshal (Rank)", 0, PColor(p), "测试", encoding="utf-8");

  1. settbl
    Replace ["Marshal (Rank)"] from start position [0] with new text: [Add more..]
    (encoding: [UTF-8])
  2. settbl
    Replace ["Marshal (Rank)"] from start position [0] with new text: [PColor(p)] [Add more..]
    (encoding: [UTF-8])
  3. settbl
    Replace ["Marshal (Rank)"] from start position [0] with new text: [PColor(p)] ["测试"] [Add more..]
    (encoding: [UTF-8])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant