summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/interface.c b/src/interface.c
index d230980..680b6a9 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -15,6 +15,8 @@
#include <interface.h>
#include <misc.h>
+
+//char pyready=1;
SDLMod sdl_mod;
int sdl_key, sdl_wheel, sdl_caps=0, sdl_ascii, sdl_zoom_trig=0;
@@ -3839,21 +3841,16 @@ void open_link(char *uri) {
#ifdef WIN32
ShellExecute(0, "OPEN", uri, NULL, NULL, 0);
#elif MACOSX
- //char *cmd[] = { "open", uri, (char *)0 };
- //execvp("open", cmd);
- //LSOpenCFURLRef(CFURLCreateWithString(NULL, CFStringCreateWithCString(NULL, uri, 0) ,NULL), NULL); //TODO: Get this crap working
char *cmd = malloc(7+strlen(uri));
strcpy(cmd, "open ");
strappend(cmd, uri);
system(cmd);
#elif LIN32
- //execlp("xdg-open", "xdg-open", uri, (char *)0);
char *cmd = malloc(11+strlen(uri));
strcpy(cmd, "xdg-open ");
strappend(cmd, uri);
system(cmd);
#elif LIN64
- //execlp("xdg-open", "xdg-open", uri, (char *)0);
char *cmd = malloc(11+strlen(uri));
strcpy(cmd, "xdg-open ");
strappend(cmd, uri);
@@ -3870,7 +3867,7 @@ typedef struct command_history command_history;
command_history *last_command = NULL;
command_history *last_command2 = NULL;
char *console_ui(pixel *vid_buf,char error[255],char console_more) {
- int mx,my,b,cc,ci = -1;
+ int mx,my,b,cc,ci = -1,i;
pixel *old_buf=calloc((XRES+BARSIZE)*(YRES+MENUSIZE), PIXELSIZE);
command_history *currentcommand;
command_history *currentcommand2;
@@ -3897,7 +3894,6 @@ char *console_ui(pixel *vid_buf,char error[255],char console_more) {
last_command2 = currentcommand2;
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
-
cc = 0;
while(cc < 80){
fillrect(old_buf, -1, -1+cc, XRES+BARSIZE, 2, 0, 0, 0, 160-(cc*2));
@@ -3912,8 +3908,14 @@ char *console_ui(pixel *vid_buf,char error[255],char console_more) {
memcpy(vid_buf,old_buf,(XRES+BARSIZE)*YRES*PIXELSIZE);
draw_line(vid_buf, 0, 219, XRES+BARSIZE-1, 219, 228, 228, 228, XRES+BARSIZE);
- drawtext(vid_buf, 15, 15, "Welcome to The Powder Toy console v.3 (by cracker64, python by Doxin)" //TODO: help command
- ,255, 255, 255, 255);
+ if(pygood)
+ i=255;
+ else
+ i=0;
+ if(pyready)
+ drawtext(vid_buf, 15, 15, "Welcome to The Powder Toy console v.3 (by cracker64, python by Doxin)",255,i,i, 255);
+ else
+ drawtext(vid_buf, 15, 15, "Welcome to The Powder Toy console v.3 (by cracker64, python disabled)",255,i,i, 255);
cc = 0;
currentcommand = last_command;