Waffle
2011-12-07 17:12:34
Hey all, I'm relatively new here.. I've been using Simba actively for about 5 days, after I got around to really sitting down to figure it out.
One thing I noticed about the scripts is a lack of in-game, real-time progress reports (obviously you can tell I have used certain Java bots in the past).
I know next to nothing about Pascal, but rather than create scripts to play, I am deciding to start off learning the ropes of Simba by creating paints for scripts I use (the ones that don't have them, of course).
I was taking a look through paintsmart.scar and I fully understand how to draw shapes and text onto the SMART canvas.
But is it even possible to give them elements of transparency?
And what about drawing a full box rather than just an outline? I could easily loop from outside and increment inwards to "fake" a filled box, but from what I've gathered, the box-drawing function SMART has just connects lines.
Thanks for reading and any help is greatly appreciated
_______________
Edit1:
Here's a procedure you can add to paintsmart.scar to create a "filled" shape. Was simple to implement :)
- Waffle
One thing I noticed about the scripts is a lack of in-game, real-time progress reports (obviously you can tell I have used certain Java bots in the past).
I know next to nothing about Pascal, but rather than create scripts to play, I am deciding to start off learning the ropes of Simba by creating paints for scripts I use (the ones that don't have them, of course).
I was taking a look through paintsmart.scar and I fully understand how to draw shapes and text onto the SMART canvas.
But is it even possible to give them elements of transparency?
And what about drawing a full box rather than just an outline? I could easily loop from outside and increment inwards to "fake" a filled box, but from what I've gathered, the box-drawing function SMART has just connects lines.
Thanks for reading and any help is greatly appreciated
_______________
Edit1:
Here's a procedure you can add to paintsmart.scar to create a "filled" shape. Was simple to implement :)
{*******************************************************************************
procedure SMART_DrawFilledBoxEx(Clear: boolean; Box: TBox; color: TColor);
Contributors: Sir R. Magician, caused, mastaraymond, Waffle
Description: Draws a "filled" TBox onto the SMART Debug canvas
*******************************************************************************}
procedure SMART_DrawFilledBoxEx(Clear: boolean; Box: TBox; color: TColor);
{$IFDEF SMART}
var
i, height: integer;
begin
if (not SMART_DebugSetup) then
SMART_SetupDebug();
SMART_Canvas.canvas.Pen.Color := color;
if Clear then ClearRSCanvas(SMART_Canvas.canvas);
height := Box.y2 - Box.y1;
for i := 0 to height do
begin
SMART_Canvas.canvas.moveto(Box.x1,Box.y1+i);
SMART_Canvas.canvas.LineTo(Box.x2,Box.y1+i);
end;
{$ELSE}
begin
{$ENDIF}
end;- Waffle

