0ad/binaries/data/mods/public/gui/session/menu.js
Ykkrosh b08e142193 Graphics optimisations and features from eihrul.
Add shadow filtering (PCF) option.
Fix ugly shadow saturation in old lighting mode.
Fix fancy water shader.
Fix camera matrix computation.
Support scissoring of camera frustum.
Optimise vertex skinning.
Inline various matrix functions.
Support filtering of the list of submitted models before a rendering
pass, for more precise culling.
Optimise water renderer (fixes #721, based on patch by ortalo).
Use scissoring when generating reflection/refraction textures.
Skip reflection/refraction texture generation when no water is visible.
Render alpha-blended objects differently (fixes #434).
Reduce shadow swimming effects.

This was SVN commit r9814.
2011-07-12 23:48:05 +00:00

82 lines
2.0 KiB
JavaScript

function toggleDeveloperOverlay()
{
var devCommands = getGUIObjectByName("devCommands");
var text = devCommands.hidden? "opened." : "closed.";
submitChatDirectly("The Developer Overlay was " + text);
devCommands.hidden = !devCommands.hidden;
}
function openMenuDialog()
{
var menu = getGUIObjectByName("menuDialogPanel");
g_SessionDialog.open("Menu", null, menu, 156, 224, null);
}
function openSettingsDialog()
{
var settings = getGUIObjectByName("settingsDialogPanel");
g_SessionDialog.open("Settings", null, settings, 340, 252, null);
}
function openChat()
{
getGUIObjectByName("chatInput").focus(); // Grant focus to the input area
getGUIObjectByName("chatDialogPanel").hidden = false;
g_SessionDialog.close();
}
function closeChat()
{
getGUIObjectByName("chatInput").caption = ""; // Clear chat input
getGUIObjectByName("chatDialogPanel").hidden = true;
g_SessionDialog.close();
}
function toggleChatWindow()
{
var chatWindow = getGUIObjectByName("chatDialogPanel");
var chatInput = getGUIObjectByName("chatInput");
if (chatWindow.hidden)
chatInput.focus(); // Grant focus to the input area
else
chatInput.caption = ""; // Clear chat input
chatWindow.hidden = !chatWindow.hidden;
g_SessionDialog.close();
}
function togglePause()
{
var pauseOverlay = getGUIObjectByName("pauseOverlay");
if (pauseOverlay.hidden)
{
setPaused(true);
getGUIObjectByName("pauseButtonText").caption = "Unpause";
}
else
{
setPaused(false);
getGUIObjectByName("pauseButtonText").caption = "Pause";
}
pauseOverlay.hidden = !pauseOverlay.hidden;
g_SessionDialog.close();
}
function openExitGameDialog()
{
g_SessionDialog.open("Exit Game", "Do you really want to quit?", null, 320, 140, leaveGame);
}
function escapeKeyAction()
{
var sessionDialog = getGUIObjectByName("sessionDialog");
if (!sessionDialog.hidden)
g_SessionDialog.close();
else
getGUIObjectByName("chatDialogPanel").hidden = true;
}