diff --git a/TODO b/TODO index db8f9b3..d62a658 100644 --- a/TODO +++ b/TODO @@ -3,7 +3,6 @@ Vital: -- Save -- Allow multiple ships in storage. -- Main Menu. - -- Player death! -- Player faction system. Major: diff --git a/src/toolkit.c b/src/toolkit.c index bbfc5fb..cd771fa 100644 --- a/src/toolkit.c +++ b/src/toolkit.c @@ -319,6 +319,11 @@ void window_modifyImage(const unsigned int wid, char* name, glTexture* image) { wgt->dat.img.image = image; } +glTexture* window_getImage(const unsigned int wid, char* name) { + Widget* wgt = window_getwgt(wid, name); + return (wgt) ? wgt->dat.img.image : NULL; +} + // Check if a window exists. int window_exists(const char* wdwname) { int i; diff --git a/src/toolkit.h b/src/toolkit.h index f511563..ab0cda6 100644 --- a/src/toolkit.h +++ b/src/toolkit.h @@ -45,6 +45,9 @@ void toolkit_alert(const char* fmt, ...); void window_modifyText(const unsigned int wid, char* name, char* newstring); void window_modifyImage(const unsigned int wid, char* name, glTexture* image); +// Get! +glTexture window_getImage(const unsigned int wid, char* name); + // Get the window by name. int window_exists(const char* wdwname); unsigned int window_get(const char* wdwname);