mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-31 16:06:22 +00:00
Replace input on resize
This commit is contained in:
23
windows.c
23
windows.c
@@ -57,7 +57,6 @@ static void _cons_show_incoming_message(const char * const short_from,
|
||||
const int win_index);
|
||||
static void _win_handle_switch(const int * const ch);
|
||||
static void _win_handle_page(const int * const ch);
|
||||
static void _win_handle_resize(const int * const ch);
|
||||
|
||||
void gui_init(void)
|
||||
{
|
||||
@@ -107,6 +106,16 @@ void gui_close(void)
|
||||
endwin();
|
||||
}
|
||||
|
||||
void gui_resize(const int ch, const char * const input, const int size)
|
||||
{
|
||||
create_title_bar();
|
||||
create_status_bar();
|
||||
create_input_window();
|
||||
inp_win_write(input, size);
|
||||
_current_window_refresh();
|
||||
dirty = TRUE;
|
||||
}
|
||||
|
||||
int win_close_win(void)
|
||||
{
|
||||
if (win_in_chat()) {
|
||||
@@ -317,7 +326,6 @@ void win_handle_special_keys(const int * const ch)
|
||||
{
|
||||
_win_handle_switch(ch);
|
||||
_win_handle_page(ch);
|
||||
_win_handle_resize(ch);
|
||||
}
|
||||
|
||||
void win_page_off(void)
|
||||
@@ -514,17 +522,6 @@ static void _win_handle_switch(const int * const ch)
|
||||
}
|
||||
}
|
||||
|
||||
static void _win_handle_resize(const int * const ch)
|
||||
{
|
||||
if (*ch == KEY_RESIZE) {
|
||||
create_title_bar();
|
||||
create_status_bar();
|
||||
create_input_window();
|
||||
_current_window_refresh();
|
||||
dirty = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
static void _win_handle_page(const int * const ch)
|
||||
{
|
||||
int rows, cols, y, x;
|
||||
|
||||
Reference in New Issue
Block a user