LBG_COMBOBOX* combobox1 = 0;
void combobox_clicked()
{
wait(1);
//object_category_string
str_cpy(object_category_string, combobox1->caption);
call_kategorie(-kategorie);
if(edit_property_text_open == 1)
{
empty_texture_list();
change_texture_list(wich_skinnumber);
}
}
STRING* combobox_category = "";
void call_file_category()
{
var ysize = screen_size.y-(bmap_height(bmedit_gui_top)+(bmap_height(bmedit_gui_bottom)+128));
var xsize = bmap_width(bmedit_gui_lm)-6;
var yposition = bmap_height(bmedit_gui_top)+128;
combobox1 = LBG_create_combobox(0, 0, yposition, xsize, 4, 4, "1 - Vatikan", LBG_ebmaps(editbox_left_tga,editbox_middle_tga,editbox_right_tga), 4, 4, xsize-4, &listbox_bmaps, LBG_bbmaps(combobox_button1_tga,combobox_button2_tga,combobox_button3_tga,combobox_button1_tga,combobox_button2_tga,combobox_button1_tga), CBF_SHOW);
combobox1->menu->layer = 2010;
combobox1->editbox->layer = 2010;
combobox1->button->layer = 2010;
combobox1->layer = 2010;
combobox1->menu->font = list_font;
combobox1->menu->itemheight = 20;
combobox1->menu->bmaps_over.bmap_left = listitem_over_left_tga;
combobox1->menu->bmaps_over.bmap_middle = listitem_over_middle_tga;
combobox1->menu->bmaps_over.bmap_right = listitem_over_right_tga;
combobox1->menu->bmaps_marked.bmap_left = listitem_marked_left_tga;
combobox1->menu->bmaps_marked.bmap_middle = listitem_marked_middle_tga;
combobox1->menu->bmaps_marked.bmap_right = listitem_marked_right_tga;
var fhandle;
fhandle= file_open_read("kdata.nfg");
while(1)
{
file_str_read(fhandle, combobox_category);
if(str_cmpi(combobox_category, "ENDE") == 0)
{LBG_create_listitem(combobox1->menu, 100, combobox_category, 0);}
else
{break;}
wait(1);
}
file_close(fhandle);
vec_set(combobox1->menu->color_default,vector(1,1,1));
vec_set(combobox1->menu->color_over,vector(255,1,1));
vec_set(combobox1->menu->color_marked,vector(1,1,1));
LBG_editbox_set_text_color(combobox1->editbox,vector(1,1,1));
combobox1->menu->Select=combobox_clicked; //giving each listitem the select function
LBG_update_combobox(combobox1);
}