Working on an easy-to-use UI for Gamestudio based on default panel elements

Code:
editWindowEditorSettings = g_window_create(128, 128, 256, "Editor Settings", GWINDOW_MOVE | GWINDOW_HIDE);
g_window_addtext(editWindowEditorSettings, "Model Files:");
PANEL *panList = g_window_addlist(editWindowEditorSettings, 192);
TEXT *txtFiles = txt_create(99999, -1);
int fileCnt = txt_for_dir(txtFiles, "Models\\*.mdl");
int i;
for(i = 0; i < fileCnt; i++)
{
	g_listbox_add(panList, (txtFiles->pstring)[i]);
}
ptr_remove(txtFiles);
gWriteY = 0;	// Prevent buttons from writing to y information
g_window_addbutton(editWindowEditorSettings, "Create", 64, GALIGN_LEFT, 0, NULL);
g_window_addbutton(editWindowEditorSettings, "Morph", 64, GALIGN_LEFT, 64, NULL);
g_window_addbutton(editWindowEditorSettings, "Clone", 64, GALIGN_RIGHT, -64, NULL);
gWriteY = 1;	// Enable it for the last button again
g_window_addbutton(editWindowEditorSettings, "Delete", 64, GALIGN_RIGHT, 0, NULL);
g_window_addblank(editWindowEditorSettings);
g_window_adddigits(editWindowEditorSettings, "Grid Snap: %3.0f", &editGridsize);
g_window_addslider(editWindowEditorSettings, &editRawGridsize, 0, 7);



Visit my site: www.masterq32.de