Exemple #1
0
void MercsPlayerTeamCallback(GUI_BUTTON *btn,INT32 reason)
{
	if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
	{
		ClickEditorButton( MERCS_PLAYER );
		UnclickEditorButton( MERCS_ENEMY );
		UnclickEditorButton( MERCS_CREATURE );
		UnclickEditorButton( MERCS_REBEL );
		UnclickEditorButton( MERCS_CIVILIAN );
		iDrawMode = DRAW_MODE_PLAYER;
		SetMercEditingMode ( MERC_TEAMMODE );
	}
}
Exemple #2
0
void SetEditorSmoothingMode( UINT8 ubNewMode )
{
	UnclickEditorButtons( MAPINFO_RADIO_NORMAL, MAPINFO_RADIO_CAVES );
	if( iCurrentTaskbar == TASK_BUILDINGS )
		HideEditorButtons( BUILDING_NEW_ROOM, BUILDING_CAVE_DRAWING );
	gfBasement = FALSE;
	gfCaves = FALSE;
	gMapInformation.ubEditorSmoothingType = SMOOTHING_NORMAL;
	switch( ubNewMode )
	{
		case SMOOTHING_NORMAL:
			ClickEditorButton( MAPINFO_RADIO_NORMAL );
			if( iCurrentTaskbar == TASK_BUILDINGS )
				ShowEditorButtons( BUILDING_NEW_ROOM, BUILDING_MOVE_BUILDING );
			EnableEditorButtons( BUILDING_SMART_WALLS, BUILDING_SMART_BROKEN_WALLS );
			break;
		case SMOOTHING_BASEMENT:
			gfBasement = TRUE;
			ClickEditorButton( MAPINFO_RADIO_BASEMENT );
			if( iCurrentTaskbar == TASK_BUILDINGS )
				ShowEditorButtons( BUILDING_NEW_ROOM, BUILDING_KILL_BUILDING );
			EnableEditorButtons( BUILDING_SMART_WALLS, BUILDING_SMART_BROKEN_WALLS );
			break;
		case SMOOTHING_CAVES:
			gfCaves = TRUE;
			ClickEditorButton( MAPINFO_RADIO_CAVES );
			if( iCurrentTaskbar == TASK_BUILDINGS )
				ShowEditorButton( BUILDING_CAVE_DRAWING );
			DisableEditorButtons( BUILDING_SMART_WALLS, BUILDING_SMART_BROKEN_WALLS );
			break;
		default:
			AssertMsg( 0, "Attempting to set an illegal smoothing mode." );
			break;
	}
	gMapInformation.ubEditorSmoothingType = ubNewMode;
}
Exemple #3
0
void BuildingToggleInfoViewCallback(GUI_BUTTON *btn,INT32 reason)
{
	if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
	{
		if( fBuildingShowRoomInfo ^= 1 )
		{
			ClickEditorButton( BUILDING_TOGGLE_INFO_VIEW );
		}
		else
		{
			UnclickEditorButton( BUILDING_TOGGLE_INFO_VIEW );
		}
		gfRenderWorld = TRUE;
	}
}
Exemple #4
0
void MercsCivilianTeamCallback(GUI_BUTTON *btn,INT32 reason)
{
	if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
	{
		UnclickEditorButton( MERCS_PLAYER );
		UnclickEditorButton( MERCS_ENEMY );
		UnclickEditorButton( MERCS_CREATURE );
		UnclickEditorButton( MERCS_REBEL );
		ClickEditorButton( MERCS_CIVILIAN );
		iDrawMode = DRAW_MODE_CIVILIAN;
		SetMercEditingMode ( MERC_TEAMMODE );
	}
	else if( reason & MSYS_CALLBACK_REASON_RBUTTON_UP )
	{
		IndicateSelectedMerc( SELECT_NEXT_CIV );
	}
}
Exemple #5
0
void BuildingToggleWallViewCallback(GUI_BUTTON *btn,INT32 reason)
{
	if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
	{
		if( fBuildingShowWalls ^= 1 )
		{
			ClickEditorButton( BUILDING_TOGGLE_WALL_VIEW );
		}
		else
		{
			UnclickEditorButton( BUILDING_TOGGLE_WALL_VIEW );
		}
		//Name could be a bit misleading.  It'll hide or show the walls based on the
		//fBuildingShowWalls value.
		UpdateWallsView();
	}
}
void DoTaskbar(void)
{
	if(!iTaskMode || iTaskMode == iCurrentTaskbar )
	{
		return;
	}

	gfRenderTaskbar = TRUE;
	
	HideEditorToolbar( iCurrentTaskbar );

	//Special code when exiting previous editor tab
	switch( iCurrentTaskbar )
	{
		case TASK_TERRAIN:
			UnclickEditorButton( TAB_TERRAIN );
			HideTerrainTileButtons();
			break;
		case TASK_BUILDINGS:
			UnclickEditorButton( TAB_BUILDINGS );
			KillTextInputMode();
			break;
		case TASK_ITEMS:
			UnclickEditorButton( TAB_ITEMS );
			HideItemStatsPanel();
			if( eInfo.fActive )
				ClearEditorItemsInfo();
			gfShowPits = FALSE;
			RemoveAllPits();
			break;
		case TASK_MERCS:
			UnclickEditorButton( TAB_MERCS );
			IndicateSelectedMerc( SELECT_NO_MERC );
			SetMercEditingMode( MERC_NOMODE );
			break;
		case TASK_MAPINFO:
			UnclickEditorButton( TAB_MAPINFO );
			ExtractAndUpdateMapInfo();
			KillTextInputMode();
			HideExitGrids();
			break;
		case TASK_OPTIONS:
			UnclickEditorButton( TAB_OPTIONS );
			break;
	}

	//Setup the new tab mode
	iCurrentTaskbar = iTaskMode;
	ShowEditorToolbar( iTaskMode );
	iTaskMode = TASK_NONE;

	//Special code when entering a new editor tab
	switch( iCurrentTaskbar )
	{
		case TASK_MERCS:
			ClickEditorButton( TAB_MERCS );
			ClickEditorButton( MERCS_ENEMY);
			iDrawMode = DRAW_MODE_ENEMY;
			SetMercEditingMode( MERC_TEAMMODE );
			fBuildingShowRoofs = FALSE;
			UpdateRoofsView();
			break;
		case TASK_TERRAIN:
			ClickEditorButton( TAB_TERRAIN );
			ShowTerrainTileButtons();
			SetEditorTerrainTaskbarMode( TERRAIN_FGROUND_TEXTURES );
			break;
		case TASK_BUILDINGS:
			ClickEditorButton( TAB_BUILDINGS );
			if(fBuildingShowRoofs) 
				ClickEditorButton( BUILDING_TOGGLE_ROOF_VIEW );
			if(fBuildingShowWalls)
				ClickEditorButton( BUILDING_TOGGLE_WALL_VIEW );
			if(fBuildingShowRoomInfo)
				ClickEditorButton( BUILDING_TOGGLE_INFO_VIEW );
			if( gfCaves )
			{
				ClickEditorButton( BUILDING_CAVE_DRAWING );
				iDrawMode = DRAW_MODE_CAVES;
			}
			else
			{
				ClickEditorButton( BUILDING_NEW_ROOM );
				iDrawMode = DRAW_MODE_ROOM;
			}
			TerrainTileDrawMode = TERRAIN_TILES_BRETS_STRANGEMODE;
			SetEditorSmoothingMode( gMapInformation.ubEditorSmoothingType );
			gusSelectionType = gusSavedBuildingSelectionType;
			SetupTextInputForBuildings();
			break;
		case TASK_ITEMS:
			SetFont( FONT10ARIAL );
			SetFontForeground( FONT_YELLOW );
			ClickEditorButton( TAB_ITEMS );
			ClickEditorButton( ITEMS_WEAPONS + eInfo.uiItemType - TBAR_MODE_ITEM_WEAPONS );
			InitEditorItemsInfo( eInfo.uiItemType );
			ShowItemStatsPanel();
			gfShowPits = TRUE;
			AddAllPits();
			iDrawMode = DRAW_MODE_PLACE_ITEM;
			break;
		case TASK_MAPINFO:
			ClickEditorButton( TAB_MAPINFO );
			if ( gfFakeLights )
				ClickEditorButton( MAPINFO_TOGGLE_FAKE_LIGHTS );
			ClickEditorButton( MAPINFO_ADD_LIGHT1_SOURCE );
			iDrawMode = DRAW_MODE_LIGHT;
			TerrainTileDrawMode = TERRAIN_TILES_BRETS_STRANGEMODE;
			SetupTextInputForMapInfo();
			break;
		case TASK_OPTIONS:
			ClickEditorButton( TAB_OPTIONS );
			TerrainTileDrawMode = TERRAIN_TILES_NODRAW;
			break;
	}
}
Exemple #7
0
void ChangeLightDefault( INT8 bLightType )
{
    UnclickEditorButton( MAPINFO_PRIMETIME_LIGHT + gbDefaultLightType );
    gbDefaultLightType = bLightType;
    ClickEditorButton( MAPINFO_PRIMETIME_LIGHT + gbDefaultLightType );
}
Exemple #8
0
void SetEditorBuildingTaskbarMode( UINT16 usNewMode )
{
	BOOLEAN fNewRoofs, fNewWalls, fNewRoomInfo;
	if( usNewMode == usCurrentMode )
	{
		ClickEditorButton( usNewMode );
		return;
	}
	usCurrentMode = usNewMode;
	//Unclick all of the building section buttons first -- except the view modes.
	UnclickEditorButton( BUILDING_PLACE_WALLS );
	UnclickEditorButton( BUILDING_PLACE_DOORS );
	UnclickEditorButton( BUILDING_PLACE_WINDOWS );
	UnclickEditorButton( BUILDING_PLACE_ROOFS );
	UnclickEditorButton( BUILDING_PLACE_BROKEN_WALLS );
	UnclickEditorButton( BUILDING_PLACE_FURNITURE );
	UnclickEditorButton( BUILDING_PLACE_DECALS );
	UnclickEditorButton( BUILDING_PLACE_FLOORS );
	UnclickEditorButton( BUILDING_PLACE_TOILETS );
	UnclickEditorButton( BUILDING_SMART_WALLS );
	UnclickEditorButton( BUILDING_SMART_DOORS );
	UnclickEditorButton( BUILDING_SMART_WINDOWS );
	UnclickEditorButton( BUILDING_SMART_BROKEN_WALLS );
	UnclickEditorButton( BUILDING_DOORKEY );
	UnclickEditorButton( BUILDING_NEW_ROOM );
	UnclickEditorButton( BUILDING_NEW_ROOF );
	UnclickEditorButton( BUILDING_CAVE_DRAWING );
	UnclickEditorButton( BUILDING_SAW_ROOM );
	UnclickEditorButton( BUILDING_KILL_BUILDING );
	UnclickEditorButton( BUILDING_COPY_BUILDING );
	UnclickEditorButton( BUILDING_MOVE_BUILDING );
	UnclickEditorButton( BUILDING_DRAW_ROOMNUM );
	ClickEditorButton( usNewMode );

	gfRenderDrawingMode = TRUE;

	//Clicking on certain buttons will automatically activate/deactive certain views.
	switch( usNewMode )
	{
		case BUILDING_KILL_BUILDING://Show everything
			fNewWalls = TRUE;
			fNewRoofs = TRUE;
			fNewRoomInfo = TRUE;
			break;
		case BUILDING_NEW_ROOF:
		case BUILDING_PLACE_ROOFS:
			fNewWalls = TRUE;
			fNewRoofs = TRUE;
			fNewRoomInfo = FALSE;
			break;
		case BUILDING_DRAW_ROOMNUM: //Show room info
		case BUILDING_ERASE_ROOMNUM: //Show room info
			fNewWalls = NO_EFFECT;
			fNewRoofs = gfBasement ? TRUE : FALSE;
			fNewRoomInfo = TRUE;
			break;
		case BUILDING_PLACE_DOORS:
		case BUILDING_PLACE_WINDOWS:
		case BUILDING_PLACE_WALLS:
		case BUILDING_PLACE_BROKEN_WALLS:
		case BUILDING_PLACE_FLOORS:
		case BUILDING_PLACE_TOILETS:
		case BUILDING_PLACE_FURNITURE:
		case BUILDING_PLACE_DECALS:
		case BUILDING_SMART_WALLS:
		case BUILDING_SMART_DOORS:
		case BUILDING_SMART_WINDOWS:
		case BUILDING_SMART_BROKEN_WALLS:
		case BUILDING_DOORKEY:
		case BUILDING_SAW_ROOM:
		case BUILDING_NEW_ROOM:
		case BUILDING_COPY_BUILDING:
		case BUILDING_MOVE_BUILDING:
		case BUILDING_CAVE_DRAWING:
			fNewRoofs = gfBasement ? TRUE : FALSE;
			fNewWalls =	TRUE;
			fNewRoomInfo = FALSE;
			if( usNewMode == BUILDING_PLACE_FLOORS )
				gusSelectionType = gusSavedSelectionType;
			break;
		default:
			return;
	}
	UnclickEditorButton( BUILDING_TOGGLE_INFO_VIEW );
	if( fNewWalls != NO_EFFECT && fNewWalls != fBuildingShowWalls )
	{
		if( fNewWalls )
			ClickEditorButton( BUILDING_TOGGLE_WALL_VIEW );
		else
			UnclickEditorButton( BUILDING_TOGGLE_WALL_VIEW );
		fBuildingShowWalls = fNewWalls;
		UpdateWallsView();
	}
	if( fNewRoofs != NO_EFFECT && fNewRoofs != fBuildingShowRoofs )
	{
		if( fNewRoofs )
			ClickEditorButton( BUILDING_TOGGLE_ROOF_VIEW );
		else
			UnclickEditorButton( BUILDING_TOGGLE_ROOF_VIEW );
		fBuildingShowRoofs = fNewRoofs;
		UpdateRoofsView();
	}
	if( fNewRoomInfo != NO_EFFECT && fNewRoomInfo != fBuildingShowRoomInfo )
	{
		if( fNewRoomInfo )
			ClickEditorButton( BUILDING_TOGGLE_INFO_VIEW );
		else
			UnclickEditorButton( BUILDING_TOGGLE_INFO_VIEW );
		fBuildingShowRoomInfo = fNewRoomInfo;
		gfRenderWorld = TRUE;
	}
}
Exemple #9
0
void SetEditorMapInfoTaskbarMode( UINT16 usNewMode )
{
	BOOLEAN fShowExitGrids = FALSE;
	UnclickEditorButton( MAPINFO_ADD_LIGHT1_SOURCE );
	UnclickEditorButton( MAPINFO_DRAW_EXITGRIDS );
	UnclickEditorButton( MAPINFO_NORTH_POINT );
	UnclickEditorButton( MAPINFO_WEST_POINT );
	UnclickEditorButton( MAPINFO_CENTER_POINT );
	UnclickEditorButton( MAPINFO_EAST_POINT );
	UnclickEditorButton( MAPINFO_SOUTH_POINT );
	UnclickEditorButton( MAPINFO_ISOLATED_POINT );
	ClickEditorButton( usNewMode );
	switch( usNewMode )
	{
		case MAPINFO_ADD_LIGHT1_SOURCE:
			iDrawMode = DRAW_MODE_LIGHT;
			break;
		case MAPINFO_DRAW_EXITGRIDS:
			iDrawMode = DRAW_MODE_EXITGRID;
			gusSelectionType = gusSavedSelectionType;
			fShowExitGrids = TRUE;
			break;
		case MAPINFO_NORTH_POINT:
			iDrawMode = DRAW_MODE_NORTHPOINT;
			break;
		case MAPINFO_WEST_POINT:
			iDrawMode = DRAW_MODE_WESTPOINT;
			break;
		case MAPINFO_EAST_POINT:
			iDrawMode = DRAW_MODE_EASTPOINT;
			break;
		case MAPINFO_SOUTH_POINT:
			iDrawMode = DRAW_MODE_SOUTHPOINT;
			break;
		case MAPINFO_CENTER_POINT:
			iDrawMode = DRAW_MODE_CENTERPOINT;
			break;
		case MAPINFO_ISOLATED_POINT:
			iDrawMode = DRAW_MODE_ISOLATEDPOINT;
			break;
		case MAPINFO_RADIO_NORMAL:
			SetEditorSmoothingMode( SMOOTHING_NORMAL );
			gfRenderTaskbar = TRUE;
			break;
		case MAPINFO_RADIO_BASEMENT:
			SetEditorSmoothingMode( SMOOTHING_BASEMENT );
			gfRenderTaskbar = TRUE;
			break;
		case MAPINFO_RADIO_CAVES:
			SetEditorSmoothingMode( SMOOTHING_CAVES );
			gfRenderTaskbar = TRUE;
			break;
	}
	if( fShowExitGrids )
	{
		ShowExitGrids();
	}
	else
	{
		HideExitGrids();
	}
}
Exemple #10
0
void SetEditorItemsTaskbarMode( UINT16 usNewMode )
{
	UnclickEditorButtons( ITEMS_WEAPONS, ITEMS_RANDOMITEM );
	switch( usNewMode )
	{
		case ITEMS_WEAPONS:
			ClickEditorButton( ITEMS_WEAPONS );
			iEditorToolbarState = TBAR_MODE_ITEM_WEAPONS;
			break;
		case ITEMS_AMMO:
			ClickEditorButton( ITEMS_AMMO );
			iEditorToolbarState = TBAR_MODE_ITEM_AMMO;
			break;
		case ITEMS_ARMOUR:
			ClickEditorButton( ITEMS_ARMOUR );
			iEditorToolbarState = TBAR_MODE_ITEM_ARMOUR;
			break;
		case ITEMS_LBEGEAR:
			ClickEditorButton( ITEMS_LBEGEAR );
			iEditorToolbarState = TBAR_MODE_ITEM_LBEGEAR;
			break;
		case ITEMS_EXPLOSIVES:
			ClickEditorButton( ITEMS_EXPLOSIVES );
			iEditorToolbarState = TBAR_MODE_ITEM_EXPLOSIVES;
			break;
		case ITEMS_EQUIPMENT1:
			ClickEditorButton( ITEMS_EQUIPMENT1 );
			iEditorToolbarState = TBAR_MODE_ITEM_EQUIPMENT1;
			break;
		case ITEMS_EQUIPMENT2:
			ClickEditorButton( ITEMS_EQUIPMENT2 );
			iEditorToolbarState = TBAR_MODE_ITEM_EQUIPMENT2;
			break;
		case ITEMS_EQUIPMENT3:
			ClickEditorButton( ITEMS_EQUIPMENT3 );
			iEditorToolbarState = TBAR_MODE_ITEM_EQUIPMENT3;
			break;
		case ITEMS_TRIGGERS:
			ClickEditorButton( ITEMS_TRIGGERS );
			iEditorToolbarState = TBAR_MODE_ITEM_TRIGGERS;
			break;
		case ITEMS_KEYS:
			ClickEditorButton( ITEMS_KEYS );
			iEditorToolbarState = TBAR_MODE_ITEM_KEYS;
			break;
		case ITEMS_RANDOMITEM:
			ClickEditorButton( ITEMS_RANDOMITEM );
			iEditorToolbarState = TBAR_MODE_ITEM_RANDOMITEM;
			break;
	}
}
Exemple #11
0
void SetEditorTerrainTaskbarMode( UINT16 usNewMode )
{
	UnclickEditorButton( TERRAIN_FGROUND_TEXTURES );
	UnclickEditorButton( TERRAIN_BGROUND_TEXTURES );
	UnclickEditorButton( TERRAIN_PLACE_CLIFFS );
	UnclickEditorButton( TERRAIN_PLACE_ROADS );//dnl Without this road button always remain in clicked state
	UnclickEditorButton( TERRAIN_PLACE_DEBRIS );
	UnclickEditorButton( TERRAIN_PLACE_TREES );
	UnclickEditorButton( TERRAIN_PLACE_ROCKS );
	UnclickEditorButton( TERRAIN_PLACE_MISC );
	UnclickEditorButton( TERRAIN_FILL_AREA );
	TerrainTileDrawMode=0;

	gfRenderDrawingMode = TRUE;

	switch( usNewMode )
	{
		case TERRAIN_FGROUND_TEXTURES:
			TerrainTileDrawMode = TERRAIN_TILES_FOREGROUND;
			ClickEditorButton( TERRAIN_FGROUND_TEXTURES );
			iDrawMode = DRAW_MODE_GROUND;
			gusSelectionType = gusSavedSelectionType;
			break;
		case TERRAIN_BGROUND_TEXTURES:
			TerrainTileDrawMode = TERRAIN_TILES_BACKGROUND;
			ClickEditorButton( TERRAIN_BGROUND_TEXTURES );
			iDrawMode = DRAW_MODE_NEW_GROUND;
			break;
		case TERRAIN_PLACE_CLIFFS:
			ClickEditorButton( TERRAIN_PLACE_CLIFFS );
			iDrawMode = DRAW_MODE_BANKS;
			break;
		case TERRAIN_PLACE_ROADS:
			ClickEditorButton( TERRAIN_PLACE_ROADS );
			iDrawMode = DRAW_MODE_ROADS;
			break;
		case TERRAIN_PLACE_DEBRIS:
			ClickEditorButton( TERRAIN_PLACE_DEBRIS );
			iDrawMode = DRAW_MODE_DEBRIS;
			gusSelectionType = gusSavedSelectionType;
			break;
		case TERRAIN_PLACE_TREES:
			ClickEditorButton( TERRAIN_PLACE_TREES );
			iDrawMode = DRAW_MODE_OSTRUCTS;
			gusSelectionType = gusSavedSelectionType;
			break;
		case TERRAIN_PLACE_ROCKS:
			ClickEditorButton( TERRAIN_PLACE_ROCKS );
			iDrawMode = DRAW_MODE_OSTRUCTS1;
			gusSelectionType = gusSavedSelectionType;
			break;
		case TERRAIN_PLACE_MISC:
			ClickEditorButton( TERRAIN_PLACE_MISC );
			iDrawMode = DRAW_MODE_OSTRUCTS2;
			gusSelectionType = gusSavedSelectionType;
			break;
		case TERRAIN_FILL_AREA:
			ClickEditorButton( TERRAIN_FILL_AREA );
			iDrawMode = DRAW_MODE_FILL_AREA + DRAW_MODE_GROUND;
			TerrainTileDrawMode=1;
			break;
	}
}
Exemple #12
0
void SpecifyItemToEdit( OBJECTTYPE *pItem, INT32 iMapIndex )
{
	//Set the global item pointer to point to the new item
	if( gpItem == pItem )
		return;
	if( gpItem != pItem )
	{
		ExecuteItemStatsCmd( ITEMSTATS_APPLY );
		RemoveItemGUI();
		gpItem = pItem;
		if( gpItemPool )
		{
			gpEditingItemPool = gpItemPool;
		}
		gsItemGridNo = (INT16)iMapIndex;
	}
	else
		RemoveItemGUI();

	gfRenderTaskbar = TRUE;

	if( !gpItem )
	{
		//Hide all edit features.
		gbEditingMode = EDITING_NOTHING;
		gsItemGridNo = -1;
		return;
	}

	//Setup the text mode
	InitTextInputModeWithScheme( DEFAULT_SCHEME );

	if( iCurrentTaskbar == TASK_ITEMS )
		ShowEditorButton( ITEMSTATS_HIDDEN_BTN );

	//Determine the type of item so that we can determine the dynamic editing mode.
	AddUserInputField( NULL );

	SetupGameTypeFlags();

	if( Item[ gpItem->usItem ].usItemClass == IC_MONEY )
	{
		gbEditingMode = EDITING_MONEY;
		SetupMoneyGUI();
	}
	else if( gpItem->usItem == ACTION_ITEM )
	{
		gbEditingMode = EDITING_ACTIONITEMS;
		SetupActionItemsGUI();
		HideEditorButton( ITEMSTATS_HIDDEN_BTN );
	}
	else if( gpItem->usItem == SWITCH )
	{
		gbEditingMode = EDITING_TRIGGERS;
		SetupTriggersGUI();
		HideEditorButton( ITEMSTATS_HIDDEN_BTN );
	}
	else if( gpItem->usItem == OWNERSHIP )
	{
		gbEditingMode = EDITING_OWNERSHIP;
		SetupOwnershipGUI();
		HideEditorButton( ITEMSTATS_HIDDEN_BTN );
	}
	else switch( Item[ gpItem->usItem ].usItemClass )
	{
		case IC_GUN:
			gbEditingMode = EDITING_GUNS;
			SetupGunGUI();
			break;
		case IC_AMMO:
			gbEditingMode = EDITING_AMMO;
			SetupAmmoGUI();
			break;
		case IC_ARMOUR:
			gbEditingMode = EDITING_ARMOUR;
			SetupArmourGUI();
			break;
		case IC_MEDKIT:
		case IC_KIT:
		case IC_MISC:
		case IC_FACE:
		case IC_BLADE:
		case IC_LAUNCHER:
		case IC_THROWING_KNIFE:
		case IC_MONEY:
			gbEditingMode = EDITING_EQUIPMENT;
			SetupEquipGUI();
			break;
		case IC_THROWN:
		case IC_GRENADE:
		case IC_EXPLOSV:
		case IC_BOMB:
			gbEditingMode = EDITING_EXPLOSIVES;
			SetupExplosivesGUI();
			break;
		case IC_KEY:
			gbEditingMode = EDITING_KEYS;
			SetupKeysGUI();
			break;
		case IC_PUNCH:
			if ( gpItem->usItem != NOTHING)
			{
				gbEditingMode = EDITING_EQUIPMENT;
				SetupEquipGUI();
				break;
			}
			// else fall through and act as nothing
		case IC_NONE:
			gbEditingMode = EDITING_NOTHING;
			if( !(gpItem->fFlags & OBJECT_UNDROPPABLE) )
				gbEditingMode = EDITING_DROPPABLE;
			break;
		default:
			gbEditingMode = EDITING_NOT_YET_IMPLEMENTED;
			break;
	}
	if( gpItemPool )
	{
		if( gWorldItems[ gpItemPool->iItemIndex ].bVisible == INVISIBLE )
		{
			UnclickEditorButton( ITEMSTATS_HIDDEN_BTN );
			ShowSelectedItem();
		}
		else
		{
			ClickEditorButton( ITEMSTATS_HIDDEN_BTN );
			HideSelectedItem();
		}
	}
}