mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-18 08:33:37 +00:00
246ab0009c
(if not empty) to be saved in the inputline history. Clear the input (but put in history) of say or say team when pressing escape. Don't say or say_team if the text is empty.
46 lines
1.2 KiB
Objective-C
46 lines
1.2 KiB
Objective-C
#ifndef __ruamoko_InputLine_h
|
|
#define __ruamoko_InputLine_h
|
|
|
|
#include "Object.h"
|
|
|
|
struct _inputline_t = {}; // opaque type :)
|
|
typedef _inputline_t [] inputline_t;
|
|
|
|
@extern inputline_t (integer lines, integer size, integer prompt) InputLine_Create;
|
|
@extern void (inputline_t il, void [] data) InputLine_SetUserData;
|
|
@extern void (inputline_t il, integer width) InputLine_SetWidth;
|
|
@extern void (inputline_t il) InputLine_Destroy;
|
|
@extern void (inputline_t il, integer save) InputLine_Clear;
|
|
@extern void (inputline_t il, integer ch) InputLine_Process;
|
|
@extern void (inputline_t il) InputLine_Draw;
|
|
@extern void (inputline_t il, string str) InputLine_SetText;
|
|
@extern string (inputline_t il) InputLine_GetText;
|
|
|
|
struct il_data_t = {
|
|
integer x, y;
|
|
BOOL cursor;
|
|
};
|
|
|
|
@class Rect;
|
|
|
|
@interface InputLine: Object
|
|
{
|
|
il_data_t control;
|
|
inputline_t il;
|
|
}
|
|
|
|
- (id) initWithBounds: (Rect)aRect promptCharacter: (integer)char;
|
|
//-initAt:(Point)p HistoryLines:(integer)l LineSize:(integer)s PromptChar:(integer)prompt;
|
|
- (void) free;
|
|
|
|
- (void) setWidth: (integer)width;
|
|
- (void) draw: (BOOL)cursor;
|
|
|
|
- (void) processInput: (integer)key;
|
|
|
|
- (id) setText: (string)text;
|
|
- (string) text;
|
|
|
|
@end
|
|
|
|
#endif //__ruamoko_inputline_h
|