mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-01-22 17:41:11 +00:00
More wide screen stuff.
This commit is contained in:
parent
72379149b5
commit
b7d822adfd
2 changed files with 14 additions and 9 deletions
|
@ -8371,6 +8371,11 @@ UI_MouseEvent
|
|||
*/
|
||||
void _UI_MouseEvent(int dx, int dy)
|
||||
{
|
||||
const int MIN_X = (int)(0.5f * (SCREEN_WIDTH - SCREEN_HEIGHT * uiInfo.uiDC.glconfig.vidWidth / (float)uiInfo.uiDC.glconfig.vidHeight));
|
||||
const int MAX_X = SCREEN_WIDTH - MIN_X;
|
||||
const int MIN_Y = 0;
|
||||
const int MAX_Y = SCREEN_HEIGHT;
|
||||
|
||||
//Makro - added tablet code
|
||||
if (ui_RQ3_tabletMode.integer)
|
||||
{
|
||||
|
@ -8384,15 +8389,15 @@ void _UI_MouseEvent(int dx, int dy)
|
|||
uiInfo.uiDC.cursory += dy;
|
||||
}
|
||||
|
||||
if (uiInfo.uiDC.cursorx < 0)
|
||||
uiInfo.uiDC.cursorx = 0;
|
||||
else if (uiInfo.uiDC.cursorx > SCREEN_WIDTH)
|
||||
uiInfo.uiDC.cursorx = SCREEN_WIDTH;
|
||||
if (uiInfo.uiDC.cursorx < MIN_X)
|
||||
uiInfo.uiDC.cursorx = MIN_X;
|
||||
else if (uiInfo.uiDC.cursorx > MAX_X)
|
||||
uiInfo.uiDC.cursorx = MAX_X;
|
||||
|
||||
if (uiInfo.uiDC.cursory < 0)
|
||||
uiInfo.uiDC.cursory = 0;
|
||||
else if (uiInfo.uiDC.cursory > SCREEN_HEIGHT)
|
||||
uiInfo.uiDC.cursory = SCREEN_HEIGHT;
|
||||
if (uiInfo.uiDC.cursory < MIN_Y)
|
||||
uiInfo.uiDC.cursory = MIN_Y;
|
||||
else if (uiInfo.uiDC.cursory > MAX_Y)
|
||||
uiInfo.uiDC.cursory = MAX_Y;
|
||||
|
||||
if (Menu_Count() > 0) {
|
||||
//menuDef_t *menu = Menu_GetFocused();
|
||||
|
|
|
@ -6614,7 +6614,7 @@ void Menu_Paint(menuDef_t * menu, qboolean forcePaint)
|
|||
if (menu->fullScreen) {
|
||||
// implies a background shader
|
||||
// FIXME: make sure we have a default shader if fullscreen is set with no background
|
||||
DC->drawHandlePic(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, menu->window.background);
|
||||
DC->drawStretchPic(0, 0, DC->glconfig.vidWidth, DC->glconfig.vidHeight, 0.f, 0.f, 1.f, 1.f, menu->window.background, qfalse);
|
||||
} else if (menu->window.background) {
|
||||
// this allows a background shader without being full screen
|
||||
//UI_DrawHandlePic(menu->window.rect.x, menu->window.rect.y, menu->window.rect.w, menu->window.rect.h, menu->backgroundShader);
|
||||
|
|
Loading…
Reference in a new issue