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

2020/3/13

.jar file window size

Carbon_Raven Carbon_Raven

2020/3/13

#
I wrote a programm using multiple world classes. The first world, the user sees is a small window in which the user can set the resolution for the programm. In Greenfoot everything is working, however in the jar file the size stays the same as the first world (300x200). Is there any way to change that? If you need my code, I will of course send you the code.
danpost danpost

2020/3/13

#
Try running the scenario until the largest screen appears and then pause and output.
Carbon_Raven Carbon_Raven

2020/3/14

#
Discovered something! It works with the jar export in new Greenfoot versions (I used 3.0.4 before, now 3.6.1), however, the new jar files can't be run with a doubleclick. Is there any exe workaround with the new jar files?
danpost danpost

2020/3/14

#
Carbon_Raven wrote...
Discovered something! It works with the jar export in new Greenfoot versions (I used 3.0.4 before, now 3.6.1), however, the new jar files can't be run with a doubleclick. Is there any exe workaround with the new jar files?
Could try something like this:
private boolean clicked;
private  int timer;

public void act()
{
    if (clicked)
    {
        if (timer-- > 0) if (Greenfoot.mouseClicked(this)) System.out.println("Dbl-Clkd");
        if (timer == 0) clicked = false;
    }
    else if (Greenfoot.mouseClicked(this))
    {
        clicked = true;
        timer = 30;
    }
}
Carbon_Raven Carbon_Raven

2020/3/14

#
i meant to run the jar file... I doubt that your idea is working...
You need to login to post a reply.