Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: xenogia on Tue 27/04/2010 07:49:36

Title: How to Create a PC Desktop in AGS.
Post by: xenogia on Tue 27/04/2010 07:49:36
I am currently creating a screen where you use a computer to get in the crime database.  I have a search criteria gui, but I am wondering how I go about coding this.
Here is a screenshot:

(http://pic.leech.it/i/64033/87df99dbcriteria.jpg)

I want it so you can type in specific things and it will bring up certain information.  I also want to make it non-case sensitive.  Any help would be fantastic.
Title: Re: How to Create a PC Desktop in AGS.
Post by: Wonkyth on Tue 27/04/2010 09:10:47
Non-case sensitivity is easy enough: simply capitalise/de-capitalise everything.
Everything else: I'm not sure what you want.
Title: Re: How to Create a PC Desktop in AGS.
Post by: Khris on Tue 27/04/2010 09:16:50
You have a textfield and its OnActivate function. Do a string comparison in there and display the information.
Not sure what the problem seems to be exactly.
Title: Re: How to Create a PC Desktop in AGS.
Post by: Gilbert on Tue 27/04/2010 09:18:15
The String.CompareTo() function has a casesensitive parameter and alternately there are String.LowerCase() and String.UpperCase() functions for turning a text string to the specified case, so it's just straight forward to make non-case sensitive compares.

Furthermore, if you want more "advanced" "searching" (such as entering "murder, homosexual" and the system responds according to the two given words) you can script your own string processing functions. However, you can also abuse the parser features for this purpose (note that for parser functions, strings are always compared case insensitive).
Title: Re: How to Create a PC Desktop in AGS.
Post by: xenogia on Tue 27/04/2010 10:54:29
Thanks for that.  I look into more deeply.