Search found 235 matches

by ZombieKnight
Yesterday, 5:43 pm
Forum: Lua Labs
Topic: Gui2 dialog formatting
Replies: 14
Views: 321

Re: Gui2 dialog formatting

Code showing two images for comparison of the grid and canvas Lua: -- to make code shorter local wml_actions = wesnoth.wml_actions -- starting values local font_size_title = 70000 local font_size_message = 70000 local font_family_title = "Oldania ADF Std" local font_family_message = "...
by ZombieKnight
May 13th, 2024, 2:23 pm
Forum: Lua Labs
Topic: Gui2 dialog formatting
Replies: 14
Views: 321

Re: Gui2 dialog formatting

Okay, maybe I don't but it took me so much time to ad it there...
Ok I'll remove it.
Thanks for help Ravana and white uncle ^^ <3
by ZombieKnight
May 13th, 2024, 1:14 pm
Forum: Lua Labs
Topic: Gui2 dialog formatting
Replies: 14
Views: 321

Re: Gui2 dialog formatting

I need it there.
by ZombieKnight
May 13th, 2024, 10:53 am
Forum: Lua Labs
Topic: Gui2 dialog formatting
Replies: 14
Views: 321

Re: Gui2 dialog formatting

Great, works
Thanks ^^
Now any idea how to remove that cancel button (one due to the text input window)
Screenshot_20240513_123535.png
by ZombieKnight
May 12th, 2024, 7:26 pm
Forum: Lua Labs
Topic: Gui2 dialog formatting
Replies: 14
Views: 321

Re: Gui2 dialog formatting

white_haired_uncle wrote: May 12th, 2024, 6:07 pm I think it is at the very bottom, but it has a border:

Code: Select all

border = "all",
border_size = 5,
Try border = "left,right,top" ?
No, didn't worked (I've tried to set them all to 0 (default value))
Any other idea?
by ZombieKnight
May 12th, 2024, 5:40 pm
Forum: Lua Labs
Topic: Gui2 dialog formatting
Replies: 14
Views: 321

Re: Gui2 dialog formatting

About that box... idk it's just for skiping messages and I don't really care where it is.
by ZombieKnight
May 12th, 2024, 5:40 pm
Forum: Lua Labs
Topic: Gui2 dialog formatting
Replies: 14
Views: 321

Re: Gui2 dialog formatting

Well, I'm terrible with lining things up, but it looks like this column is right justified: T.column { -- SHOULD HORIZONTAL_ALIGNMENT = "CENTER" GO HERE??? vertical_alignment="bottom", T.stacked_widget{ id = "narration_stacked_widget", So, while it looks like you've ce...
by ZombieKnight
May 12th, 2024, 4:06 pm
Forum: Lua Labs
Topic: Gui2 dialog formatting
Replies: 14
Views: 321

Re: Gui2 dialog formatting

I'm sorry I'm pinging you, Vultraz, but you're quite hard to contact and I'm not sure if you check Lua Labs
If that disturbs you, tell me and I won't repeat that ^^
(I've been told you know gui2 a lot)
vultraz wrote:
by ZombieKnight
May 12th, 2024, 3:56 pm
Forum: Lua Labs
Topic: Gui2 dialog formatting
Replies: 14
Views: 321

Gui2 dialog formatting

Hi Could someone help me with my dialog? Screenshot_20240512_171736.png -- to make code shorter local wml_actions = wesnoth.wml_actions -- starting values local font_size_title = 70000 local font_size_message = 70000 local font_family_title = "Oldania ADF Std" local font_family_message = &...
by ZombieKnight
May 12th, 2024, 12:22 pm
Forum: Lua Labs
Topic: [resolution], [foreground], [draw], [image]
Replies: 0
Views: 68

[resolution], [foreground], [draw], [image]

Hi I'm missing documentation to this core code. Any idea how [background], [foreground] and {[draw]+[image]} works? [resolution] [background] [draw] [/draw] [/background] [foreground] [draw] [image] x = "(width - {__GUI_IMAGE_DISPLAYED_WIDTH})" y = "(height - image_height)" w = &...
by ZombieKnight
May 12th, 2024, 10:58 am
Forum: Lua Labs
Topic: Core [message] image height and width macros
Replies: 9
Views: 222

Re: Core [message] image height and width macros

yes, it's meant to use that in image...
What do you mean?
How to set image_original_width ... then?
by ZombieKnight
May 12th, 2024, 10:06 am
Forum: Lua Labs
Topic: Core [message] image height and width macros
Replies: 9
Views: 222

Re: Core [message] image height and width macros

Ravana wrote: May 12th, 2024, 9:35 am Now that you have wml you can use wml.parse

Code: Select all

local image_original_width = ...
local image_original_height = ...
local portrait_mirror = ...
local portrait_image = ...
local x = wml.parse(...that code here )
...
...
T.foreground {
	T.draw {
		T.image {x}
		}
	}
Like so?
by ZombieKnight
May 12th, 2024, 9:19 am
Forum: Lua Labs
Topic: Core [message] image height and width macros
Replies: 9
Views: 222

Re: Core [message] image height and width macros

Jup, you were right (tho it took me a while to figure out what it does) Now I have this: h="( if((image_original_width < 300) and (image_original_height < 300), image_original_height, ((image_original_height * calculated_width) / 500) ) where calculated_width = (( max(250, min(500, best_size)) ...
by ZombieKnight
May 12th, 2024, 4:46 am
Forum: Lua Labs
Topic: Core [message] image height and width macros
Replies: 9
Views: 222

Re: Core [message] image height and width macros

Ravana wrote: May 11th, 2024, 9:16 pm First get rid of macros, run preprocessor on them.
What do you mean with run preprocesor""?
by ZombieKnight
May 11th, 2024, 4:15 pm
Forum: Lua Labs
Topic: Core [message] image height and width macros
Replies: 9
Views: 222

Core [message] image height and width macros

Hi https://github.com/wesnoth/wesnoth/blob/add5abc62838a7065723e3d2e34da9749f5c3ae0/data/gui/window/wml_message.cfg#L8 (from line 8 all the way to line 131) Do you have an idea how that image size editing macro works(what it does, looks like an absolute mess to me)? When I have an image how to get i...