Tremulous Forum

General => Troubleshooting => Topic started by: artorious on May 10, 2006, 08:03:04 am

Title: Mod Making, Connect to databse menu
Post by: artorious on May 10, 2006, 08:03:04 am
How do i go about creating a menu for Trem that (when the user clicks a "Connect" button) connects to a database. I know the C code for connecting to a database, but how do I implement that code so it runs when a user clicks a button on a menu.
Title: Mod Making, Connect to databse menu
Post by: Vector_Matt on May 10, 2006, 01:13:57 pm
Use an event handler.
Title: Mod Making, Connect to databse menu
Post by: artorious on May 10, 2006, 01:34:35 pm
Could you be more specific please?
Title: Mod Making, Connect to databse menu
Post by: Vector_Matt on May 10, 2006, 03:09:13 pm
Look at the main.menu file in the ui folder in data-1.1.0.pk3, add a button called database or something, then in main.menu connect that button to a fuction called connect (or something suitable) then edit the source to have a function (with the name you chose earlier) that connects to a database.  BTW why would Trem connect to a database?