本文整理汇总了Java中com.jme3.ui.Picture.setHeight方法的典型用法代码示例。如果您正苦于以下问题:Java Picture.setHeight方法的具体用法?Java Picture.setHeight怎么用?Java Picture.setHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme3.ui.Picture
的用法示例。
在下文中一共展示了Picture.setHeight方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: simpleInitApp
import com.jme3.ui.Picture; //导入方法依赖的package包/类
public void simpleInitApp() {
Picture p = new Picture("Picture1");
p.move(0,0,-1);
p.setPosition(100, 100);
p.setWidth(100);
p.setHeight(100);
p.setImage(assetManager, "Interface/Logo/Monkey.png", false);
guiNode.attachChild(p);
Picture p2 = new Picture("Picture2");
p2.move(0,0,1.001f);
p2.setPosition(150, 150);
p2.setWidth(100);
p2.setHeight(100);
p2.setImage(assetManager, "Interface/Logo/Monkey.png", false);
guiNode.attachChild(p2);
}
示例2: BusySpinner
import com.jme3.ui.Picture; //导入方法依赖的package包/类
public BusySpinner(BaseScreen screen, Size size) {
super(screen, size);
Element el = new Element(screen).addStyleClass("busy-spinner");
Picture p = new Picture("busy");
Material mat = el.getMaterial().clone();
if (size == null) {
size = new Size(el.calcPreferredSize());
}
setMinDimensions(size);
setPreferredDimensions(size);
setMaxDimensions(size);
p.setMaterial(mat);
p.setWidth(size.x);
p.setHeight(size.y);
this.p = p;
attachChild(p);
}
示例3: simpleInitApp
import com.jme3.ui.Picture; //导入方法依赖的package包/类
@Override
public void simpleInitApp() {
FLACLoader.init(assetManager);
AudioNode test_flac =new AudioNode(assetManager,"publicdomain.tropicx.flac",DataType.Buffer);
test_flac.setPositional(false);
test_flac.setLooping(true);
test_flac.setVolume(1f);
rootNode.attachChild(test_flac);
test_flac.play();
Picture pc=new Picture("bg");
pc.setImage(assetManager,"publicdomain.sunsetintheswamp.png",false);
pc.setHeight(settings.getHeight());
pc.setWidth(settings.getWidth());
pc.setPosition(0,0);
guiNode.attachChild(pc);
}
示例4: initGuiElements
import com.jme3.ui.Picture; //导入方法依赖的package包/类
private void initGuiElements()
{
spiderInfo = new Picture("spiderInfo");
spiderInfo.setImage(simpleApp.getAssetManager(), "Interface/spiderInfo.png", true);
spiderInfo.setWidth(796);
spiderInfo.setHeight(94);
spiderInfo.move(270, 50, -1);
ghostInfo = new Picture("ghostInfo");
ghostInfo.setImage(simpleApp.getAssetManager(), "Interface/ghostInfo.png", true);
ghostInfo.setWidth(796);
ghostInfo.setHeight(94);
ghostInfo.move(270, 50, -1);
inventoryBackground = new Picture("inventoryBackground");
inventoryBackground.setImage(simpleApp.getAssetManager(), "Interface/inventoryBackground.png", true);
inventoryBackground.setWidth(798);
inventoryBackground.setHeight(500);
inventoryBackground.move(270, 50, -1);
exit = new Picture("exit");
exit.setImage(simpleApp.getAssetManager(), "Interface/exitMenu.png", true);
exit.setWidth(1000);
exit.setHeight(499);
exit.move(160, 500, -1);
}
示例5: addInventoryOptions
import com.jme3.ui.Picture; //导入方法依赖的package包/类
private void addInventoryOptions()
{
for (int i = 0; i < optionNames.length; i++)
{
Picture option = new Picture(optionNames[i]);
option.setImage(simpleApp.getAssetManager(),
"Interface/" + optionNames[i] + ".png",
true);
option.setWidth(78);
option.setHeight(247);
option.move(370 + 250*i, 175, 0);
simpleApp.getGuiNode().attachChild(option);
}
/* Highlight first option */
highlightInventoryOption("laserTower");
}
示例6: showBudget
import com.jme3.ui.Picture; //导入方法依赖的package包/类
private void showBudget()
{
Picture budgetIcon = new Picture("budgetIcon");
budgetIcon.setImage(simpleApp.getAssetManager(), "Interface/budget.png", true);
budgetIcon.setWidth(64);
budgetIcon.setHeight(64);
budgetIcon.move(15, 40, 0);
simpleApp.getGuiNode().attachChild(budgetIcon);
BitmapFont myFont = simpleApp.getAssetManager().loadFont("Interface/Fonts/PoorRichardBig.fnt");
BitmapText budgetText = new BitmapText(myFont);
budgetText.setName("budgetText");
budgetText.setSize(myFont.getCharSet().getRenderedSize());
budgetText.setText(Integer.toString(currentGameState.getBudget()));
budgetText.move(92, 86, 0);
simpleApp.getGuiNode().attachChild(budgetText);
}
示例7: simpleInitApp
import com.jme3.ui.Picture; //导入方法依赖的package包/类
@Override
public void simpleInitApp() {
int w = settings.getWidth();
int h = settings.getHeight();
//setup framebuffer
fb = new FrameBuffer(w, h, 1);
Texture2D fbTex = new Texture2D(w, h, Format.RGBA8);
fb.setDepthBuffer(Format.Depth);
fb.setColorTexture(fbTex);
// setup framebuffer's scene
Sphere sphMesh = new Sphere(20, 20, 1);
Material solidColor = assetManager.loadMaterial("Common/Materials/RedColor.j3m");
Geometry sphere = new Geometry("sphere", sphMesh);
sphere.setMaterial(solidColor);
fbNode.attachChild(sphere);
//setup main scene
Picture p = new Picture("Picture");
p.setPosition(0, 0);
p.setWidth(w);
p.setHeight(h);
p.setTexture(assetManager, fbTex, false);
rootNode.attachChild(p);
}
示例8: simpleInitApp
import com.jme3.ui.Picture; //导入方法依赖的package包/类
@Override
public void simpleInitApp() {
flyCam.setEnabled(false);
// inputManager.setCursorVisible(false);
Texture tex = assetManager.loadTexture("Interface/Logo/Cursor.png");
cursor = new Picture("cursor");
cursor.setTexture(assetManager, (Texture2D) tex, true);
cursor.setWidth(64);
cursor.setHeight(64);
guiNode.attachChild(cursor);
inputManager.addRawInputListener(inputListener);
// Image img = tex.getImage();
// ByteBuffer data = img.getData(0);
// IntBuffer image = BufferUtils.createIntBuffer(64 * 64);
// for (int y = 0; y < 64; y++){
// for (int x = 0; x < 64; x++){
// int rgba = data.getInt();
// image.put(rgba);
// }
// }
// image.clear();
//
// try {
// Cursor cur = new Cursor(64, 64, 2, 62, 1, image, null);
// Mouse.setNativeCursor(cur);
// } catch (LWJGLException ex) {
// Logger.getLogger(TestSoftwareMouse.class.getName()).log(Level.SEVERE, null, ex);
// }
}
示例9: simpleInitApp
import com.jme3.ui.Picture; //导入方法依赖的package包/类
public void simpleInitApp() {
Picture p = new Picture("Picture");
p.move(0, 0, -1); // make it appear behind stats view
p.setPosition(0, 0);
p.setWidth(settings.getWidth());
p.setHeight(settings.getHeight());
p.setImage(assetManager, "Interface/Logo/Monkey.png", false);
// attach geometry to orthoNode
guiNode.attachChild(p);
}
示例10: displayMap
import com.jme3.ui.Picture; //导入方法依赖的package包/类
protected void displayMap(Renderer r, Picture pic, int left) {
Camera cam = vp.getCamera();
rm.setCamera(cam, true);
int h = cam.getHeight();
pic.setPosition(left, h / 20f);
pic.setWidth(128);
pic.setHeight(128);
pic.updateGeometricState();
rm.renderGeometry(pic);
rm.setCamera(cam, false);
}
示例11: simpleInitApp
import com.jme3.ui.Picture; //导入方法依赖的package包/类
public void simpleInitApp() {
picture = new Picture("VideoPicture", true);
picture.setPosition(0, 0);
picture.setWidth(settings.getWidth());
picture.setHeight(settings.getHeight());
picture.setImage(assetManager, "Interface/Logo/Monkey.jpg", false);
// attach geometry to orthoNode
rootNode.attachChild(picture);
// start video playback
createVideo();
}
示例12: getPicture
import com.jme3.ui.Picture; //导入方法依赖的package包/类
private Picture getPicture(String path) {
Picture pic = new Picture("Picture");
pic.setImage(assetManager, path, true);
pic.setWidth(camera.getHeight());
pic.setHeight(camera.getHeight());
return pic;
}
示例13: setupHud
import com.jme3.ui.Picture; //导入方法依赖的package包/类
private void setupHud() {
Picture pic = new Picture("Crosshair");
pic.setImage(assetManager, "builtins/crosshair.png", true);
pic.setWidth(32);
pic.setHeight(32);
pic.setPosition(settings.getWidth() / 2 - 16, settings.getHeight() / 2 - 16);
guiNode.attachChild(pic);
}
示例14: setLaserTowerText
import com.jme3.ui.Picture; //导入方法依赖的package包/类
private void setLaserTowerText(boolean canSetText)
{
if (canSetText)
{
BitmapFont myFont = simpleApp.getAssetManager().loadFont("Interface/Fonts/PoorRichardBig.fnt");
BitmapText laserTowerText = new BitmapText(myFont);
laserTowerText.setName("laserTowerText");
laserTowerText.setSize(myFont.getCharSet().getRenderedSize());
laserTowerText.setText("Laser 10");
laserTowerText.move(350, 160, 0);
simpleApp.getGuiNode().attachChild(laserTowerText);
Picture budgetSmallIcon = new Picture("budgetSmallIcon1");
budgetSmallIcon.setImage(simpleApp.getAssetManager(), "Interface/budgetSmall.png", true);
budgetSmallIcon.setWidth(50);
budgetSmallIcon.setHeight(50);
budgetSmallIcon.move(410, 120, 0);
simpleApp.getGuiNode().attachChild(budgetSmallIcon);
return;
}
Spatial text = simpleApp.getGuiNode().getChild("laserTowerText");
if (text != null)
text.removeFromParent();
Spatial textIcon = simpleApp.getGuiNode().getChild("budgetSmallIcon1");
if (textIcon != null)
textIcon.removeFromParent();
}
示例15: setLightTowerText
import com.jme3.ui.Picture; //导入方法依赖的package包/类
private void setLightTowerText(boolean canSetText)
{
if (canSetText)
{
BitmapFont myFont = simpleApp.getAssetManager().loadFont("Interface/Fonts/PoorRichardBig.fnt");
BitmapText lightTowerText = new BitmapText(myFont);
lightTowerText.setName("lightTowerText");
lightTowerText.setSize(myFont.getCharSet().getRenderedSize());
lightTowerText.setText("Light 15");
lightTowerText.move(600, 160, 0);
simpleApp.getGuiNode().attachChild(lightTowerText);
Picture budgetSmallIcon = new Picture("budgetSmallIcon2");
budgetSmallIcon.setImage(simpleApp.getAssetManager(), "Interface/budgetSmall.png", true);
budgetSmallIcon.setWidth(50);
budgetSmallIcon.setHeight(50);
budgetSmallIcon.move(660, 120, 0);
simpleApp.getGuiNode().attachChild(budgetSmallIcon);
return;
}
Spatial text = simpleApp.getGuiNode().getChild("lightTowerText");
if (text != null)
text.removeFromParent();
Spatial textIcon = simpleApp.getGuiNode().getChild("budgetSmallIcon2");
if (textIcon != null)
textIcon.removeFromParent();
}