Game Development Community

Working on a GUI

by Chris Sargent · in Game Design and Creative Issues · 09/22/2008 (1:55 pm) · 1 replies

I'm working on modifying the starter.fps gui so I can learn the basics to eventually create my own gui.

I was looking at the startmission.gui in the gui editor. I am unclear on where / how the textbox in the guiscrollctrl is populated with the names of the mission.

I see under this there is a guitextlistctrl defined. I have looked here and see that it sets up the basics of the text box area. Under this is the Guitextlistctrl. This uses SM_Missionlist as a Name (the name section right next to the apply button).

How/where does the text get populated into the text area?

I've tried looking on TDN under gui's after selecting TGE but almost every link sends me to a resource for TGB gui's.

thanks in advance for a pointer in the right direction.

#1
09/22/2008 (2:02 pm)
Actually after going through the startmission.gui again I believe this is what is populating the text area:

function startMissionGui::onWake()
{
   SM_missionList.clear();
   %i = 0;
   for(%file = findFirstFile($Server::MissionFileSpec); %file !$= ""; %file = findNextFile($Server::MissionFileSpec))  
      if (strStr(%file, "/CVS/") == -1)
         SM_missionList.addRow(%i++, getMissionDisplayName(%file) @ "\t" @ %file );
   SM_missionList.sort(0);
   SM_missionList.setSelectedRow(0);
   SM_missionList.scrollVisible(0);
}

If this is in fact what is doing this could someone please give me a quick rundown on how this is working as i've not moved on to learning my scripting yet.

Thank you again