Tremulous Forum
General => Troubleshooting => Topic started 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.
-
Use an event handler.
-
Could you be more specific please?
-
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?