Kaynağa Gözat

Menu bar was wider than image

Someone test this please.
master
Lee 12 yıl önce
ebeveyn
işleme
d8e487e71e
2 değiştirilmiş dosya ile 67 ekleme ve 66 silme
  1. +64
    -63
      build.xml
  2. +3
    -3
      src/Render.java

+ 64
- 63
build.xml Dosyayı Görüntüle

@@ -1,63 +1,64 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="Goldfish">
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.6"/>
<property name="source" value="1.6"/>
<path id="Goldfish.classpath">
<pathelement location="bin"/>
</path>

<manifestclasspath property="manifest_cp" jarfile="bin/Goldfish.jar">
<classpath refid="Goldfish.classpath" />
</manifestclasspath>

<manifest file="bin/MANIFEST.MF">
<attribute name="Main-Class"
value="edu.stuy.goldfish.Goldfish" />
<attribute name="Created-By"
value="Ben Kurtovic, Josh Hofing, and Kevin Li" />
<attribute name="Class-Path"
value="${manifest_cp}" />
</manifest>


<target name="init">
<mkdir dir="bin"/>
<mkdir dir="src"/>
<mkdir dir="src/rules" />
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>

<target name="clean">
<delete dir="bin"/>
</target>

<target depends="clean" name="cleanall"/>
<target depends="build-project" name="build"/>

<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}" includeantruntime="false" >
<src path="src"/>
<classpath refid="Goldfish.classpath"/>
</javac>
<jar file="bin/Goldfish.jar"
manifest="bin/MANIFEST.MF" >
<fileset dir="bin">
<include name="**/*.class"/>
</fileset>
</jar>
</target>

<target depends="build-project" name="run">
<java jar="bin/${ant.project.name}.jar" fork="true" />
</target>

</project>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="Goldfish">
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.6"/>
<property name="source" value="1.6"/>
<mkdir dir="bin"/>
<path id="Goldfish.classpath">
<pathelement location="bin"/>
</path>
<manifestclasspath property="manifest_cp" jarfile="bin/Goldfish.jar">
<classpath refid="Goldfish.classpath" />
</manifestclasspath>
<manifest file="bin/MANIFEST.MF">
<attribute name="Main-Class"
value="edu.stuy.goldfish.Goldfish" />
<attribute name="Created-By"
value="Ben Kurtovic, Josh Hofing, and Kevin Li" />
<attribute name="Class-Path"
value="${manifest_cp}" />
</manifest>
<target name="init">
<mkdir dir="bin"/>
<mkdir dir="src"/>
<mkdir dir="src/rules" />
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-project" name="build"/>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}" includeantruntime="false" >
<src path="src"/>
<classpath refid="Goldfish.classpath"/>
</javac>
<jar file="bin/Goldfish.jar"
manifest="bin/MANIFEST.MF" >
<fileset dir="bin">
<include name="**/*.class"/>
</fileset>
</jar>
</target>
<target depends="build-project" name="run">
<java jar="bin/${ant.project.name}.jar" fork="true" />
</target>
</project>

+ 3
- 3
src/Render.java Dosyayı Görüntüle

@@ -47,8 +47,6 @@ public class Render extends Canvas implements Runnable, MouseListener,
_lastTick = 0;
_rules = rules;
fps_now = 15;
Dimension size = new Dimension(width * scale, height * scale);
setPreferredSize(size);
setFrame();
}
@@ -128,8 +126,10 @@ public class Render extends Canvas implements Runnable, MouseListener,
framesPerSecond.setMinorTickSpacing(1);
framesPerSecond.setPaintTicks(true);
framesPerSecond.setPaintLabels(true);
framesPerSecond.setPreferredSize(new Dimension(100,40));
menuBar.add(framesPerSecond);
setPreferredSize(new Dimension(width * scale, height * scale));
_frame = new JFrame();
_frame.setJMenuBar(menuBar);
_frame.setResizable(false);


Yükleniyor…
İptal
Kaydet