src/draw.c
// password input (hidden text)
password input (hidden text)
password input ( hidden text )
void draw_input_mask(struct input* input)
{
	u16 len = strlen(input->text);
	u16 visible_len = input->visible_len;
	if (len > visible_len)
	{
		len = visible_len;
	}
	for (u16 i = 0; i < visible_len; ++i)
	{
		if (input->visible_start + i < input->end)
		{
			tb_change_cell(input->x + i,
				input->y,
				'o',
				config.fg,
				config.bg);
		}
		else
		{
			tb_change_cell(input->x + i,
				input->y,
				' ',
				config.fg,
				config.bg);
		}
	}
}
void draw_input_mask ( struct input * input ) { u16 len = strlen ( input -> text ) ; u16 visible_len = input -> visible_len ; if ( len > visible_len ) { len = visible_len ; } for ( u16 i = 0 ; i < visible_len ; ++ i ) { if ( input -> visible_start + i < input -> end ) { tb_change_cell ( input -> x + i , input -> y , ' ' , config . fg , config . bg ) ; } else { tb_change_cell ( input -> x + i , input -> y , ' ' , config . fg , config . bg ) ; } } }
password input (hidden text)
password input ( hidden text )