[SOLVED] Icons/Images in the Middle of Messages/etc?
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
[SOLVED] Icons/Images in the Middle of Messages/etc?
Hello.
I'm rewriting some codes of my eras to make them play better. Now I'm looking a way to use images more freely in the [message] or [option] tags.
As far as I know, {MENU_IMG_TXT (icon) (text)} allows to put one icon (usually a unit's sprite) at the beginning of the message (often inside [option] tag), and it would be shown as "[icon] text". I want to show multiple icons in one line, like "[icon1] [icon2] [icon3] text" or even "[icon1] text [icon2] [icon3]" if possible. Coding like {MENU_IMG_TXT (icon1) {MENU_IMG_TXT (icon2) (text)}} doesn't seem to work.
Is there any possible way to use images more freely?
I'm rewriting some codes of my eras to make them play better. Now I'm looking a way to use images more freely in the [message] or [option] tags.
As far as I know, {MENU_IMG_TXT (icon) (text)} allows to put one icon (usually a unit's sprite) at the beginning of the message (often inside [option] tag), and it would be shown as "[icon] text". I want to show multiple icons in one line, like "[icon1] [icon2] [icon3] text" or even "[icon1] text [icon2] [icon3]" if possible. Coding like {MENU_IMG_TXT (icon1) {MENU_IMG_TXT (icon2) (text)}} doesn't seem to work.
Is there any possible way to use images more freely?
What am I using this for?:
Last edited by watbesh on July 18th, 2015, 4:14 pm, edited 1 time in total.
My MP Eras and Mods with core units and unusual gameplay (version 1.3.1 for Wesnoth 1.12)
Re: Icons/Images in the Middle of Messages/etc?
I think you can use some codes in gtfgtf's "Pick Your Recruits, No Preparation Turn." Mod, it has a nice user interface.
Re: Icons/Images in the Middle of Messages/etc?
Ah, thanks. I found it, and achieving my goal is now possible at all. This looks hard to code, but I'll try.Xara wrote:I think you can use some codes in gtfgtf's "Pick Your Recruits, No Preparation Turn." Mod, it has a nice user interface.
(EDIT)
Actually I was thinking Xara's solution is beyond my capability (I don't know a thing about Lua). I''ll use this instead. Thank you much!zookeeper wrote:You can also use ImagePathFunctionWML to combine multiple images into one (mostly with BLIT, and SCALE is helpful to set up the canvas).
Last edited by watbesh on July 19th, 2015, 1:13 am, edited 1 time in total.
My MP Eras and Mods with core units and unusual gameplay (version 1.3.1 for Wesnoth 1.12)
Re: [SOLVED] Icons/Images in the Middle of Messages/etc?
You can also use ImagePathFunctionWML to combine multiple images into one (mostly with BLIT, and SCALE is helpful to set up the canvas).