[quake3] Tab Completion

Rainer Klaffenboeck rainer.klaffenboeck at inode.at
Sat Feb 17 15:45:21 EST 2007


add to Field_CompleteCommand()

            else if( !Q_stricmp(baseCmd, "ogg" ) &&
                     completionArgument == 2 )
            {
                Field_CompleteFilename( "ogg", "ogg", qtrue );
            }

worked fine when i just tried it...listed all .ogg file starting in ogg/

Jorge Pena wrote:
> Thanks, but that's what I said. I added my command in there just as
> the map command is there and the tab completion works, but it only
> does just that, complete the filename, I want it to list all the files
> like /map <TAB> does, where it lists all the maps it can find. I think
> the function we both found is only for tab completion when you do
> something like /map my<TAB> (Completes it to /map mymap).
>
> Also, do you know where the map command is handled? I've been looking
> but can't find anything. Nevermind I just found it, sv_ccmds.c,
> SV_Map_f. Doesn't seem like it does what I'm saying though.
>
> Thanks for the help so far but I think you misunderstood me, that or
> you thought what I thought haha (That that function is what I wanted),
> if you still don't understand please let me know and I'll try to
> clarify! :)
>
> Thanks again!
>
> On 2/17/07, *Rainer Klaffenboeck* <rainer.klaffenboeck at inode.at
> <mailto:rainer.klaffenboeck at inode.at>> wrote:
>
>     qcommon/common.c/Field_CompleteCommand()
>
>     Have fun,
>     Hobbes
>
>     Jorge Pena wrote:
>     > Hey do any of you guys know where the tab completion for the /map
>     > command is handled? I've been searching on and off and haven't found
>     > anything. Basically I want to take a look at it to incorporate
>     it into
>     > another command I want to make. I found Field_CompleteCommand, and I
>     > added my command to that and it seems to correctly 'tab
>     complete' but
>     > it doesn't do what I want. Basically, I want it to output a list of
>     > files I have in a directory called /ogg (Or anywhere), like the /map
>     > command does when you type /map space <TAB>, it lists all the maps,
>     > pretty much like that, I've been searching and searching but can't
>     > find anything, I'd really appreciate any help!
>
>
>
>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://icculus.org/pipermail/quake3/attachments/20070217/d664a5d0/attachment.pgp>


More information about the quake3 mailing list