How to Create a PC Desktop in AGS.

Started by xenogia, Tue 27/04/2010 07:49:36

Previous topic - Next topic

xenogia

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:



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.

Wonkyth

Non-case sensitivity is easy enough: simply capitalise/de-capitalise everything.
Everything else: I'm not sure what you want.
"But with a ninja on your face, you live longer!"

Khris

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.

Gilbert

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).

xenogia

Thanks for that.  I look into more deeply.

SMF spam blocked by CleanTalk