net.minecraft.client.gui.GuiYesNo Java Examples

The following examples show how to use net.minecraft.client.gui.GuiYesNo. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EditBlockListScreen.java    From ForgeWurst with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void actionPerformed(GuiButton button) throws IOException
{
	if(!button.enabled)
		return;
	
	switch(button.id)
	{
		case 0:
		blockList.add(blockToAdd);
		blockNameField.setText("");
		break;
		
		case 1:
		blockList.remove(listGui.selected);
		break;
		
		case 2:
		mc.displayGuiScreen(
			new GuiYesNo(this, "Reset to Defaults", "Are you sure?", 0));
		break;
		
		case 3:
		mc.displayGuiScreen(prevScreen);
		break;
	}
}