mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
Combine game and configuration tabs in the startup window into one. Still needs porting to startgtk.game.c.
git-svn-id: https://svn.eduke32.com/eduke32@991 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
28fedd72e8
commit
78f205f1a9
5 changed files with 46 additions and 94 deletions
|
@ -262,7 +262,7 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
|
|||
int ac,newx,oldx=x;
|
||||
char centre, *oldt;
|
||||
int squishtext = ((small&2)!=0);
|
||||
int ht = usehightile;
|
||||
// int ht = usehightile;
|
||||
int shift = 16, widthx = 320, ox, oy;
|
||||
|
||||
if (orientation & 256)
|
||||
|
@ -314,7 +314,7 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
|
|||
t = oldt;
|
||||
x = (widthx>>1)-((orientation & 256)?newx<<15:newx>>1);
|
||||
}
|
||||
usehightile = (ht && r_downsize < 2);
|
||||
// usehightile = (ht && r_downsize < 2);
|
||||
ox=x;
|
||||
oy=y;
|
||||
while (*t)
|
||||
|
@ -370,7 +370,7 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
|
|||
if (x > (ud.config.ScreenWidth - 14)) oldt = (char *)t, x = oldx, y+=8*z/65536;
|
||||
t++;
|
||||
}
|
||||
usehightile = ht;
|
||||
// usehightile = ht;
|
||||
return (x);
|
||||
}
|
||||
|
||||
|
@ -414,12 +414,12 @@ int minitext_(int x,int y,const char *t,int s,int p,int sb)
|
|||
{
|
||||
int ac;
|
||||
char ch,cmode;
|
||||
int ht = usehightile;
|
||||
// int ht = usehightile;
|
||||
|
||||
cmode = (sb&256)!=0;
|
||||
sb &= 255;
|
||||
|
||||
usehightile = (ht && !r_downsize);
|
||||
// usehightile = (ht && !r_downsize);
|
||||
while (*t)
|
||||
{
|
||||
if (*t == '^' && isdigit(*(t+1)))
|
||||
|
@ -456,7 +456,7 @@ int minitext_(int x,int y,const char *t,int s,int p,int sb)
|
|||
|
||||
t++;
|
||||
}
|
||||
usehightile = ht;
|
||||
// usehightile = ht;
|
||||
return (x);
|
||||
}
|
||||
|
||||
|
@ -2577,7 +2577,7 @@ static void ShowFrameRate(void)
|
|||
if ((totalclock - lastpackettime) > 1)
|
||||
{
|
||||
for (p = (totalclock - lastpackettime);p>0 && p<(xdim>>2);p--)
|
||||
printext256(4L*p,0,31,-1,".",0);
|
||||
printext256(4L*p,0,COLOR_WHITE,-1,".",0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3706,14 +3706,14 @@ void displayrest(int smoothratio)
|
|||
|
||||
SetGameVarID(g_iReturnVarID,0,g_player[screenpeek].ps->i,screenpeek);
|
||||
OnEvent(EVENT_DISPLAYSBAR, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||
i = usehightile;
|
||||
if (r_downsize > 1)
|
||||
usehightile = 0;
|
||||
// i = usehightile;
|
||||
// if (r_downsize > 1)
|
||||
// usehightile = 0;
|
||||
if (GetGameVarID(g_iReturnVarID,g_player[screenpeek].ps->i,screenpeek) == 0)
|
||||
coolgaugetext(screenpeek);
|
||||
|
||||
operatefta();
|
||||
usehightile = i;
|
||||
// usehightile = i;
|
||||
if (KB_KeyPressed(sc_Escape) && ud.overhead_on == 0
|
||||
&& ud.show_help == 0
|
||||
&& g_player[myconnectindex].ps->newowner == -1)
|
||||
|
|
|
@ -197,7 +197,7 @@ static inline int probesm(int x,int y,int i,int n)
|
|||
int menutext_(int x,int y,int s,int p,char *t)
|
||||
{
|
||||
short i, ac, centre;
|
||||
int ht = usehightile;
|
||||
// int ht = usehightile;
|
||||
|
||||
y -= 12;
|
||||
|
||||
|
@ -260,7 +260,7 @@ int menutext_(int x,int y,int s,int p,char *t)
|
|||
if (centre)
|
||||
x = (320-centre-10)>>1;
|
||||
|
||||
usehightile = (ht && r_downsize < 3);
|
||||
// usehightile = (ht && r_downsize < 3);
|
||||
while (*t)
|
||||
{
|
||||
if (*t == ' ')
|
||||
|
@ -313,7 +313,7 @@ int menutext_(int x,int y,int s,int p,char *t)
|
|||
x += tilesizx[ac];
|
||||
t++;
|
||||
}
|
||||
usehightile = ht;
|
||||
// usehightile = ht;
|
||||
return (x);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,33 +26,18 @@ BEGIN
|
|||
CONTROL "", IDCVMODE, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 6, 80, 56
|
||||
CONTROL "&Fullscreen", IDCFULLSCREEN, "BUTTON", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 148, 8, 49, 10
|
||||
|
||||
#ifdef JFAUD
|
||||
CONTROL "S&ound driver:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 28, 50, 8
|
||||
CONTROL "", IDCSOUNDDRV, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 26, 110, 56
|
||||
CONTROL "&MIDI device:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_DISABLED | WS_VISIBLE, 5, 44, 50, 8
|
||||
CONTROL "", IDCMIDIDEV, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_DISABLED | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 42, 110, 56
|
||||
CONTROL "Input devices:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 80, 50, 8
|
||||
CONTROL "Mo&use", IDCINPUTMOUSE, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 60, 80, 49, 8
|
||||
CONTROL "&Joystick", IDCINPUTJOY, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 110, 80, 49, 8
|
||||
#else
|
||||
CONTROL "Input devices:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 28, 50, 8
|
||||
CONTROL "Mo&use", IDCINPUTMOUSE, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 60, 28, 49, 8
|
||||
CONTROL "&Joystick", IDCINPUTJOY, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 110, 28, 49, 8
|
||||
#endif
|
||||
CONTROL "Input devices:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 22, 50, 8
|
||||
CONTROL "Mo&use", IDCINPUTMOUSE, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 60, 22, 49, 8
|
||||
CONTROL "&Joystick", IDCINPUTJOY, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 110, 22, 49, 8
|
||||
|
||||
CONTROL "&Game:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 35, 100, 8
|
||||
CONTROL "", IDCDATA, "LISTBOX", LBS_NOINTEGRALHEIGHT | LBS_USETABSTOPS | LBS_STANDARD | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 45, 226, 43
|
||||
|
||||
CONTROL "Custom game content &directory:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 90, 160, 8
|
||||
CONTROL "", IDCGAMEDIR, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 10, 99, 226, 156
|
||||
|
||||
CONTROL "&Always show configuration on start", IDCALWAYSSHOW, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 118, 116, 140, 8
|
||||
END
|
||||
WIN_STARTWINPAGE_GAME DIALOGEX DISCARDABLE 20, 40, 279, 168
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
CAPTION "Dialog"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
CONTROL "&Game:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 5, 100, 8
|
||||
CONTROL "", IDGDATA, "LISTBOX", LBS_NOINTEGRALHEIGHT | LBS_USETABSTOPS | LBS_STANDARD | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 15, 226, 70
|
||||
CONTROL "Game&dir:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 90, 100, 8
|
||||
CONTROL "", IDGGAMEDIR, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 10, 99, 226, 156
|
||||
END
|
||||
|
||||
#define FILEVER 1,4,9,9
|
||||
#define PRODUCTVER 1,4,9,9
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
#include "startwin.game.h"
|
||||
|
||||
#define TAB_CONFIG 0
|
||||
#define TAB_GAME 1
|
||||
#define TAB_MESSAGES 2
|
||||
// #define TAB_GAME 1
|
||||
#define TAB_MESSAGES 1
|
||||
|
||||
static struct audioenumdrv *wavedevs = NULL;
|
||||
|
||||
|
@ -160,7 +160,7 @@ static void PopulateForm(int pgs)
|
|||
int i, j;
|
||||
char buf[128+BMAX_PATH];
|
||||
|
||||
hwnd = GetDlgItem(pages[TAB_GAME], IDGDATA);
|
||||
hwnd = GetDlgItem(pages[TAB_CONFIG], IDCDATA);
|
||||
|
||||
for (fg = foundgrps; fg; fg=fg->next)
|
||||
{
|
||||
|
@ -177,7 +177,7 @@ static void PopulateForm(int pgs)
|
|||
{
|
||||
CACHE1D_FIND_REC *dirs = NULL;
|
||||
|
||||
hwnd = GetDlgItem(pages[TAB_GAME], IDGGAMEDIR);
|
||||
hwnd = GetDlgItem(pages[TAB_CONFIG], IDCGAMEDIR);
|
||||
|
||||
getfilenames("/");
|
||||
(void)ComboBox_ResetContent(hwnd);
|
||||
|
@ -229,39 +229,7 @@ static INT_PTR CALLBACK ConfigPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
|
|||
case IDCINPUTJOY:
|
||||
settings.usejoy = IsDlgButtonChecked(hwndDlg, IDCINPUTJOY) == BST_CHECKED;
|
||||
return TRUE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static INT_PTR CALLBACK GamePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(hwndDlg);
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDGDATA:
|
||||
{
|
||||
int i;
|
||||
if (HIWORD(wParam) != LBN_SELCHANGE) break;
|
||||
i = ListBox_GetCurSel((HWND)lParam);
|
||||
if (i != CB_ERR) i = ListBox_GetItemData((HWND)lParam, i);
|
||||
if (i != CB_ERR)
|
||||
{
|
||||
strcpy(settings.selectedgrp, ((struct grpfile*)i)->name);
|
||||
settings.game = ((struct grpfile*)i)->game;
|
||||
settings.crcval = ((struct grpfile*)i)->crcval;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
case IDGGAMEDIR:
|
||||
case IDCGAMEDIR:
|
||||
if (HIWORD(wParam) == CBN_SELCHANGE)
|
||||
{
|
||||
int i,j;
|
||||
|
@ -280,6 +248,20 @@ static INT_PTR CALLBACK GamePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPA
|
|||
}
|
||||
}
|
||||
return TRUE;
|
||||
case IDCDATA:
|
||||
{
|
||||
int i;
|
||||
if (HIWORD(wParam) != LBN_SELCHANGE) break;
|
||||
i = ListBox_GetCurSel((HWND)lParam);
|
||||
if (i != CB_ERR) i = ListBox_GetItemData((HWND)lParam, i);
|
||||
if (i != CB_ERR)
|
||||
{
|
||||
strcpy(settings.selectedgrp, ((struct grpfile*)i)->name);
|
||||
settings.game = ((struct grpfile*)i)->game;
|
||||
settings.crcval = ((struct grpfile*)i)->crcval;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -291,7 +273,6 @@ static INT_PTR CALLBACK GamePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPA
|
|||
}
|
||||
|
||||
|
||||
|
||||
static void SetPage(int n)
|
||||
{
|
||||
HWND tab;
|
||||
|
@ -315,8 +296,8 @@ static void EnableConfig(int n)
|
|||
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCINPUTMOUSE), n);
|
||||
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCINPUTJOY), n);
|
||||
|
||||
EnableWindow(GetDlgItem(pages[TAB_GAME], IDGDATA), n);
|
||||
EnableWindow(GetDlgItem(pages[TAB_GAME], IDGGAMEDIR), n);
|
||||
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCDATA), n);
|
||||
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCGAMEDIR), n);
|
||||
}
|
||||
|
||||
static INT_PTR CALLBACK startup_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
|
@ -410,9 +391,6 @@ static INT_PTR CALLBACK startup_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
|
|||
tab.pszText = TEXT("Configuration");
|
||||
SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)TAB_CONFIG, (LPARAM)&tab);
|
||||
tab.mask = TCIF_TEXT;
|
||||
tab.pszText = TEXT("Game");
|
||||
SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)TAB_GAME, (LPARAM)&tab);
|
||||
tab.mask = TCIF_TEXT;
|
||||
tab.pszText = TEXT("Messages");
|
||||
SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)TAB_MESSAGES, (LPARAM)&tab);
|
||||
|
||||
|
@ -428,11 +406,8 @@ static INT_PTR CALLBACK startup_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
|
|||
// Create the pages and position them in the tab control, but hide them
|
||||
pages[TAB_CONFIG] = CreateDialog((HINSTANCE)win_gethinstance(),
|
||||
MAKEINTRESOURCE(WIN_STARTWINPAGE_CONFIG), hwndDlg, ConfigPageProc);
|
||||
pages[TAB_GAME] = CreateDialog((HINSTANCE)win_gethinstance(),
|
||||
MAKEINTRESOURCE(WIN_STARTWINPAGE_GAME), hwndDlg, GamePageProc);
|
||||
pages[TAB_MESSAGES] = GetDlgItem(hwndDlg, WIN_STARTWIN_MESSAGES);
|
||||
SetWindowPos(pages[TAB_CONFIG], hwnd,r.left,r.top,r.right,r.bottom,SWP_HIDEWINDOW);
|
||||
SetWindowPos(pages[TAB_GAME], hwnd,r.left,r.top,r.right,r.bottom,SWP_HIDEWINDOW);
|
||||
SetWindowPos(pages[TAB_MESSAGES], hwnd,r.left,r.top,r.right,r.bottom,SWP_HIDEWINDOW);
|
||||
|
||||
// Tell the editfield acting as the console to exclude the width of the scrollbar
|
||||
|
@ -444,7 +419,7 @@ static INT_PTR CALLBACK startup_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
|
|||
// Set a tab stop in the game data listbox
|
||||
{
|
||||
DWORD tabs[1] = { 150 };
|
||||
(void)ListBox_SetTabStops(GetDlgItem(pages[TAB_GAME], IDGDATA), 1, tabs);
|
||||
(void)ListBox_SetTabStops(GetDlgItem(pages[TAB_CONFIG], IDCDATA), 1, tabs);
|
||||
}
|
||||
|
||||
SetFocus(GetDlgItem(hwndDlg, WIN_STARTWIN_START));
|
||||
|
@ -489,12 +464,6 @@ static INT_PTR CALLBACK startup_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
|
|||
hbmp = NULL;
|
||||
}
|
||||
|
||||
if (pages[TAB_GAME])
|
||||
{
|
||||
DestroyWindow(pages[TAB_GAME]);
|
||||
pages[TAB_GAME] = NULL;
|
||||
}
|
||||
|
||||
if (pages[TAB_CONFIG])
|
||||
{
|
||||
DestroyWindow(pages[TAB_CONFIG]);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// resource ids
|
||||
#define WIN_STARTWIN 1000
|
||||
#define WIN_STARTWINPAGE_CONFIG 2000
|
||||
#define WIN_STARTWINPAGE_GAME 3000
|
||||
#define WIN_STARTWIN_BITMAP 100 // banner bitmap
|
||||
#define WIN_STARTWIN_TABCTL 101
|
||||
#define WIN_STARTWIN_CANCEL IDCANCEL
|
||||
|
@ -21,7 +20,6 @@
|
|||
#define IDCINPUTMOUSE 105
|
||||
#define IDCINPUTJOY 106
|
||||
#define IDCALWAYSSHOW 107
|
||||
#define IDCDATA 108
|
||||
#define IDCGAMEDIR 109
|
||||
|
||||
// game page
|
||||
#define IDGDATA 100
|
||||
#define IDGGAMEDIR 101
|
||||
|
|
Loading…
Reference in a new issue