This site requires JavaScript, please enable it in your browser!
Greenfoot back

Comments for Magnifying Glass

Return to Magnifying Glass

A new version of this scenario was uploaded on Mon Sep 02 01:37:37 UTC 2013 Test Update hopefully to fix this...
A new version of this scenario was uploaded on Mon Sep 02 01:39:28 UTC 2013 Trying to fix...
A new version of this scenario was uploaded on Mon Sep 02 01:41:21 UTC 2013 Fixed now?...
A new version of this scenario was uploaded on Mon Sep 02 01:42:21 UTC 2013 How about now?
A new version of this scenario was uploaded on Mon Sep 02 01:43:44 UTC 2013 It seems the site doesn't like this, to view the scenario, download.
danpostdanpost

2013/9/2

Change your MouseActor class act method to this: public void act() { MouseInfo mouse = Greenfoot.getMouseInfo(); if (mouse == null) return; setLocation(mouse.getX(), mouse.getY()); updateImage(); }
danpostdanpost

2013/9/2

Also, instead of copying each pixel color from one image to the next, just use the GreenfootImage method 'drawImage'. For example you can change one of your MagnifyImage class 'magnifyImage' methods to: public static GreenfootImage magnifyImage(GreenfootImage img) { GreenfootImage image = new GreenfootImage(img.getWidth()/2, img.getHeight()/2); image.drawImage(img, -img.getWidth()/4, -img.getHeight()/4); image.scale(img.getWidth(), img.getHeight()); return image; } and similar for the other one.
danpostdanpost

2013/9/2

Finally, in your world class 'makeDefault' method, add the following condition for the statements in the following block: if (UserInfo.isStorageAvailable()) { GreenfootImage ui = new GreenfootImage(UserInfo.getMyInfo().getUserImage()); ui.scale(100,100); def2.drawImage(ui,getWidth()/2-50,getHeight()/2-50); }
SPowerSPower

2013/9/2

Good idea, but I agree with danpost: change some code, so it won't crash etc.
Thanks for the help danpost! I'll add that to this scenario pretty soon.
I knew that there was a problem with the mouse! I thought I had fixed that. Thanks again!
A new version of this scenario was uploaded on Mon Sep 02 14:01:32 UTC 2013 Now should work on the site, and some touch ups. Thanks to danpost!
joeschmoejoeschmoe

2013/10/14

This looks really cool and I looked at the source code but none of it makes sense to me... You didnt put any //explanations on anything. Any chance you could explain some of it?
Yah, I'll add some stuff, don't expect anything tonight, but I'll add some comments within the next few nights. And I'll see if I can get Actor images as well.
joeschmoejoeschmoe

2013/10/15

When ever :P