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

2012/10/11

run and reset button

1
2
3
4
Mux Mux

2012/10/11

#
Is it possible to get the run and reset button away when you get the greenfoot file exported to the .jar ? When you finished the game and export it. Than go into the .jar file and get the code for bottom thing and get it away. Like this it should be possible or not? so that the game starts automatically and won't get the to buttons.
davmac davmac

2012/10/11

#
No, it's not. But you can make the game start automatically by calling Greenfoot.start() from the world's constructor.
Upupzealot Upupzealot

2012/10/12

#
@davmac the source code of Greenfoot is available, so never say never :) @Mux yes, you can, but that would be a little complicated. What you need to do is : First, prepare the jar file which is exported by Greenfoot itself. Second, download the Greenfoot's source code, import it to an IDE(such as Eclipse) Than, find a class named "GreenfootScenariosViewer" or someone like that, I didn't rememberclearly. Four, remove several lines of codes that related something named like "control board" Than, compile the fixed code to get new class files. Last, find the jar file which you have prepared in step one, rename it from xxx.jar to xxx.zip. Last Last, open the zip file and replace the old classes by those you have got earlier. Last LastLast, zip all things again and rename the package back to jar again. Last at all, run your game and enjoy. PS: use similar methods, you can change Greenfoot itself. such as place the window in the center of the screen automatically from the beginning. but don't forget to make a look into Greenfoot's license and make sure what you will do is Okay. tell me, if you meet any problem :D
Upupzealot Upupzealot

2012/10/12

#
you two just remind me of this http://www.greenfoot.org/topics/find/2472#post_2472
erdelf erdelf

2012/10/12

#
if this works (dont tried it, but looks right) the greenfoot developers should make an option for exporting as jar file without the frame
Upupzealot Upupzealot

2012/10/12

#
@erdelf can't agree any more
davmac davmac

2012/10/12

#
the source code of Greenfoot is available, so never say never :)
This solution has been suggested before, but nobody has, as far as I know, ever actually succeeded.
if this works (dont tried it, but looks right) the greenfoot developers should make an option for exporting as jar file without the frame
We don't really want to do that; Greenfoot is designed for learners and the Greenfoot interface is meant to be as simple as possible, so we don't want to introduce options like this. If you really want to make something without the buttons, you need to get outside Greenfoot :)
Upupzealot Upupzealot

2012/10/12

#
Now, here is at least one person has finished this job :D I prepared this for those who want to remove those buttons: step1 : rename the JAR file which is exported by Greenfoot it self. From "xxx.jar" to "xxx.zip" than unzip it into a folder; step2 : enter: the folder you have got in step1/ greenfoot/ now you will find a folder named export there the folder you have got in step1/ greenfoot/ export step3 : download this: export.zip than unzip it into a folder, and replace the one you found in step2(include those files in the folder, replace them all) by this one step4 : Zip the folder you got in step1 angain into a ZIP file, and rename it back to xxx.jar last run it !
erdelf erdelf

2012/10/12

#
thx, maybe the developers should think about publishing this method so it becomes official
SPower SPower

2012/10/12

#
erdelf wrote...
thx, maybe the developers should think about publishing this method so it becomes official
can't you read?:
davmac wrote...
the source code of Greenfoot is available, so never say never :)
This solution has been suggested before, but nobody has, as far as I know, ever actually succeeded.
if this works (dont tried it, but looks right) the greenfoot developers should make an option for exporting as jar file without the frame
We don't really want to do that; Greenfoot is designed for learners and the Greenfoot interface is meant to be as simple as possible, so we don't want to introduce options like this. If you really want to make something without the buttons, you need to get outside Greenfoot :)
erdelf erdelf

2012/10/12

#
dont quote too much. I just asked about publishing the method on the website this time, not as an option in the greenfoot program
Upupzealot Upupzealot

2012/10/12

#
Yes, maybe developers designed it for java learners, but what I want to say is: Greenfoot could be more powerful, see those wonderful scenarios here(e.g. those published by builderboy2005) :D Greenfoot is a freeware under the License: GNU General Public License (GPL) Thanks to the developers :D That means everybody can make Greenfoot to any use, that's the spirit of freeware. It has been almost a year since I met Greenfoot for the first time, and I really fell in love with it now XD
Mux Mux

2012/10/14

#
I just posted the question because i want do get a game for myself and maybe some friends to play it with out anything on the screen that i don't wont to be there. So it's not for anything special or so I don't like the idea of pressing the reset button in game when you don't wont it and everything is gone without saving anything so thats the reason for getting this button away the run button and the hole bar ok no problem they could be there but a reset button is just stupid. if you want to reset everything just close the program and start it up again. For programming the game great to have an reset button, but even there you could just press compile and everything is reseted so yeah it is like it is but when there is a way to get it away ok.
danpost danpost

2012/10/14

#
If you made your initial world close the the size of your screen, then changed worlds to the size for your game, you should be able to hide the buttons below the bottom edge of your screen. (just an idea that might work for you)
Upupzealot Upupzealot

2012/10/15

#
@Mux have your tried my method? Does it work?
There are more replies on the next page.
1
2
3
4