mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +00:00
Fix the double offset of inputline text.
This commit is contained in:
parent
e878ace83b
commit
1822290b1a
3 changed files with 6 additions and 10 deletions
|
@ -66,10 +66,9 @@ static __attribute__ ((used)) const char rcsid[] =
|
|||
|
||||
#include "compat.h"
|
||||
|
||||
// XXX check InputLine.h in ruamoko/include
|
||||
// XXX check InputLine.h in ruamoko/include/gui
|
||||
typedef struct {
|
||||
int x, y;
|
||||
int xbase, ybase;
|
||||
int cursor;
|
||||
} il_data_t;
|
||||
|
||||
|
@ -572,8 +571,7 @@ void
|
|||
C_DrawInputLine (inputline_t *il)
|
||||
{
|
||||
il_data_t *data = il->user_data;
|
||||
DrawInputLine (data->xbase + data->x, data->ybase + data->y, data->cursor,
|
||||
il);
|
||||
DrawInputLine (data->x, data->y, data->cursor, il);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -17,9 +17,8 @@ string (inputline_t il) InputLine_GetText = #0;
|
|||
- (id) initWithBounds: (Rect)aRect promptCharacter: (integer)char
|
||||
{
|
||||
self = [super initWithComponents:aRect.origin.x :aRect.origin.y :aRect.size.width * 8 :8];
|
||||
control.x = xpos;
|
||||
control.y = ypos;
|
||||
control.xbase = control.ybase = 0;
|
||||
control.x = xabs;
|
||||
control.y = yabs;
|
||||
control.cursor = NO;
|
||||
|
||||
il = InputLine_Create (aRect.size.height, aRect.size.width, char);
|
||||
|
@ -37,8 +36,8 @@ string (inputline_t il) InputLine_GetText = #0;
|
|||
- (void) setBasePosFromView: (View *) view
|
||||
{
|
||||
[super setBasePosFromView: view];
|
||||
control.xbase = xabs;
|
||||
control.ybase = yabs;
|
||||
control.x = xabs;
|
||||
control.y = yabs;
|
||||
}
|
||||
|
||||
- (void) setWidth: (integer)width
|
||||
|
|
|
@ -18,7 +18,6 @@ typedef struct _inputline_t *inputline_t;
|
|||
|
||||
struct il_data_t {
|
||||
integer x, y;
|
||||
integer xbase, ybase;
|
||||
BOOL cursor;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue