dedomil.net - Mobile Games Forum
[J2ME] PixelyVulpine Sprite Creator - Printable Version

+- dedomil.net - Mobile Games Forum (http://dedomil.net/forum)
+-- Forum: Preview Section (/forumdisplay.php?fid=1)
+--- Forum: Preview Mobile Games (/forumdisplay.php?fid=2)
+--- Thread: [J2ME] PixelyVulpine Sprite Creator (/showthread.php?tid=5631)

Pages: 1 2


RE: PixelyVulpine Sprite Creator - star cash - 09-03-2021 09:11 PM

Ok thanks

Can you write an example of script for me?


RE: PixelyVulpine Sprite Creator - JoseskVolpe - 09-03-2021 09:19 PM

Sure. ¿But why would you want it tho? It's not released yet

Quote:package pixelyvulpine.test.scenes;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Font;
import javax.microedition.midlet.MIDlet;

import pixelyvulpine.api.lcdui.Layout;
import pixelyvulpine.api.lcdui.Color;
import pixelyvulpine.api.lcdui.DimensionAttributes;
import pixelyvulpine.api.lcdui.DimensionAttributes.Scaled;
import pixelyvulpine.contents.Button;
import pixelyvulpine.contents.Canvas;

public class Vibrator extends Layout implements CommandListener{

private Command vib = new Command("Vibrate", Command.ITEM, 1);
private Button vibrate;

public Vibrator(MIDlet app) {
super(app);

animation = Layout.ANIMATION_SLIDE_LEFT;
setBackgroundColor(new Color(150,10, 37));

vibrate = new Button(this, new Button.ButtonPadding(0,10,0,0), "¡Vibrate lewd! x3", Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_LARGE));
vibrate.setClickCommand(vib);

Canvas center = new Canvas(this, new DimensionAttributes(new Scaled(0,0,100,100)));
center.setBackgroundColor(null);
center.setForegroundColor(null);
center.setContentAlignment(Canvas.ALIGNMENT_CENTER);

center.addContent(vibrate);
addContent(center);

this.setCommandListener(this);

}

public void Setup() {
this.setFullScreenMode(true);
}

public void commandAction(Command arg0, Displayable arg1) {
if(arg0 == vib) {
Display.getDisplay(getMIDlet()).vibrate(5000);
vibrate.setEnabled(false);
vibrate.setText("OwO");
try {
Thread.sleep(5000);
} catch (InterruptedException e) {}
vibrate.setText("¡Vibrate lewd! x3");
vibrate.setEnabled(true);
}

}

}

This makes a Context (currently named "Layout") with a button on the center, that vibrates the phone for 5 seconds when pressed


RE: PixelyVulpine Sprite Creator - star cash - 09-04-2021 12:22 AM

Wow scripting is hard

thanks bro :-)


RE: PixelyVulpine Sprite Creator - Raymond Gad - 09-12-2021 02:26 AM

good luck bro