default:
if(it >= 0)
{
- cur_tilegroup
- = select_tilegroup_menu->get_item_by_id(it).text;
+ cur_tilegroup = select_tilegroup_menu->get_item_by_id(it).text;
Menu::set_current(0);
cur_objects = "";
select_tilegroup_menu->arrange_left = true;
select_tilegroup_menu->additem(MN_LABEL,"Tilegroup",0,0);
select_tilegroup_menu->additem(MN_HL,"",0,0);
+ select_tilegroup_menu->additem(MN_ACTION,"asd",0,0);
std::set<TileGroup>* tilegroups = TileManager::tilegroups();
int tileid = 1;
for(std::set<TileGroup>::iterator it = tilegroups->begin();
le_world->get_level()->song_title = string_list_active(level_settings_menu->get_item_by_id(MNID_SONG).list);
le_world->get_level()->change_size(atoi(level_settings_menu->get_item_by_id(MNID_LENGTH).input));
- le_world->get_level()->time_left = atoi(level_settings_menu->get_item_by_id(MNID_BGIMG).input);
+ le_world->get_level()->time_left = atoi(level_settings_menu->get_item_by_id(MNID_TIME).input);
le_world->get_level()->gravity = atof(level_settings_menu->get_item_by_id(MNID_GRAVITY).input);
le_world->get_level()->bkgd_speed = atoi(level_settings_menu->get_item_by_id(MNID_BGSPEED).input);
le_world->get_level()->bkgd_top.red = atoi(level_settings_menu->get_item_by_id(MNID_TopRed).input);
/* draw whats inside stuff when cursor is selecting those */
/* (draw them all the time - is this the right behaviour?) */
- if(TileManager::instance()->get(le_world->get_level()->ia_tiles[y][x + (int)(pos_x / 32)])->editor_images.size() > 0)
+ if(!TileManager::instance()->get(le_world->get_level()->ia_tiles[y][x + (int)(pos_x / 32)])->editor_images.empty())
TileManager::instance()->get(le_world->get_level()->ia_tiles[y][x + (int)(pos_x / 32)])->editor_images[0]->draw( x * 32 - ((int)pos_x % 32), y*32);
}
static TileManager* instance() { return instance_ ? instance_ : instance_ = new TileManager(); }
static void destroy_instance() { delete instance_; instance_ = 0; }
- static std::set<TileGroup>* tilegroups() { return tilegroups_ ? tilegroups_ : tilegroups_ = new std::set<TileGroup>; }
+ static std::set<TileGroup>* tilegroups() { if(!instance_) { instance_ = new TileManager(); } return tilegroups_ ? tilegroups_ : tilegroups_ = new std::set<TileGroup>; }
Tile* get(unsigned int id) {
if(id < tiles.size())
{