SOLVED: Can I make part of a mouse cursor sprite half-transparent?

Started by johanvepa, Sun 01/11/2015 08:14:56

Previous topic - Next topic

johanvepa

I want my mousemode "look" cursor to be a pair of glasses rather than the traditional eye. No problem. Now i'd like these glasses to have the effect of being semi-transparent, so the spectacle frame is solid while the glass pieces are semi-transparent. Somewhat like the effect of a semi-transparent GUI hovering over part of the screen.

Is this possible?

Perhaps something like a GUI placed wherever the mouse cursor is at a given time, done with rep_exec, but I dont know if this is the most practical solution.

Or perhaps the mouse cursor sprite can be made with a dynamic sprite?

What would you propose as the most feasible solution?

Snarky

This is only possible in a 32-bit game.

I'm 99% certain you can simply import a sprite with the semi-transparent lenses and use that as the cursor graphic.

To do so you need to use a PNG file with opacity.

johanvepa

Oh, this seems feasible but out of bounds of my pet project  :(

I cant recommend using a transparent GUI for this, it lacks behind after the mouse cursor. Also, I read a bit about dynamic sprites and that seems not possible either.

I'll have to think about it before I try to do this as a 32-bit game. Thanks for the advice!

Snarky

It sounds like you're misunderstanding me.

You can only do semi-transparent things (GUIs, cursors, whatever) in a 32-bit game, no matter how you do it. This is not a problem: just make sure your game is set to 32 bits. (Personally I think all games should be 32-bit by default, precisely because of stuff like this. There is hardly any benefit to any of the other graphics modes.)

You don't need to use transparent GUIs, dynamic sprites or anything fancy at all. You just need to draw your cursor sprite with semi-transparent lenses. To do this is pretty easy in most drawing applications. The only file format that supports semi-transparency (aka opacity or alpha) and that AGS can read is PNG, so you need to save the sprite in that format in order to import it into AGS.

johanvepa

That sure explained a lot. Thanks :)

I'll try it out in paint.net and see what I can do.

SMF spam blocked by CleanTalk