Beispiel #1
0
// Build the menu
void CMenuMouse::Build()
{
	// Make sure to call the base class
	CMenuBase::Build();

	CreateTitle("interface\\mainmenus\\options.pcx", IDS_MENU_TITLE_OPTIONS, m_pMainMenus->GetTitlePos());		
	SetOptionPos(m_pMainMenus->GetOptionsPos());
	SetItemSpacing(5);
	SetScrollWrap(DFALSE);	

	// Load the mouse settings
	LoadMouseSettings();

	// Add the controls
	CLTGUISliderCtrl *pCtrl=AddSliderOption(IDS_MENU_MOUSE_SENSITIVITY, m_pMainMenus->GetSmallFont(), 100, m_pMainMenus->GetSurfaceSliderBar(), m_pMainMenus->GetSurfaceSliderTab(), &m_nMouseSensitivity);
	pCtrl->SetSliderRange(100, 1500);
	pCtrl->SetSliderIncrement(20);

	m_pInputRateCtrl=AddSliderOption(IDS_MENU_MOUSE_INPUTRATE, m_pMainMenus->GetSmallFont(), 100, m_pMainMenus->GetSurfaceSliderBar(), m_pMainMenus->GetSurfaceSliderTab(), &m_nInputRate);
	m_pInputRateCtrl->SetSliderIncrement(2);
	m_pInputRateCtrl->SetSliderRange(0, 40);

	AddOnOffOption(IDS_MENU_MOUSE_INVERT_YAXIS, m_pMainMenus->GetSmallFont(), 100, &m_bInvertYAxis);
	AddOnOffOption(IDS_MENU_MOUSE_MOUSELOOK, m_pMainMenus->GetSmallFont(), 100, &m_bMouseLook);
	AddOnOffOption(IDS_MENU_MOUSE_LOOKSPRING, m_pMainMenus->GetSmallFont(), 100, &m_bLookSpring);
	AddOnOffOption(IDS_MENU_MOUSE_USEWHEEL, m_pMainMenus->GetSmallFont(), 100, &m_bUseWheel);

	UpdateData(DFALSE);

	SetInputRateText();
}
Beispiel #2
0
// Build the menu
void CMenuJoystick::Build()
{
	// Make sure to call the base class
	CMenuBase::Build();	

//	m_pClientDE->CPrint("CMenuJoystick::Build called!"); // BLB TEMP
	
	CreateTitle("interface\\mainmenus\\options.pcx", IDS_MENU_TITLE_OPTIONS, m_pMainMenus->GetTitlePos());		
	SetOptionPos(m_pMainMenus->GetOptionsPos());
	SetItemSpacing(5);
	SetScrollWrap(DFALSE);	
	UseArrows(DTRUE, 300);

	m_bUseJoystick=g_pBloodClientShell->IsUseJoystick();

	// check if the joystick has been disabled by the advanced menu console variables
	HCONSOLEVAR hVar = m_pClientDE->GetConsoleVar( "joystickdisable");
	if (hVar != NULL) 
	{
		if (m_pClientDE->GetVarValueFloat(hVar) == 1) 
		{
			m_bUseJoystick = DFALSE;
			g_pBloodClientShell->SetUseJoystick(FALSE);
		}
	}

	// read in the JOYSTICK.CFG file
	m_pClientDE->ReadConfigFile ("joystick.cfg");

	UpdateData(DFALSE);
	BuildAxisMenus();	

	// Update the enable/disable status of the controls
	UpdateEnable();
}
Beispiel #3
0
void CMenuCharacterFiles::Build()
{
	CMenuBase::Build();

	SetOptionPos(MENU_FILE_FIELD_X + MENU_FILE_TEXT_OFFSET_X, MENU_FILE_FIELD_Y + MENU_FILE_TEXT_OFFSET_Y);
	SetItemSpacing(0);
	SetScrollWrap(DFALSE);

	// Remove all of the menu options
	RemoveAllOptions();

	if(m_nAction == MENU_ACTION_SAVE)
	{
		m_hEdit = AddEditOption("Type the filename:", 0, m_pMainMenus->GetSmallFont(), 135, 16, DNULL);
		m_hEdit->SetText("Default");
	}
	else
		InitFileList("Players");

	m_hTransColor = m_pClientDE->SetupColor1(1.0f, 0.0f, 1.0f, DFALSE);

	// Delete the surface of the file field
	if(m_hFileField)
		{ m_pClientDE->DeleteSurface(m_hFileField); m_hFileField = 0; }

	m_hFileField = m_pClientDE->CreateSurfaceFromBitmap("interface/mainmenus/dialog.pcx");
}
Beispiel #4
0
// Builds the menu
void CMenuBloodBath::Build()
{
	// Make sure to call the base class
	CMenuBase::Build();

	CreateTitle("interface\\mainmenus\\bloodbath.pcx", IDS_MENU_TITLE_BLOODBATH, m_pMainMenus->GetTitlePos());		
	SetOptionPos(m_pMainMenus->GetOptionsPos());
	SetItemSpacing(0);

	AddLargeTextItemOption(IDS_MENU_BLOODBATH_JOIN, MENU_CMD_JOIN_GAME);
	AddLargeTextItemOption(IDS_MENU_BLOODBATH_HOST, MENU_CMD_HOST_GAME);
	AddLargeTextItemOption(IDS_MENU_BLOODBATH_CHARSETUP, MENU_CMD_CHARACTER_SETUP_RESVERIFY);
}
Beispiel #5
0
// Build the menu
void CMenuKeyboard::Build()
{
	// Make sure to call the base class
	CMenuBase::Build();

	CreateTitle("interface\\mainmenus\\options.pcx", IDS_MENU_TITLE_OPTIONS, m_pMainMenus->GetTitlePos());		
	SetOptionPos(m_pMainMenus->GetOptionsPos());
	SetItemSpacing(5);
	SetScrollWrap(DFALSE);	

	m_nKeyboardTurnRate=(int)(g_pBloodClientShell->GetKeyboardTurnRate()*100.0f);

	// Add the controls
	CLTGUISliderCtrl *pCtrl=AddSliderOption(IDS_MENU_KEYBOARD_TURNSPEED, m_pMainMenus->GetSmallFont(), 100, m_pMainMenus->GetSurfaceSliderBar(), m_pMainMenus->GetSurfaceSliderTab(), &m_nKeyboardTurnRate);
	pCtrl->SetSliderRange(15, 400);
	pCtrl->SetSliderIncrement(15);

	UpdateData(DFALSE);
}
Beispiel #6
0
// Build the menu
void CMenuDisplay::Build()
{
	// Make sure to call the base class
	CMenuBase::Build();

	CreateTitle("interface\\mainmenus\\options.pcx", IDS_MENU_TITLE_OPTIONS, m_pMainMenus->GetTitlePos());		
	SetOptionPos(m_pMainMenus->GetOptionsPos());
	SetItemSpacing(0);
	SetScrollWrap(DFALSE);	

	// Show the please wait message
	m_pMainMenus->ShowSyncMessage(IDS_MENU_MESSAGE_PLEASEWAIT);

	// Build the array of renderers
	BuildRendererArray();

	// Add the "renderer" option
	m_pRendererCtrl=AddTextItemOption(DNULL, 0, m_pMainMenus->GetSmallFont());
	if (!m_pRendererCtrl)
	{
		return;
	}

	unsigned int i;
	for (i=0; i < m_rendererArray.GetSize(); i++)
	{
		// Load the renderer formating text.  This is "Renderer: [%s - %s]" in English
		HSTRING hRendererFormat=m_pClientDE->FormatString(IDS_MENU_DISPLAY_RENDERER, m_rendererArray[i].m_renderDll, m_rendererArray[i].m_description);		
		m_pRendererCtrl->AddString(hRendererFormat);		
		m_pClientDE->FreeString(hRendererFormat);
	}	

	// Add the "resolution" control
	m_pResolutionCtrl=AddTextItemOption(DNULL, 0, m_pMainMenus->GetSmallFont());
	if (!m_pResolutionCtrl)
	{
		return;
	}

	// Setup the resolution control based on the currently selected renderer
	SetupResolutionCtrl();

	// Add the detail option
	CLTGUITextItemCtrl *pCtrl=AddTextItemOption(DNULL, 0, m_pMainMenus->GetSmallFont(), 1, DTRUE, &m_nDetailLevel);
	pCtrl->AddString(IDS_MENU_DISPLAY_DETAIL_LOW);
	pCtrl->AddString(IDS_MENU_DISPLAY_DETAIL_MEDIUM);
	pCtrl->AddString(IDS_MENU_DISPLAY_DETAIL_HIGH);

	// Load the detail setting
	HCONSOLEVAR hVar=m_pClientDE->GetConsoleVar("GlobalDetail");
	if (hVar)
	{
		switch ((int)m_pClientDE->GetVarValueFloat(hVar))
		{
		case DETAIL_LOW:
			{
				m_nDetailLevel=0;
				break;
			}
		case DETAIL_MEDIUM:
			{
				m_nDetailLevel=1;
				break;
			}
		case DETAIL_HIGH:
			{
				m_nDetailLevel=2;
				break;
			}
		}
	}
	else
	{
		m_nDetailLevel=2;
	}

	UpdateData(DFALSE);
}