Сообщения

lemur listbox

 Container menu = new Container();         guiNode.attachChild(menu);                  menu.setLocalTranslation(getContext().getSettings().getWidth() / 2,  getContext().getSettings().getHeight() / 2, 10);         ListBox listBox = new ListBox();                  listBox.getModel().add(new ListBoxItem("Forest"));                  listBox.addClickCommands(new Command() {             @Override             public void execute(Object source) {                 ListBox list = (ListBox) source;                 ListBoxItem boxItem = (ListBoxItem) list.getSelectedItem();                 boxItem.action();             }         });                     listBox.setVisibleItems(6);         listBox.setPreferredSize(new Vector3f(200, 200, 0));         listBox.setLocalTranslation((800) , 680, 0);                  menu.addChild(listBox); /*  * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license  * Click nbfs://nbhost/SystemFileSystem/Templates/Clas

set display statistic

         this.app.setDisplayFps(false);         this.app.setDisplayStatView(false);

sound

  shootSound.setLooping(false); // activate continuous playing shootSound.setPositional(false); rootNode.attachChild(shootSound);

bitmap text

  BitmapFont guiFont = assetManager.loadFont( "Interface/Fonts/Default.fnt" ); hpText = new BitmapText (guiFont, false ); hpText.setSize(guiFont.getCharSet().getRenderedSize()); hpText.setColor(ColorRGBA.Red); hpText.setText( "HP:" + Integer.toString(hp)); hpText.setLocalTranslation( 0 , height- 160 , 0 ); guiNode.attachChild(hpText);

get width get height

     app.getContext().getSettings().getWidth() / 2 - ch.getLineWidth()/2, app.getContext().getSettings().getHeight() / 2 + ch.getLineHeight()/2, 0);

jmoneky threading

  Thread thread = new Thread ( new Runnable () { // <- Never override classes if it is not required. public void run () { GameLevel appLevel = new GameLevel (levelName,id,x,y,z); appLevel.setEnabled( true ); app.enqueue( new Runnable () { @Override public void run () { app.getStateManager().attach(appLevel); app.getGuiNode().detachChild(pic); } }); } });

java gradle jar dependecy

  dependencies { implementation files ( 'libs/something_local.jar' ) }