SRL Archive - SRL Suggestions

Mouse ( Box Variation )


PhaseCode

2012-02-03 02:26:22

(*
Mouse
~~~~~~

.. code-block:: pascal

procedure Mouse(Box : TBox; ClickType : Integer);

Moves the mouse to the Indicated Box, and performs the ClickType

.. note::

by PhaseCode

Example:
Mouse(InvBox(1),1);
.. code-block:: pascal

*)
procedure Mouse(Box : TBox; ClickType : Integer);
begin
MouseBox(Box.X1,Box.Y1,Box.X2,Box.Y2, ClickType)
end;

When working with InvBox's, I found it a pain in the butt to have to do X1,Y1,X2,Y2. Unless there is a method that Already does this, here is my suggestions : P .

Narcle

2012-02-03 02:41:07

Damn should of added this long time ago…

Name will be different though, like MouseBoxEx or something.

PhaseCode

2012-02-03 02:47:41

From: Narcle
Damn should of added this long time ago…

Name will be different though, like MouseBoxEx or something.


: O You mean, one of my things will be in the repo?

Narcle

2012-02-03 02:50:41

Yes, I use TBox's all the time now. As do many others, I think its worth the extra 3 lines.

PhaseCode

2012-02-03 02:55:58

From: Narcle
Yes, I use TBox's all the time now. As do many others, I think its worth the extra 3 lines.


Awwwww yea >:D , More to Come :P Thanks Narcle. It feels good contributing back to the community <3

NickMystre

2012-02-03 05:23:24

From: Narcle
Yes, I use TBox's all the time now. As do many others, I think its worth the extra 3 lines.


You have piqued my interest here. What is a TBox, and how / why / when would you use one / them ? Thx!

Wizzup?

2012-02-03 05:33:48

In lape we could have this with overload;

Sex

2012-02-03 05:35:50

From: NickMystre
You have piqued my interest here. What is a TBox, and how / why / when would you use one / them ? Thx!



A TBox is a type that holds 4 integers which are basically the x and y coordinates of the opposite corners of a box.


TBoxx = record
X1, Y1, X2, Y2 : integer;
end;
X1 and Y1 are the coords of one corner.
X2 and Y2 are the coords of the other corner.

Most inventory functions return the type for boundaries of inventory slots etc. and for convenience.

Narcle

2012-02-03 05:45:37

From: Wizzup?
In lape we could have this with overload;


Yeah would be sweet now heh.

NickMystre

2012-02-03 06:10:16

From: Sex
A TBox is a type that holds 4 integers which are basically the x and y coordinates of the opposite corners of a box.


TBoxx = record
X1, Y1, X2, Y2 : integer;
end;
X1 and Y1 are the coords of one corner.
X2 and Y2 are the coords of the other corner.

Most inventory functions return the type for boundaries of inventory slots etc. and for convenience.


OK, much appreciated. I'll go look around now for some coding examples that I can 'dismember' and see how they work. Later!

PhaseCode

2012-02-03 18:17:57

From: Narcle
Yeah would be sweet now heh.


Overload would be nice : I I posted this but forgot it wouldn't compile because we don't have overload.

Coh3n

2012-03-06 19:50:16

Added MouseTBox to mouse.simba.