One quite easy(?) API function request + another one

Started by AJA, Tue 15/07/2003 15:13:34

Previous topic - Next topic

AJA

Hi, CJ, I'd need this for my outline generator plugin:

SetCursorGraphic (mode, bitmap);
With this I could change the inventory cursor to an outlined inventory cursor bitmap which is created by my plugin.

Pretty please? :D

-EDIT-

Or maybe it should be SetInvGraphic(invitem, bitmap)?
And in that case GetInvItemHotspot(item,x,y) API function would be quite nice too... :)

Pumaman

#1
Would this do the trick, or do you mean something different?

ChangeCursorGraphic

ChangeCursorGraphic (int mode, int slot)

Changes mouse cursor mode MODE's cursor graphic to SLOT. This permenantely changes the specified mode's cursor graphic. This function may be useful if you need more than the maximum number of mouse cursors.
Example:

ChangeCursorGraphic (MODE_LOOK, 120);

will change the cursor’s graphic for look mode to the image that's imported in the sprite’s manager slot 120.

AJA

No... I need a way to set a bitmap, which is created by my plugin (the outline - CreateBlankBitmap API function), as the cursor graphic for the inventory item.

MachineElf

#3
I think a function as Chris described it would be very useful as well, maybe not for your API, but for other uses.

EDIT
---------
My mistake... Didn't read too well what was really said and too long since I used AGS 'til now. Sorry.
There are 10 kinds of people in the world: Those who understand binary and those who don't.

AJA


AJA

DrawTextBitmap (x,y,font,color,bitmap,text);

That would be nice too if it's not too tricky. That would be for my font outline generator... if you aren't going to script one yourself, CJ...?

Pumaman

Quote from: AJA on Wed 16/07/2003 16:23:37
No... I need a way to set a bitmap, which is created by my plugin (the outline - CreateBlankBitmap API function), as the cursor graphic for the inventory item.

Ah, I see what you mean. I'll add it to my list.

Quote
DrawTextBitmap (x,y,font,color,bitmap,text);

That would be nice too if it's not too tricky.

What would that do? If you just want to draw text onto a bitmap, then you can do:

BITMAP *oldScreen = engine->GetVirtualScreen();

engine->SetVirtualScreen(bitmap);
engine->DrawText(x, y, font, color, text);

engine->SetVirtualScreen(oldScreen);

AJA

Thanks, CJ! :)

QuoteBITMAP *oldScreen = engine->GetVirtualScreen();

engine->SetVirtualScreen(bitmap);
engine->DrawText(x, y, font, color, text);

engine->SetVirtualScreen(oldScreen);

So, using that I could draw onto a bitmap I created with CreateBlankBitmap? And then I could just edit the bitmap with the text? Sounds too easy (well...) to be true... :)


Now all I'd need is a way to play with the fonts before AGS displays them... So that I could make my plugin to create outlines for selected fonts and that AGS would call my outline generation function and it would return the outline which AGS would use as the outline for the font that will be displayed... Do you get the point? :P That would be sweet... :D

SMF spam blocked by CleanTalk