⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bctitle.c

📁 用你的语音Modem实现像电话一样通话的程序
💻 C
字号:
#include "bctitle.h"BC_Title::BC_Title(int x, int y, char *text, int font, int color) : BC_Tool(x, y, w, h){	this->font = font;	this->color = color;	strcpy(this->text, text);}BC_Title::create_tool_objects(){	w = get_text_width(font, text) + 5;	h = get_text_height(font);	create_window(x, y, w, h, subwindow->color);	draw();}BC_Title::set_color(int color){	this->color = color;	draw();}BC_Title::resize(int w, int h){	draw();}BC_Title::resize_tool(int x, int y){	resize_window(x, y, w, h);	draw();}BC_Title::update(char *text){	strcpy(this->text, text);	static int new_w;		new_w = get_text_width(font, text) + 5;	if(new_w > w)	{		resize_window(x, y, new_w, h);	}	else	{		BC_Tool::set_color(BC_Tool::color);		draw_box(0, 0, w, h);      // wipe clear	}	draw();}BC_Title::draw(){	set_font(font);	BC_Tool::set_color(color);	draw_text(0, get_text_ascent(font), text);	set_font(LARGEFONT);    // reset	flash();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -