
//PANEL* pannelObjectEditStart =
//{
//	pos_x = 0; pos_y = 60;
//	bmap = "editObjectPanel.tga";//   
//	//flags = SHOW;
//	layer = 2;
//}
//
//PANEL* pannelObjectEditList =
//{
//	pos_x = 10; pos_y = 95;
//	bmap = "editObjectPanelList.tga";//   
//	//flags = SHOW;
//	layer = 1;
//
//}
//
//PANEL* pannelObjectEditEnde =
//{
//	pos_x = 0; 
//	pos_y = 0;
//	bmap = "editObjectPanelEnde.tga";//   
//	//flags = SHOW;
//layer = 3;
//}





PANEL* subwindow =
{
	pos_x = 0; pos_y = 10;
	bmap = "subwindow.tga";//   
	flags = SHOW;
}

PANEL* titel_leiste = 
{
	pos_x = 0; pos_y = 0;
	bmap = "Titel_Leiste.tga";//                            functionOn       functionOver
	button_radio(5, 2, "TE_Pic_Over.tga", "TE_Pic.tga", "TE_Pic_Over.tga", terrain_mode, reset_all_text_info, info_over_terrain); //terrain mode
	button_radio(40, 2, "OBJ_Pic_Over.tga", "OBJ_Pic.tga", "OBJ_Pic_Over.tga", object_mode, reset_all_text_info, info_over_object); //Object Mode
	button_radio(75, 2, "ASS_E_Pic_Over.tga", "ASS_E_Pic.tga", "ASS_E_Pic_Over.tga", ped_mode,reset_all_text_info , info_over_ped); //ped Mode
	button_radio(110, 2, "mon_Pic_over.tga", "mon_Pic.tga", "mon_Pic_Over.tga", monster_mode, reset_all_text_info,info_over_monster ); //ped Mode
	layer = 0;
	//flags = SHOW;

}

PANEL* terrain_edit_leiste = 
{
	pos_x = 150; pos_y = 0;
	bmap = "Status_leiste.tga";//    	functionOn       functionOver
	
	button_radio(5, 2, "TE_E_Pic_Over.tga", "TE_E_Pic.tga", "TE_E_Pic_Over.tga", terrain_erode, reset_all_text_info, info_over_terrain_deform);
	button_radio(40, 2 , "TE_k_Pic_Over.tga", "TE_k_Pic.tga", "TE_k_Pic_Over.tga", terrain_sethigh, reset_all_text_info, info_over_terrain_setgroundto);
	button_radio(75, 2 , "TE_s_Pic_Over.tga", "TE_S_Pic.tga", "TE_S_Pic_Over.tga", terrain_smooth, reset_all_text_info, info_over_terrain_smooth);
	
	hslider (124, 9, 103, "slider.tga", 0, 1000, range);
	hslider (246, 9, 103, "slider.tga", 0, 40, EditSpeed);
	hslider (368, 9, 103, "slider.tga", 0, 10240, terrain_high);
	layer = 1;

}

PANEL* object_edit_leiste =
{
	pos_x = 150; pos_y = 0;
	bmap = "OBJ_E_leiste.tga";// 
	button_radio(5, 2, "o_transform_3.tga", "o_transform_1.tga", "o_transform_2.tga", transform_obj_move, reset_all_text_info, info_over_transform_object); //Transform
	button_radio(40, 2, "o_rotate_3.tga", "o_rotate_1.tga", "o_rotate_2.tga", trasform_obj_rotade, reset_all_text_info, info_over_rotate_object); //Rotate

	button(75, 2, "o_add_2.tga", "o_add_1.tga", "o_add_2.tga", NULL, reset_all_text_info, info_over_add_object); //Add
	button(110, 2, "o_clone_2.tga", "o_clone_1.tga", "o_clone_2.tga", NULL, reset_all_text_info, info_over_clone_object); //Clone
	button(145, 2, "o_delete_2.tga", "o_delete_1.tga", "o_delete_2.tga", NULL, reset_all_text_info, info_over_delete_object); //Delete
}

PANEL* monster_edit_leiste =
{
	pos_x = 150; pos_y = 0;
	bmap = "OBJ_E_leiste.tga";// 
	button_radio(5, 2, "o_transform_3.tga", "o_transform_1.tga", "o_transform_2.tga", NULL, reset_all_text_info, info_over_transform_object); //Transform
	button(40, 2, "o_add_2.tga", "o_add_1.tga", "o_add_2.tga", NULL, reset_all_text_info, info_over_add_object); //Add
	button(75, 2, "o_clone_2.tga", "o_clone_1.tga", "o_clone_2.tga", NULL, reset_all_text_info, info_over_clone_object); //Clone
	button(110, 2, "o_delete_2.tga", "o_delete_1.tga", "o_delete_2.tga", NULL, reset_all_text_info, info_over_delete_object); //Delete
}


void transform_obj_move()
{
	buttoun_state = 1;
	set(rotate_pan,INVISIBLE);
	set(rotate_tilt,INVISIBLE);
	
	reset(obj_z_Pfeil,INVISIBLE);
	reset(obj_y_Pfeil,INVISIBLE);
	reset(obj_x_Pfeil,INVISIBLE);
}

void trasform_obj_rotade()
{
	buttoun_state = 2;
	reset(rotate_pan,INVISIBLE);
	reset(rotate_tilt,INVISIBLE);
	set(obj_z_Pfeil,INVISIBLE);
	set(obj_y_Pfeil,INVISIBLE);
	set(obj_x_Pfeil,INVISIBLE);
}

void transform_obj_reset()
{
	buttoun_state = 0;
	set(rotate_pan,INVISIBLE);
	set(rotate_tilt,INVISIBLE);
	set(obj_z_Pfeil,INVISIBLE);
	set(obj_y_Pfeil,INVISIBLE);
	set(obj_x_Pfeil,INVISIBLE);
}

PANEL* ped_edit_leiste =
{
	pos_x = 150; pos_y = 0;
}

PANEL* monster_edit_leiste =
{
	pos_x = 150; pos_y = 0;
}

FONT* arial_font = "Arial#16b";

TEXT* Terrain_editor_TXT =	
{
  layer = 0;
  pos_x = 5;
  pos_y = 40;
  font = arial_font;
  string ("Terrain Editor");
  red=255;
  green=255;
  blue=0;
} 

TEXT* Object_editor_TXT =	
{
  layer = 0;
  pos_x = 5;
  pos_y = 40;
  font = arial_font;
  string ("Object Editor");
  red=255;
  green=255;
  blue=0;
} 

TEXT* Ped_editor_TXT =	
{
  layer = 0;
  pos_x = 5;
  pos_y = 40;
  font = arial_font;
  string ("PED Generator");
  red=255;
  green=255;
  blue=0;
} 

TEXT* Monster_editor_TXT =	
{
  layer = 0;
  pos_x = 5;
  pos_y = 40;
  font = arial_font;
  string ("Monster Spawn Editor");
  red=255;
  green=255;
  blue=0;
} 

TEXT* deform_terrain_TXT =	
{
  layer = 0;
  pos_x = 5;
  pos_y = 40;
  font = arial_font;
  string ("Deform Terrain");
  red=255;
  green=255;
  blue=0;
} 

TEXT* SetGroundto_terrain_TXT =	
{
  layer = 0;
  pos_x = 5;
  pos_y = 40;
  font = arial_font;
  string ("Set Ground High");
  red=255;
  green=255;
  blue=0;
} 

TEXT* Smooth_terrain_TXT =	
{
  layer = 0;
  pos_x = 5;
  pos_y = 40;
  font = arial_font;
  string ("Smooth Terrain");
  red=255;
  green=255;
  blue=0;
} 

TEXT* Object_transform_TXT =	
{
  layer = 0;
  pos_x = 5;
  pos_y = 40;
  font = arial_font;
  string ("Transform Object");
  red=255;
  green=255;
  blue=0;
} 

TEXT* Object_rotate_TXT =	
{
  layer = 0;
  pos_x = 5;
  pos_y = 40;
  font = arial_font;
  string ("Rotate Object");
  red=255;
  green=255;
  blue=0;
} 

TEXT* Object_add_TXT =	
{
  layer = 0;
  pos_x = 5;
  pos_y = 40;
  font = arial_font;
  string ("Add Object");
  red=255;
  green=255;
  blue=0;
} 

TEXT* Object_clone_TXT =	
{
  layer = 0;
  pos_x = 5;
  pos_y = 40;
  font = arial_font;
  string ("Clone Object");
  red=255;
  green=255;
  blue=0;
} 

TEXT* Object_delete_TXT =	
{
  layer = 0;
  pos_x = 5;
  pos_y = 40;
  font = arial_font;
  string ("Delete Object");
  red=255;
  green=255;
  blue=0;
} 

void info_over_delete_object(){set(Object_delete_TXT,SHOW);	}
void info_over_clone_object(){set(Object_clone_TXT,SHOW);}
void info_over_add_object(){set(Object_add_TXT,SHOW);}
void info_over_transform_object(){set(Object_transform_TXT,SHOW);}
void info_over_rotate_object(){set(Object_rotate_TXT,SHOW);	}
void info_over_terrain_deform(){set(deform_terrain_TXT,SHOW);}
void info_over_terrain_setgroundto(){set(SetGroundto_terrain_TXT,SHOW);}
void info_over_terrain_smooth(){set(Smooth_terrain_TXT,SHOW);}
void info_over_terrain(){set(Terrain_editor_TXT,SHOW);}
void info_over_object(){set(Object_editor_TXT,SHOW);}
void info_over_monster(){set(Monster_editor_TXT,SHOW);}
void info_over_ped(){set(Ped_editor_TXT,SHOW);}

void reset_all_text_info()
{
	reset(Ped_editor_TXT,SHOW);
	reset(Monster_editor_TXT,SHOW);
	reset(Object_editor_TXT,SHOW);
	reset(Terrain_editor_TXT,SHOW);
	reset(Smooth_terrain_TXT,SHOW);
	reset(SetGroundto_terrain_TXT,SHOW);
	reset(deform_terrain_TXT,SHOW);
	reset(Object_rotate_TXT,SHOW);
	reset(Object_transform_TXT,SHOW);
	reset(Object_add_TXT,SHOW);
	reset(Object_clone_TXT,SHOW);
	reset(Object_delete_TXT,SHOW);
}

void terrain_mode()
{
	reset(object_edit_leiste,SHOW);
	reset(ped_edit_leiste,SHOW);
	reset(monster_edit_leiste,SHOW);
	set(terrain_edit_leiste,SHOW);
	transform_obj_reset();
	EditorModus = EDITOR_MODE_TERRAIN;
}

void object_mode()
{
	set(object_edit_leiste,SHOW);
	reset(ped_edit_leiste,SHOW);
	reset(monster_edit_leiste,SHOW);
	reset(terrain_edit_leiste,SHOW);
	Editor_Mode = EDITOR_MODE_NONE;
	button_state(terrain_edit_leiste,1,0);
	button_state(terrain_edit_leiste,2,0);
	button_state(terrain_edit_leiste,3,0);

	EditorModus = EDITOR_MODE_OBJECTS;
}

void ped_mode()
{
	reset(object_edit_leiste,SHOW);
	set(ped_edit_leiste,SHOW);
	reset(monster_edit_leiste,SHOW);
	reset(terrain_edit_leiste,SHOW);
	Editor_Mode = EDITOR_MODE_NONE;
	transform_obj_reset();
	button_state(terrain_edit_leiste,1,0);
	button_state(terrain_edit_leiste,2,0);
	button_state(terrain_edit_leiste,3,0);
	EditorModus = EDITOR_MODE_PED;
}

void monster_mode()
{
	reset(object_edit_leiste,SHOW);
	reset(ped_edit_leiste,SHOW);
	set(monster_edit_leiste,SHOW);
	reset(terrain_edit_leiste,SHOW);
	transform_obj_reset();
	Editor_Mode = EDITOR_MODE_NONE;
	button_state(terrain_edit_leiste,1,0);
	button_state(terrain_edit_leiste,2,0);
	button_state(terrain_edit_leiste,3,0);
	//EditorModus = EDITOR_MODE_MONSTER;
}