SRL Archive - S.M.A.R.T.

SMART Customization


RISK

2011-12-01 23:56:52

When our paint becomes much more "Advanced", I think people will start wanting to use custom cursors like so many other websites have/had. It makes the script look, I suppose, more professional in a way or just more sleek depending on the cursor the creator of the script decided to implement.
At the moment, as far as I can tell, there is no way to customize the SMART cursor easily.

Is there a possibility of having custom cursors some time near in the future? Even to put it on a "Low priority" list would be good enough, honestly.

Also, is there any other SMART customizations that would be nice to have for paint when it becomes "Advanced" enough? Or even things for SMART that paint won't even use.

Harry

2011-12-02 00:02:10

You could change it in the source if you just want a different color and don't mind compiling it. https://github.com/BenLand100/SMART/blob/master/src/smart/Client.java .. debugGraphics.setColor(Color.RED) could be changed to a different color, and I am pretty sure that'd work.

As far as doing custom sizes and stuff, I didn't look hard enough for anything like that, but it could be possible I would bet. But I don't see any real advantage to it, other than looking pretty. I don't like pretty.

RISK

2011-12-02 00:03:54

Yeah. But what about for a scripter that desires to make his/her script "Standout"? The effect he/she has by editing his/her source would not show for the people that use his/her script, of course.

E: Fixed my grammar.

From: Harry
You could change it in the source if you just want a different color and don't mind compiling it. https://github.com/BenLand100/SMART/blob/master/src/smart/Client.java .. debugGraphics.setColor(Color.RED) could be changed to a different color, and I am pretty sure that'd work.

As far as doing custom sizes and stuff, I didn't look hard enough for anything like that, but it could be possible I would bet. But I don't see any real advantage to it, other than looking pretty. I don't like pretty.

Coh3n

2011-12-02 00:31:12

Don't count on BenLand making this update. If you want it done, you'll have to find someone who can edit the source and send Ben a pull request.

RISK

2011-12-02 00:37:56

Any idea who that "Someone" might be? If I may ask, that is.

From: Coh3n
Don't count on BenLand making this update. If you want it done, you'll have to find someone who can edit the source and send Ben a pull request.

Coh3n

2011-12-02 00:40:39

From: RISK
Any idea who that "Someone" might be? If I may ask, that is.
Someone who has the Java knowledge to do so. Specific names, I don't know.

nen

2011-12-07 03:34:59

To add custom cursors from my knowledge would be unbelievably easy. This is coming from a kid who was on RSBuddy etc. though but to do it in java you would simply create a Point object and add a MouseMotionListener and/or MouseListener and everytime an action occurs feed the information about the mouse to the Point. Java can then simply paint an image to that point eg….

g.drawImage(imageFile, mousePoint.x, mousePoint.y, null);


Edit: Just looked at the post by Harry and have found where you need to modify the code…

Line 355 set the Point for the mouse. (final Point p = getMousePos();)
Line 369 draws it. (debugGraphics.fillOval(p.x - 2, p.y - 2, 4, 4);)

simply replace line 369 with
BufferedImage imageFile = ImageIO.read("http://www.google.co.nz/logos/classicplus.png");
debugGraphics.drawImage(imageFile, p.x, p.y, null);


That code would load the Google logo and then use that as the mouse cursor. Problem with this code is that this is the method (procedure) which is called everytime the mouse needs repainting. Because we have declared the BufferedImage to be loaded from an external source each time this repaint method is called, it would create unbelievable amounts of lag. If you would like me to write some code for you to use then I can. This is to just show you that it works.