[Add] window_getImage

This commit is contained in:
Allanis 2013-03-20 21:41:00 +00:00
parent 0614c162c2
commit 14af8c7e74
3 changed files with 8 additions and 1 deletions

1
TODO
View File

@ -3,7 +3,6 @@ Vital:
-- Save -- Save
-- Allow multiple ships in storage. -- Allow multiple ships in storage.
-- Main Menu. -- Main Menu.
-- Player death!
-- Player faction system. -- Player faction system.
Major: Major:

View File

@ -319,6 +319,11 @@ void window_modifyImage(const unsigned int wid, char* name, glTexture* image) {
wgt->dat.img.image = 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. // Check if a window exists.
int window_exists(const char* wdwname) { int window_exists(const char* wdwname) {
int i; int i;

View File

@ -45,6 +45,9 @@ void toolkit_alert(const char* fmt, ...);
void window_modifyText(const unsigned int wid, char* name, char* newstring); void window_modifyText(const unsigned int wid, char* name, char* newstring);
void window_modifyImage(const unsigned int wid, char* name, glTexture* image); 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. // Get the window by name.
int window_exists(const char* wdwname); int window_exists(const char* wdwname);
unsigned int window_get(const char* wdwname); unsigned int window_get(const char* wdwname);