Main Menu

News:

LINKS: Website | Steam | Wiki

Paste text with background colors

Started by Eagoth, October 12, 2016, 10:30:05 AM

Previous topic - Next topic

Eagoth

Hello, guys.

I have a text.xp file with a lot of text, and colors.xp with colors from a png (converted to xp using the cmd png2xp magic). Both xp files have 102x58 cells, and I want for each character of text.xp to have the color of the corresponding cell of colors.png.

Is it possible to do this with REXPaint? I'm pretty new to it and I tried several copy-paste combinations with no luck.

I think I could do it if the png had the colors on foreground instead of background :/

Thanks a million!

Kyzrati

I see what you mean, so you have background colors and want to apply them to the foreground text... There is currently no command to perform that action, so it would have to be done cell by cell using color swapping. Yeah, obviously not going to happen, I know :P.

I'm going to do a little update to REXPaint soon for another feature request, so I'll see what I can do for you in this regard and get back to you. I think one option that would work here (and possible have applications elsewhere?), would be to create a command that simply swaps the foreground and background colors throughout an image, so you could fill colors.xp with the solid foreground character (any color), then swap background/foreground colors, then use the copy feature to copy the entire thing, then paste it over the text image (with glyph application turned off--just the foreground color). How's that sound?
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Eagoth

Yes, that would be useful. Thanks for answering so quickly! :)

Amazing work with the application and the game, by the way. I'm being very inspired by a lot of things of Cogmind.

Kyzrati

#3
Thanks, and here's your patch :) (Edit: Feature now included with v1.04)

The new command is Shift-Alt-w to swap the foreground/background colors throughout the active layer (or Ctrl-Shift-Alt-w to do this for all layers simultaneously). Just use the process I suggested above and you should be able to combine the images as needed!

Here's a sample of the new swap feature in action:
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Eagoth

That worked perfectly, thank you very much! :)

Kyzrati

Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon