Beispiel #1
0
//	When the mouse is over an achievement, display the details window.
//
static int achievements_child_display_handler(window_info *win)
{
	if (!win || !win->data)
		return 0;
	size_t index = *reinterpret_cast<size_t *>(win->data);
	Achievements_System *as = Achievements_System::get_instance();

	as->prepare_details(index);

	const Achievement * achievement = as->achievement(index);
	if (achievement)
	{
		int title_x = (win->len_x - achievement->get_title().size() * as->get_font_x()) / 2;

		glColor3f(newcol_r, newcol_g, newcol_b);
		draw_string_small_zoomed(title_x + gx_adjust, as->get_border() + gy_adjust,
			reinterpret_cast<const unsigned char *>(achievement->get_title().c_str()), 1, as->get_current_scale());

		glColor3f(1.0f, 1.0f, 1.0f);
		for (size_t i=0; i<achievement->get_text().size(); ++i)
			draw_string_small_zoomed(as->get_border() + gx_adjust, (i + 1) * as->get_font_y() + gy_adjust,
				reinterpret_cast<const unsigned char *>(achievement->get_text()[i].c_str()), 1, as->get_current_scale());
	}
	else
	{
		glColor3f(newcol_r, newcol_g, newcol_b);
		std::ostringstream buf;
		buf << "Undefined " << index;
		int title_x = (win->len_x - buf.str().size() * as->get_font_x()) / 2;
		draw_string_small_zoomed(title_x + gx_adjust, as->get_border() + gy_adjust,
			reinterpret_cast<const unsigned char *>(buf.str().c_str()), 1, as->get_current_scale());
	}

	return 1;
}
Beispiel #2
0
void draw_string_small_shadowed_zoomed(int x, int y,const unsigned char * our_string,int max_lines, float fr, float fg, float fb, float br, float bg, float bb, float text_zoom)
{
	int px,py;
	//set shadow colour
	glColor4f(br, bg, bb, 0.25f);
	for(px=-1;px<2;px++)
		for(py=-1;py<2;py++)
			if(px!=0 || py!=0)
				draw_string_small_zoomed(x+px, y+py, our_string, max_lines, text_zoom);
	//set foreground colour
	glColor4f(fr, fg, fb, 1.0f);
	draw_string_small_zoomed(x, y, our_string, max_lines, text_zoom);
}
Beispiel #3
0
static int display_buddy_handler(window_info *win)
{
	int i = 0;
	int y = buddy_border_space;
	int offset = 0;

	glEnable(GL_TEXTURE_2D);
	// Draw buddies
	qsort(buddy_list,MAX_BUDDY,sizeof(_buddy),buddy_list_name_cmp);

	offset = vscrollbar_get_pos (win->window_id, buddy_scroll_id);
	if (offset >= 0)
	{
		for (i = offset; i < offset + num_displayed_buddies; i++)
		{
			switch(buddy_list[i].type){
				case 0:glColor3f(1.0,1.0,1.0);break;
				case 1:glColor3f(1.0,0,0);break;
				case 2:glColor3f(0,1.0,0);break;
				case 3:glColor3f(0.25,0.5,1.0);break;
				case 4:glColor3f(1.0,1.0,0);break;
				case 0xFE:glColor3f(0.5,0.55,0.60);break;
				default:glColor3f(1.0,1.0,1.0);//invalid number? make it white
			}
			draw_string_small_zoomed(buddy_border_space, y, (unsigned char*)buddy_list[i].name, 1, win->current_scale);
			y += buddy_name_step_y;
		}
	}
	//Draw a button for the requests
	if(!queue_isempty(buddy_request_queue)) {
		glDisable(GL_TEXTURE_2D);
		//glColor3f(0.77f, 0.59f, 0.77f);
		glColor3f(0.3, 1, 0.3);
		glBegin(GL_LINE_LOOP);
			glVertex2i(request_box_start_x - win->small_font_len_x, 0);
			glVertex2i(request_box_start_x, win->small_font_len_y + 1);
			glVertex2i(win->len_x - win->box_size - 1, win->small_font_len_y + 1);
			glVertex2i(win->len_x - win->box_size - 1, 0);
		glEnd();
		glEnable(GL_TEXTURE_2D);
		draw_string_small_zoomed(request_box_start_x + win->small_font_len_x + gx_adjust, 2 + gy_adjust, (unsigned char*)buddy_request_str, 1, win->current_scale);
	}
	glColor3f(newcol_r, newcol_g, newcol_b);
#ifdef OPENGL_TRACE
CHECK_GL_ERRORS();
#endif //OPENGL_TRACE
	return 1;
}
Beispiel #4
0
static int display_accept_buddy_handler(window_info *win)
{
	if(win != NULL) {
		int i;
		
		glColor3f(newcol_r, newcol_g, newcol_b);
		for(i = 0; i < MAX_ACCEPT_BUDDY_WINDOWS; i++) {
			if(accept_windows[i].window_id == win->window_id) {
				draw_string_small_zoomed(buddy_border_space, buddy_border_space, (unsigned char*)accept_windows[i].text, 2, win->current_scale);
				break;
			}
		}
		return 1;
	} else {
		return 0;
	}
}
Beispiel #5
0
//	Display the main window.  All the players achievemnt icons and the controls.
//	Handle the mouse over events for the icons and the controls.
//
int Achievements_Window::display_handler(window_info *win)
{
	Achievements_System *as = Achievements_System::get_instance();

	int icon_per = (256 / as->get_size());
	int icon_per_texture = icon_per * icon_per;
	bool another_page = false;

	glEnable(GL_TEXTURE_2D);
	glColor3f(1.0f,1.0f,1.0f);

	for (size_t i=first; i<their_achievements.size(); ++i)
	{
		size_t shown_num = i-first;

		if ((static_cast<int>(shown_num)/as->get_per_row()) >= physical_rows)
		{
			another_page = true;
			break;
		}

		int texture = -1;
		const Achievement * achievement = as->achievement(their_achievements[i]);
		if (achievement)
			texture = as->texture(achievement->get_id() / icon_per_texture);

		if (texture >= 0)
		{
			int cur_item = achievement->get_id() % icon_per_texture;

			float u_start = 1.0f/static_cast<float>(icon_per) * (cur_item % icon_per);
			float u_end = u_start + static_cast<float>(as->get_size())/256;
			float v_start = 1.0f/static_cast<float>(icon_per) * (cur_item / icon_per);
			float v_end = v_start + static_cast<float>(as->get_size()) / 256;
			int start_x = as->get_border() + as->get_display() * (shown_num % as->get_per_row());
			int start_y = as->get_border() + as->get_display() * (shown_num / as->get_per_row());

			bind_texture(texture);
			glEnable(GL_ALPHA_TEST);
			glAlphaFunc(GL_GREATER, 0.05f);
			glBegin(GL_QUADS);
			draw_2d_thing( u_start, v_start, u_end, v_end,
				start_x, start_y, start_x+as->get_display(), start_y+as->get_display() );
			glEnd();
			glDisable(GL_ALPHA_TEST);
		}
		else
		{
			int pos_x = as->get_border() + (shown_num % as->get_per_row()) * as->get_display()
				+ (as->get_display() - win->default_font_len_x) / 2;
			int pos_y = as->get_border() + (shown_num / as->get_per_row()) * as->get_display()
				+ (as->get_display() - win->default_font_len_y) / 2;
			draw_string_zoomed(pos_x+gx_adjust, pos_y+gy_adjust, (const unsigned char *)"?", 1, win->current_scale);
		}
	}

	size_t now_over = Achievement::npos;

	if ((cm_window_shown() == CM_INIT_VALUE) && (win_mouse_x > as->get_border()) && (win_mouse_y > as->get_border()))
	{
		int row = (win_mouse_y - as->get_border()) / as->get_display();
		int col = (win_mouse_x - as->get_border()) / as->get_display();
		if ((row >= 0) && (row < physical_rows) && (col >= 0) && (col < as->get_per_row()))
		{
			size_t current_index = first + row * as->get_per_row() + col;
			if (current_index < their_achievements.size())
				now_over = their_achievements[current_index];
		}
	}

	if (now_over != last_over)
	{
		if (last_over != Achievement::npos)
			hide_window(child_win_id);
		last_over = now_over;
		if (last_over != Achievement::npos)
			open_child();
	}

	int prev_start = gx_adjust + as->get_border();
	int prev_end = prev_start + as->get_font_x() * as->get_prev().size();
	int next_start = prev_end + 2 * as->get_border();
	int next_end = next_start + as->get_font_x() * as->get_next().size();
	int close_start = gx_adjust + win->len_x - (as->get_border() + as->get_font_x() * as->get_close().size());
	int close_end = gx_adjust + win->len_x - as->get_border();

	bool over_controls = (win_mouse_y > (win->len_y - (as->get_font_y() + as->get_border())));
	bool over_close = (over_controls && (win_mouse_x > close_start) && (win_mouse_x < close_end));
	bool over_prev = (over_controls && (win_mouse_x > prev_start) && (win_mouse_x < prev_end));
	bool over_next = (over_controls && (win_mouse_x > next_start) && (win_mouse_x < next_end));

	float active_colour[3] = { 1.0f, 1.0f, 1.0f };
	float inactive_colour[3] =  { 0.5f, 0.5f, 0.5f };
	float mouse_over_colour[3] = { 1.0f, 0.5f, 0.0f };

	glColor3fv((first) ?((over_prev) ?mouse_over_colour :active_colour) :inactive_colour);
	draw_string_small_zoomed(prev_start, gy_adjust + win->len_y - (as->get_font_y() + as->get_border()),
		reinterpret_cast<const unsigned char *>(as->get_prev().c_str()), 1, as->get_current_scale());

	glColor3fv((another_page) ?((over_next) ?mouse_over_colour :active_colour) :inactive_colour);
	draw_string_small_zoomed(next_start, gy_adjust + win->len_y - (as->get_font_y() + as->get_border()),
		reinterpret_cast<const unsigned char *>(as->get_next().c_str()), 1, as->get_current_scale());

	glColor3fv((over_close) ?mouse_over_colour :active_colour);
	draw_string_small_zoomed(close_start, gy_adjust + win->len_y - (as->get_font_y() + as->get_border()),
		reinterpret_cast<const unsigned char *>(as->get_close().c_str()), 1, as->get_current_scale());

	if (over_close && ctrl_clicked)
		as->hide_all();
	if (over_close && clicked)
		hide_window(main_win_id);
	else if (over_prev && first && clicked)
		first -= physical_rows * as->get_per_row();
	else if (over_next && another_page && clicked)
		first += physical_rows * as->get_per_row();

	if (clicked && (over_prev || over_next))
		do_click_sound();
	if ((ctrl_clicked || clicked) && over_close)
		do_window_close_sound();

	if (over_controls && show_help_text)
	{
		if (over_close)
			show_help(as->get_close_help(), 0, win->len_y + as->get_y_win_offset(), win->current_scale);
		else if (over_prev)
			show_help((first)?as->get_prev_help() :as->get_no_prev_help(), 0, win->len_y + as->get_y_win_offset(), win->current_scale);
		else if (over_next)
			show_help((another_page)?as->get_next_help() :as->get_no_next_help(), 0, win->len_y + as->get_y_win_offset(), win->current_scale);
	}

	win_mouse_x = win_mouse_y = -1;
	ctrl_clicked = clicked = false;

	return 1;
}
Beispiel #6
0
static int	display_manufacture_handler(window_info *win)
{
	Uint8 str[80];
	int i;

	// keep the main and recipe windows opacity in sync
	if (recipe_win >= 0)
	{
		static int last_recipes_opaque = -1, last_main_opaque = -1;
		if (win->opaque != last_main_opaque)
			last_recipes_opaque = last_main_opaque = windows_list.window[recipe_win].opaque = win->opaque;
		else if (windows_list.window[recipe_win].opaque != last_recipes_opaque)
			last_recipes_opaque = last_main_opaque = win->opaque = windows_list.window[recipe_win].opaque;
	}

	glColor3f(0.77f,0.57f,0.39f);
	glEnable(GL_TEXTURE_2D);

	glColor3f(1.0f,1.0f,1.0f);
	//ok, now let's draw the objects...
	for(i=35;i>=0;i--){
		if(manufacture_list[i].quantity > 0) {
			int x_start,y_start;
			int use_large = (mouse_over_main_pos == i) && enlarge_text();

			//get the x and y
			x_start=SLOT_SIZE*(i%GRID_COLS)+1;
			y_start=SLOT_SIZE*(i/GRID_COLS);

			draw_item(manufacture_list[i].image_id,x_start,y_start,SLOT_SIZE);

			safe_snprintf((char *)str, sizeof(str), "%i",manufacture_list[i].quantity);
			y_start += (i&1) ? 2 : SLOT_SIZE - ((use_large) ?win->default_font_len_y :win->small_font_len_y);
			if (use_large)
				draw_string_shadowed_zoomed(x_start, y_start, (unsigned char*)str, 1, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, win->current_scale);
			else
				draw_string_small_shadowed_zoomed(x_start, y_start, (unsigned char*)str, 1, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, win->current_scale);
		}
	}

	//ok, now let's draw the mixed objects
	draw_production_pipe(win, pipeline_x,manufacture_menu_y_len-recipe_y_offset, -1);

	//now, draw the inventory text, if any.
	if (last_items_string_id != inventory_item_string_id)
	{
		put_small_text_in_box_zoomed((unsigned char*)inventory_item_string, strlen(inventory_item_string), win->len_x-2*win->small_font_len_x, items_string, win->current_scale);
		last_items_string_id = inventory_item_string_id;
	}
	draw_string_small_zoomed(win->small_font_len_x,manufacture_menu_y_len-text_y_offset,(unsigned char *)items_string,4, win->current_scale);

	// Render the grid *after* the images. It seems impossible to code
	// it such that images are rendered exactly within the boxes on all
	// cards
	glDisable(GL_TEXTURE_2D);
	glColor3f(0.77f,0.57f,0.39f);

	//draw the grid
	rendergrid(GRID_COLS, GRID_ROWS, 0, 0, SLOT_SIZE, SLOT_SIZE);

	//Draw recipe control buttons
	draw_recipe_controls(win);
	glEnable(GL_TEXTURE_2D);

	mouse_over_main_pos = -1;
	mouse_over_pipe_pos = -1;

#ifdef OPENGL_TRACE
CHECK_GL_ERRORS();
#endif //OPENGL_TRACE
	return 1;
}
Beispiel #7
0
int display_session_handler(window_info *win)
{
	int i;
	Uint32 timediff;
	char buffer[128];
	float oa_exp;
	int y_step = (int)(0.5 + win->current_scale * 16);
	int extra_x_offset = (int)(0.5 + win->current_scale * 200);
	int start_y_offset = (int)(0.5 + win->current_scale * 55);
	int start_line_y_offset = (int)(0.5 + win->current_scale * 37);
	int x = (int)(0.5 + win->current_scale * 10);
	int y = (int)(0.5 + win->current_scale * 21);

	timediff = 0;
	oa_exp = 0.0f;

	glColor3f(1.0f, 1.0f, 1.0f);
	safe_snprintf(buffer, sizeof(buffer), "%-20s%-17s%-17s%-17s",
		"Skill", "Total Exp", "Max Exp", "Last Exp" );
	draw_string_small_zoomed(x, y, (unsigned char*)buffer, 1, win->current_scale);

	glDisable(GL_TEXTURE_2D);
	glColor3f(0.77f, 0.57f, 0.39f);
	glBegin(GL_LINES);
	glVertex3i(0, start_line_y_offset, 0);
	glVertex3i(win->len_x, start_line_y_offset, 0);
	glEnd();
	glEnable(GL_TEXTURE_2D);
	glColor3f(1.0f, 1.0f, 1.0f);

	y = start_y_offset;

	for (i=0; i<NUM_SKILLS; i++)
	{
		if ((last_mouse_click_y >= y) && (last_mouse_click_y < y+16))
			elglColourN("global.mouseselected");
		else if ((last_mouse_over_y >= y) && (last_mouse_over_y < y+16))
			elglColourN("global.mousehighlight");
		else
			glColor3f(1.0f, 1.0f, 1.0f);
		safe_snprintf(buffer, sizeof(buffer), "%-20s%-17u%-17u%-17u",
			statsinfo[i].skillnames->name, *(statsinfo[i].exp) - session_exp[i], max_exp[i], last_exp[i]);
		draw_string_small_zoomed(x, y, (unsigned char*)buffer, 1, win->current_scale);
		y += y_step;
		if(i < NUM_SKILLS-1)
			oa_exp += *(statsinfo[i].exp) - session_exp[i];
	}

	y += y_step;

	glColor3f(1.0f, 1.0f, 1.0f);
	draw_string_small_zoomed(x, y, (unsigned char*)"Session Time", 1, win->current_scale);
	timediff = cur_time - session_start_time;
	safe_snprintf(buffer, sizeof(buffer), "%02d:%02d:%02d", timediff/3600000, (timediff/60000)%60, (timediff/1000)%60);
	draw_string_small_zoomed(x + extra_x_offset, y, (unsigned char*)buffer, 1, win->current_scale);

	y += y_step;

	draw_string_small_zoomed(x, y, (unsigned char*)"Exp/Min", 1, win->current_scale);
	
	if(timediff<=0){
		timediff=1;
	}
	safe_snprintf(buffer, sizeof(buffer), "%2.2f", oa_exp/((float)timediff/60000.0f));
	draw_string_small_zoomed(x + extra_x_offset, y, (unsigned char*)buffer, 1, win->current_scale);

	y += y_step;
	draw_string_small_zoomed(x, y, (unsigned char*)"Distance", 1, win->current_scale);
	safe_snprintf(buffer, sizeof(buffer), "%d", (distance_moved<0) ?0: distance_moved);
	draw_string_small_zoomed(x + extra_x_offset, y, (unsigned char*)buffer, 1, win->current_scale);

	if (show_reset_help)
	{
		show_help(session_reset_help, -TAB_MARGIN, win->len_y+10+TAB_MARGIN, win->current_scale);
		show_reset_help = 0;
	}
	
#ifdef OPENGL_TRACE
CHECK_GL_ERRORS();
#endif //OPENGL_TRACE

	return 1;
}
Beispiel #8
0
int display_knowledge_handler(window_info *win)
{
	size_t i;
	int x = text_border;
	int y = text_border;
	int scroll = vscrollbar_get_pos (win->window_id, knowledge_scroll_id);
	char points_string[16];
	char *research_string;
	int points_pos;
	float font_ratio = win->small_font_len_x/12.0;
	float max_name_x = (win->len_x - win->box_size - 2*x)/2;
	int is_researching = 1;
	int text_width = win->len_x - 2 * text_border;
	char knowledge_text_buf[TEXTBUFSIZE];

	if(your_info.research_total && 
	   (your_info.research_completed==your_info.research_total))
		safe_snprintf(points_string, sizeof(points_string), "%s", completed_research);
	else
		safe_snprintf(points_string, sizeof(points_string), "%i/%i",your_info.research_completed,your_info.research_total);
	if(your_info.researching < knowledge_count)
	{
		research_string = knowledge_list[your_info.researching].name;
	}
	else if (your_info.researching < sizeof(knowledge_list))
	{
		research_string = unknown_book_short_str;
	}
	else
	{
		research_string = not_researching_anything;
		points_string[0] = '\0';
		is_researching = 0;
	}
	points_pos = (progress_right_x - progress_left_x - strlen(points_string) * win->small_font_len_x) / 2;

	glDisable(GL_TEXTURE_2D);
	glColor3f(0.77f,0.57f,0.39f);
	glBegin(GL_LINES);
	// window separators
	glVertex3i(0,booklist_y_len,0);
	glVertex3i(win->len_x,booklist_y_len,0);
	glVertex3i(0,progressbox_y_len,0);
	glVertex3i(win->len_x,progressbox_y_len,0);
	//progress bar
	glVertex3i(progress_left_x,progress_top_y,0);
	glVertex3i(progress_right_x,progress_top_y,0);
	glVertex3i(progress_left_x,progress_bot_y,0);
	glVertex3i(progress_right_x,progress_bot_y,0);
	glVertex3i(progress_left_x,progress_top_y,0);
	glVertex3i(progress_left_x,progress_bot_y,0);
	glVertex3i(progress_right_x,progress_top_y,0);
	glVertex3i(progress_right_x,progress_bot_y,0);
	glEnd();
	//progress bar
	if (is_researching)
	{
		int progress = (progress_right_x - progress_left_x - 1) * get_research_fraction();
		glBegin(GL_QUADS);
		glColor3f(0.40f,0.40f,1.00f);
		glVertex3i(progress_left_x+1+gx_adjust,progress_top_y+gy_adjust,0);
		glVertex3i(progress_left_x+1+progress+gx_adjust,progress_top_y+gy_adjust,0);
		glColor3f(0.10f,0.10f,0.80f);
		glVertex3i(progress_left_x+1+progress+gx_adjust,progress_bot_y-1+gy_adjust,0);
		glVertex3i(progress_left_x+1+gx_adjust,progress_bot_y-1+gy_adjust,0);
		glColor3f(0.77f,0.57f,0.39f);
		glEnd();
	}
	glEnable(GL_TEXTURE_2D);
	//draw text
	if (selected_book >= 0 && knowledge_list[selected_book].present && knowledge_list[selected_book].has_book)
		text_width = book_start_x - 2 * text_border;
	put_small_text_in_box_zoomed((unsigned char *)raw_knowledge_string, strlen((char *)raw_knowledge_string), text_width, (char *)knowledge_text_buf, win->current_scale);
	draw_string_small_zoomed(text_border,booklist_y_len + text_border,(unsigned char*)knowledge_text_buf, info_lines, win->current_scale);
	glColor3f(1.0f,1.0f,1.0f);
	draw_string_small_zoomed(text_border,progress_top_y+3+gy_adjust,(unsigned char*)researching_str,1, win->current_scale);
	draw_string_small_zoomed(text_border+(strlen(researching_str)+1)*win->small_font_len_x,progress_top_y+3+gy_adjust,(unsigned char*)research_string,1, win->current_scale);
	draw_string_small_zoomed(progress_left_x+points_pos+gx_adjust,progress_top_y+3+gy_adjust,(unsigned char*)points_string,1, win->current_scale);
	if (is_researching && mouse_over_progress_bar)
	{
		char eta_string[20];
		int eta_pos;
		get_research_eta_str(eta_string, sizeof(eta_string));
		eta_pos = (int)(progress_right_x - progress_left_x - strlen(eta_string)*win->small_font_len_x) / 2;
		draw_string_small_zoomed(progress_left_x + eta_pos, progress_top_y - win->small_font_len_y + 2, (unsigned char*)eta_string, 1, win->current_scale);
		mouse_over_progress_bar=0;
	}
	// Draw knowledges
	for(i = 2*scroll; y < (booklist_y_len - booklist_y_step); i++)
	{
		int highlight = 0;
		float colour_brightness = (knowledge_list[i].present) ?1.0 : 0.6;

		if (*highlight_string && (strlen(knowledge_list[i].name) > 0) &&
			(get_string_occurance(highlight_string, knowledge_list[i].name, strlen(knowledge_list[i].name), 1) != -1))
			highlight = 1;

		if (!highlight && (i == selected_book))
		{
			GLfloat cols[3];
			elglGetColour3v("global.mouseselected", cols);
			glColor3f (cols[0]*colour_brightness, cols[1]*colour_brightness, cols[2]*colour_brightness);
		}
		else if (knowledge_list[i].mouse_over)
			elglColourN("global.mousehighlight");
		else if (highlight)
			glColor3f (1.0f*colour_brightness, 0.6f*colour_brightness, 0.0f*colour_brightness);
		else
			glColor3f (1.0f*colour_brightness, 1.0f*colour_brightness, 1.0f*colour_brightness);

		/* truncate the string if it is too long */
		if ((get_string_width((unsigned char*)knowledge_list[i].name) * font_ratio) > max_name_x)
		{
			const char *append_str = "... ";
			size_t dest_max_len = strlen(knowledge_list[i].name)+strlen(append_str)+1;
			char *used_name = (char *)malloc(dest_max_len);
			truncated_string(used_name, knowledge_list[i].name, dest_max_len, append_str, max_name_x, font_ratio);
			draw_string_zoomed(x, y, (unsigned char*)used_name,1,font_ratio);
			/* if the mouse is over this line and its truncated, tooltip to full name */
			if (knowledge_list[i].mouse_over)
			{
				show_help(knowledge_list[i].name, -TAB_MARGIN, win->len_y+10+TAB_MARGIN, win->current_scale);
				know_show_win_help = 0;
			}
			free(used_name);
		}
		else
			draw_string_zoomed(x,y,(unsigned char*)knowledge_list[i].name,1,font_ratio);

		x += (win->len_x-win->box_size-2*text_border)/2;
		if (i % 2 == 1)
		{
			y += booklist_y_step;
			x = text_border;
		}
	}
	if (know_show_win_help)
	{
		show_help(cm_help_options_str, -TAB_MARGIN, win->len_y+10+TAB_MARGIN, win->current_scale);
		know_show_win_help = 0;
	}
#ifdef OPENGL_TRACE
CHECK_GL_ERRORS();
#endif //OPENGL_TRACE
	return 1;
}