26 Mar 2023 |
albertfree | simplest is either a template file, or an array describing the lines to write | 18:46:28 |
albertfree | we don't have a map in the main menu perhaps? | 19:54:59 |
albertfree | or a world, for that matter? | 19:55:15 |
albertfree | can you always grab english text even if using another language? | 20:15:11 |
albertfree | (pondering if we can borrow the text for saving explanation in the file) | 20:15:56 |
albertfree | https://dpaste.com/6FXEA88VR save is pretty trivial, what bothers me is the amount of lines that you get | 20:18:15 |
albertfree | I already have the "entry" names elsewhere, so "MinSalary" resp "SalaryAdd" should be enough to act as a filter for settings to save | 20:19:22 |
albertfree | enough today, good night | 20:20:43 |
27 Mar 2023 |
Lewri | Albert do you know if the C++ function l_font_draw_wrapped can handle a table? https://github.com/CorsixTH/CorsixTH/blob/d8d05f46e5673d6b903947cf50d390a188cf8519/CorsixTH/Src/th_lua_gfx.cpp#L368 | 17:50:04 |
thecycoone | what do you mean Lewri ? | 17:51:49 |
Lewri | Likely your dpaste is fine, though iirc config_finder also does this line by line writing, though iirc you weren't keen on its methods | 17:52:09 |
thecycoone | it doesn't accept a lua table if that's what you mean | 17:53:05 |
Lewri | I'm just looking back at how ..font:sizeOf (C++) can't handle a table. I was wondering if the main drawWrapped function was the same | 17:53:13 |
Lewri | *a table of strings | 17:53:26 |
thecycoone | it can't no | 17:54:53 |
Lewri | It'd be beneficial to probably push multiple strings to wrapped dialogs. Though UIInformation gets around it by determining the size of each line. UIConfirmDialog doesn't do this | 17:54:59 |
thecycoone | what would you expect, concatenated, new line separated, ... | 17:56:04 |
Lewri | UIInformation inserts each line of a string from a table underneath each one with a line break. UIConfirm just through the whole 'text' at it and hopes you only put in one line. | 17:56:55 |
Lewri | * UIInformation inserts each line of a string from a table underneath each one with a line break. UIConfirm just throws the whole 'text' at it and hopes you only put in one line. | 17:57:06 |
thecycoone | seems like that is better handled on the lua side, by making the full output before asking for the size | 17:57:45 |
Lewri | Easiest demon is just changing the code of UIConfirm to accept a table of strings and handle it inside the lua. Not sure if that's good practice though | 17:57:53 |
Lewri | Yeah, the C++ function gives you the size of one string from your table at a time. That's fine. You just have to add up all your values at the end | 17:58:51 |
thecycoone | kinda - accounting for your line space | 17:59:28 |
Lewri | Yeah, you have to give it the line space pixels | 17:59:46 |
Lewri | I'll add it to my todos. | 18:00:42 |
Lewri | Oh | 18:03:21 |
Lewri | you can always do text = _S.foo .. "//" .. _S.bar and that makes it one string | 18:03:51 |
thecycoone | Yeah, either of the above - whatever is appropriate for the scenario | 18:04:43 |
28 Mar 2023 |
| 【☆Lløyd LeJack☆】 changed their display name from 【☆Lløyd LeJack☆】 to ☆Lløyd LeJack☆#2319. | 03:00:25 |
| 【☆Lløyd LeJack☆】 changed their display name from ☆Lløyd LeJack☆#2319 to 【☆Lløyd LeJack☆】. | 03:00:27 |