GUI Ver1.0 ---------- I've now added a simple GUI add on. I've very simple and takes a lot of work to use. The elements that makes up buttons and lists must be defined by you with structs provided. Then you can enable/disable them as you wish and call a proc to find out what has been clicked on and such. Each element has a unique ID # you assign to them within the structs. Procs: ------ gui_init,gui_cfg:dword gui_cfg is a struct that contains info that GUI needs. So far all it contains is the addr of a font loaded. gui_addlist,a:dword adds a linked list of elements to be added to the GUI master list All entries in the list are patched by the GUI for what ever it needs done. EG: filelists need an malloced RAM of 512+1(bytes) This list can be entirly enable/disable be giving the 1st ID # of the list. gui_enable,id:dword enables element id (prints it on the screen) gui_enablelist,id:dword enables an entire list starting at ID # gui_disable,id:dword,erase:byte disables element (and erases it if erase==1) gui_disablelist,id:dword,erase:byte disables element list starting at ID # (and erases it if erase==1) gui_update,vcopy:byte returns what button/list has been clicked on. Update uses v_copy if something has been updated but not yet copyed to VRAM. If you want update to call v_copy regardless if it's needed then pass vcopy as 1. on Return : eax=ID # of element clicked on. if element is a filelist then EDX=offset of entry clicked on in list if element is a string box then this just indicates that the string has been edited. Take a look at guitest.asm to understand it. It's really confusing but code speaks louder than words. Here is a simple list example... w1b1 gui_button <,,1,w1b2,0,0,10,8,2,2,"Example1"> w1b2 gui_button <,,2,0,20,0,10,8,2,2,"Example2"> w2b1 gui_button <,,3,0,20,20,10,8,2,2,"Example3"> There are a lot of fields that are reserved (but may be given 0). The third field is the ID#. This must be non-zero dword, and each must be unique. The next field pts to the next element. If it's 0 then that idicates the end of the list. When these 2 list are added to the GUI program it links the two by filling in the fields as needed. But it will remember where lists end still end (so you can disable lists as you like). There are other types and each has different fields but the 1st 8 fields are always the same. Here it is datx struct typ db ? ;Reserved do not fill in en db ? ;Reserved do not fill in id dd ? ; your ID # next dd ? ; pts to next element (0 for EOL) x1 dd ? ; top left corner y1 dd ? ; " x2 dd ? ; bottom right corner y2 dd ? ; " datx ends that enough about that... do look @ guitest.asm