Author Topic: Mod Making, Connect to databse menu  (Read 4234 times)

artorious

  • Posts: 7
  • Turrets: +0/-0
Mod Making, Connect to databse menu
« 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.

Vector_Matt

  • Posts: 732
  • Turrets: +2/-1
Mod Making, Connect to databse menu
« Reply #1 on: May 10, 2006, 01:13:57 pm »
Use an event handler.

artorious

  • Posts: 7
  • Turrets: +0/-0
Mod Making, Connect to databse menu
« Reply #2 on: May 10, 2006, 01:34:35 pm »
Could you be more specific please?

Vector_Matt

  • Posts: 732
  • Turrets: +2/-1
Mod Making, Connect to databse menu
« Reply #3 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?