Started work on sql login ui ...

... got a bit bored doing it though so there is not much done yet ...
This commit is contained in:
Walter Julius Hennecke 2012-12-10 23:18:30 +01:00
parent c4f33a82e0
commit e03714e3a1
4 changed files with 56 additions and 0 deletions

View file

@ -2368,6 +2368,7 @@ Q3UIOBJ_ = \
$(B)/$(BASEGAME)/ui/ui_transporter.o \
$(B)/$(BASEGAME)/ui/ui_motd.o \
$(B)/$(BASEGAME)/ui/ui_msd.o \
$(B)/$(BASEGAME)/ui/ui_sql.o \
$(B)/$(BASEGAME)/ui/ui_admin.o \
$(B)/$(BASEGAME)/ui/ui_fonts.o \
$(B)/$(BASEGAME)/ui/ui_emotes.o \

View file

@ -323,6 +323,7 @@
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;UI_EXPORTS</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="ui_motd.c" />
<ClCompile Include="ui_msd.c" />
<ClCompile Include="ui_network.c">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;UI_EXPORTS</PreprocessorDefinitions>
@ -443,6 +444,7 @@
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;UI_EXPORTS</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="ui_sql.c" />
<ClCompile Include="ui_startserver.c">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;UI_EXPORTS</PreprocessorDefinitions>

View file

@ -146,6 +146,12 @@
<ClCompile Include="ui_video.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ui_msd.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ui_sql.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\game\bg_public.h">

47
code/ui/ui_sql.c Normal file
View file

@ -0,0 +1,47 @@
/**********************************************************************
UI_sql.C
User interface trigger from within game
**********************************************************************/
#include "ui_local.h"
typedef struct {
menuframework_s menu;
char *username;
char *password;
} sql_t;
sql_t s_sql;
#define ID_QUIT 10
#define ID_LOGIN 11
/*
=================
M_sql_Event
=================
*/
static void M_sql_Event(void *ptr, int notification) {
int id;
id = ((menucommon_s*)ptr)->id;
switch (id)
{
case ID_QUIT:
if(notification == QM_ACTIVATED) {
UI_PopMenu();
}
break;
case ID_LOGIN:
if(notification == QM_ACTIVATED) {
// do login
}
break;
default:
break;
}
}