From 544078d40e9affba321ef5e2d5ad665656462262 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Mon, 25 May 2009 04:16:10 -0500 Subject: Added Toggle Fullscreen confirmation and callback methods. LLViewerWindow::toggleFullscreenConfirm() LLViewerWindow::toggleFullscreenCallback() --- linden/indra/newview/llviewerwindow.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'linden/indra/newview/llviewerwindow.cpp') diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index 854d757..0c43b59 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp @@ -4612,6 +4612,27 @@ void LLViewerWindow::initFonts(F32 zoom_factor) gDirUtilp->getAppRODataDir() ); } + + +void LLViewerWindow::toggleFullscreenConfirm() +{ + gViewerWindow->alertXml("ConfirmToggleFullscreen", + LLViewerWindow::toggleFullscreenCallback, + (void *)this); +} + + +// static +void LLViewerWindow::toggleFullscreenCallback(S32 option, void *userdata) +{ + if( option == 0 ) + { + // User confirmed it. Here we go! + ((LLViewerWindow *)userdata)->toggleFullscreen( TRUE ); + } +} + + void LLViewerWindow::toggleFullscreen(BOOL show_progress) { if (mWindow) -- cgit v1.1