Making a alert window on front and disable the rest

Hello, am still working on my same projet and i came to a very simple problem : I want to make a window that pop up for connection error, setting for my application and more stuff like this. Problem is, if i make something simply pop up and don’t force people to use it they could simply ignore it or lost track of it by simply clicking behind it or make some wierd bug whit the setting. So i was wondering if such thing exist in Tonegod or should i make it myself. It look quite eays and i could share the code whit no problem but if it already exist, i mean why should i.

I was thinking maybie the alert window could do the job but after some test i realise it was only a panel whit some decoration on it.

Well because i had no answer i decide to take some time and do just that. So the solution was quite simple : make a panel the size of the screen your using and put in in front of everything. Once the job is done just remove it front the scene. Il put the code in there, but i also put some animation on in so you will need to disable it if you can’t add the require image.

[java]
import com.jme3.asset.AssetNotFoundException;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector2f;
import com.jme3.math.Vector4f;
import com.jme3.renderer.RenderManager;
import com.jme3.renderer.ViewPort;
import com.jme3.scene.control.AbstractControl;

import tonegod.gui.controls.text.Label;
import tonegod.gui.controls.windows.Panel;
import tonegod.gui.core.Screen;

public class Loading
{

Screen screen ; 
Panel backGround ;



public Loading(Screen Screen) 
{

	
	screen = Screen ; 
		
		
	 
	
backGround = new Panel(
		screen,
		new Vector2f(0f, 0f),                       // position
        new Vector2f(screen.getWidth(), screen.getHeight()),                  // size
        Vector4f.ZERO,             // resize borders
		null
);	




backGround.setIsMovable(false);
backGround.setIsResizable(false);
backGround.setZOrder(0);


float sizeX = 250 ; 
float sizeY = 250 ; 

Panel loading = new Panel(
		screen,
		new Vector2f(backGround.getWidth()/2-sizeX/2,backGround.getHeight()/2-sizeY/2),
		new Vector2f(sizeX, sizeY),
		Vector4f.ZERO,
		null 
		);
		
	

	loading.setIsMovable(false);
	loading.setIsResizable(false);
	


	float textSizeY = 20 ; 
	
Label loadingText = new Label(
		screen,
		new Vector2f(loading.getX(),loading.getY()),
		new Vector2f(loading.getWidth(),textSizeY) 
		);

loadingText.setText("Loading");	
loadingText.setFont("JavaKhan/Client/Font/SpaceAge.fnt");
loadingText.setFontSize(25);
loadingText.setFontColor(ColorRGBA.Black);
	
	
	


	backGround.addChild(loadingText);
	backGround.addChild(loading);
	screen.addElement(backGround);
	Moving move = new Moving(loading,loadingText) ; 
	
}


public void stopIt()
{
	  screen.removeElement(backGround);
}





public class Moving extends AbstractControl  
{

	Panel panel ;
	Label label ;
	String dot = "" ; 
	int panNum = 1 ; 
	float call = 2 ; 
	
	Moving(Panel pan,Label lab)
	{
		panel = pan ; 
		label = lab ; 
		panel.addControl(this) ;
	}
	
	
	
	@Override
	protected void controlRender(RenderManager arg0, ViewPort arg1) {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void controlUpdate(float fps) 
	{
		
		if(call >=5.9)
		{
			call = 3 ;
			panNum = 2;
		}
		
		call += fps*2 ; 
		try
		{
		if(call > panNum)
		{
			dot = "" ;
			for(int a = 2; a < panNum;a++)
			{dot += "." ;}
			label.setText("Loading" + dot);
			panNum ++ ; 
			panel.setColorMap("JavaKhan/Client/ConnectionPage/Image/Kirby/Kirby" + panNum + ".png");
		}
		}
		catch(AssetNotFoundException e)
		{
			System.out.println("sa plante") ;
		}
		
		
		
	}
	
}

}
[/java]

O and plez, forgive my french x)

I think that what you are looking for is “DialogBox”, which has a modal option (modal = will take and keep the focus, and disable the rest etc).
https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:contributions:tonegodgui:dialogbox

(if you have questions, i am french too, so we can discuss about it in french in mp)