Debug Buttons & Labels auf Colors

* Colours: Positionen verbessert
* Button: Redraw angepasst bei den verwendeten Farben
* Label: Redraw angepasst für AutoSize
pull/74/head
Zocker1999NET 8 years ago
parent 860811876e
commit 92f6e12886

@ -149,13 +149,12 @@ public class Button extends GUI_Interface {
sy = tI.getHeight() + (6 * 2) + 4;
}
GreenfootImage all = new GreenfootImage(sx,sy);
Color gray = new Color(133,133,133,255);
Color black = new Color(0,0,0,255);
Color border = backC.brighter();
Color trans = new Color(0,0,0,0);
Utils.drawInsideRectangle(all,gray,0);
Utils.drawInsideRectangle(all,black,2);
Utils.drawInsideRectangle(all,gray,6);
Utils.drawInsideRectangle(all,black,7);
Utils.drawInsideRectangle(all,border,0);
Utils.drawInsideRectangle(all,backC,2);
Utils.drawInsideRectangle(all,border,6);
Utils.drawInsideRectangle(all,backC,7);
all.setColorAt(0,0,trans);
all.setColorAt(sx-1,0,trans);
all.setColorAt(0,sy-1,trans);

@ -49,7 +49,7 @@ public class Colours extends World implements ButtonEvent
super(x, y, z);
setBackground(Start_Load.backgroundImage);
addObject(header,50, 20);
addObject(header,100,20);
addObject(schwarz, 50, 50);
addObject ( blau, 170, 50);
@ -59,12 +59,12 @@ public class Colours extends World implements ButtonEvent
addObject(lila, 610, 50);
addObject (weiter, 335,110);
addObject(pl1,50,170);
addObject(pl2,50,190);
addObject(pl3,50,210);
addObject(pl4,50,230);
addObject(pl5,50,250);
addObject(pl6,50,270);
addObject(pl1,100,170);
addObject(pl2,100,190);
addObject(pl3,100,210);
addObject(pl4,100,230);
addObject(pl5,100,250);
addObject(pl6,100,270);
schwarz.setSize(100, 50);
gelb.setSize(100, 50);

@ -90,6 +90,9 @@ public class Label extends GUI_Interface {
*/
public void redraw() {
GreenfootImage tI = new GreenfootImage(text,textSize,foreC,backC);
if(text == "") {
tI = new GreenfootImage(0,0);
}
if(autoSize) {
sx = tI.getWidth();
sy = tI.getHeight();

Loading…
Cancel
Save