DOMAJ DXLIB TIPS
How do I add my own resource file bitmap as the castmember icon?
In the TDXAsset.GetAssetInfo function you need to say:
AssetInfo.Bitmap:='MYBITMAP';
You then need to create a resource file, for example: data.res and include
it in your Xtra: {$R data.res} <-- at the top in your unit
In that resource file you have to create a bitmap resource (16x16) and call
it "MYBITMAP". You can use the Delphi Image Editor to create the resource file.
You can place multiple bitmaps in the same resource file.
DX Team 4/25/2002 7:56:54 AM
Here is an example of a change I made to the TFrame example
{$R img.res}
//**************************************
// TDelphiTFrame
//**************************************
class procedure TDelphiTFrame.GetAssetInfo
(var AssetInfo:TDXAssetInfo);
begin
AssetInfo.ObjectName:='dxDelphiTFrame';
AssetInfo.DisplayName:='DelphiTFrame';
AssetInfo.Category:='DXLib Examples';
AssetInfo.SpriteClass:=TDelphiTFrameSprite;
AssetInfo.Capabilities:=[acUseAssetRectForSprites,acCantResize, acHasPropertyEditor];
AssetInfo.DefaultWidth:=200;
AssetInfo.DefaultHeight:=200;
AssetInfo.BitmapName:='Bitmap8';
end;
DXLIB TIPS INDEX
- When I use sendMessage, the message does not appear
in the Director message window. Why?
- How do I return a value to Director?.
- What is the results interface?
- Field properties.
- How do I trigger the mouseUp handler?
- How do I add my own function to an asset?
- How do I add my own function to a sprite?
- How do I manipulate the score?
- How do I show delphi forms?
- How do I define and use my own variables?
- How do I create and and read global variables and
their values?
- How do I create a behavior?
- How do I trigger a script in Director?
- How do I get the properties of a cast member?(31Mar03)
- How do I manipulate casts?
- How do I debug an XTRA?
- How do I draw a castmember icon?
- How do I add my own resource file bitmap as the
castmember icon?
- How do I add a Director property interface
- Using the bitmap media property of a castmember
(30Apr02)
- How do I return a list to Director (09May02)
- How to create, execute and delete a Director script
(08Oct02)
- How to create a Director Bitmap (09Oct02)
- How to export a Director Bitmap (15Oct02)
DOMAJ Links
