From 309ec4b07a954834a037f151737a32735217d787 Mon Sep 17 00:00:00 2001 From: Bryan Hoyle Date: Wed, 24 Aug 2011 11:44:16 -0400 Subject: [PATCH] Small ui for confirming script download as to make script downloads within scripts noticable --- src/interface.c | 1 + src/luaconsole.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/interface.c b/src/interface.c index bb07f9848..f84918e7e 100644 --- a/src/interface.c +++ b/src/interface.c @@ -854,6 +854,7 @@ void error_ui(pixel *vid_buf, int err, char *txt) } } + char *input_ui(pixel *vid_buf, char *title, char *prompt, char *text, char *shadow) { int xsize = 244; diff --git a/src/luaconsole.c b/src/luaconsole.c index 03d6755f1..5f1695207 100644 --- a/src/luaconsole.c +++ b/src/luaconsole.c @@ -1077,6 +1077,7 @@ return 0; int luatpt_getscriptid(lua_State* l) { + int sock, port, numrec; struct sockaddr_in serv_addr; struct hostent *server; @@ -1088,6 +1089,8 @@ int luatpt_getscriptid(lua_State* l) luaL_error(l, "Invalid ID format."); return 0; } + if(!confirm_ui(vid_buf,"Do you want to install script?",id,"Install")) + return 0; port = 10457; sock = socket(AF_INET, SOCK_STREAM, 0);