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

📄 label.h

📁 S.C.O.U.R.G.E.是一款类似Rogue的游戏
💻 H
字号:
/***************************************************************************                          label.h  -  description                             -------------------    begin                : Thu Aug 28 2003    copyright            : (C) 2003 by Gabor Torok    email                : cctorok@yahoo.com ***************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * ***************************************************************************/#ifndef LABEL_H#define LABEL_H#include "../constants.h"#include "widget.h"/**  *@author Gabor Torok  */class SDLHandler;class Label : public Widget { private:	 char *text;	 int lineWidth; public:   /**	 Create a label with text. The user is responsible for freeing text after label is freed.	 With constants, you can create a label by calling:	 new Label(x, y, strdup("xyz"));   */  Label(int x, int y, char *text=NULL, int lineWidth=0);  ~Label();  inline char *getText() { return text; }  inline void setText(char *s) { text = s; }  inline void setTextCopy(char *s) { strcpy(text, s); }  void drawWidget(Widget *parent);};#endif

⌨️ 快捷键说明

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