bool CGUIDialogVisualisationSettings::OnMessage(CGUIMessage &message)
{
  switch (message.GetMessage())
  {
  case GUI_MSG_CLICKED:
    {
      unsigned int iControl = message.GetSenderId();
      if (iControl >= CONTROL_START && iControl < CONTROL_PAGE)
        OnClick(iControl);
      return true;
    }
    break;
  case GUI_MSG_WINDOW_DEINIT:
  case GUI_MSG_VISUALISATION_UNLOADING:
    {
      FreeControls();
      m_pVisualisation = NULL;
      m_pSettings = NULL;
    }
    break;
  case GUI_MSG_VISUALISATION_LOADED:
    {
      SetVisualisation((CVisualisation *)message.GetLPVOID());
      SetupPage();
      SET_CONTROL_FOCUS(CONTROL_START, 0);
    }
  }
  return CGUIDialog::OnMessage(message);
}
void main(void)
{
	while ( ++num_items < MAX_PAGES ) selection_mem[num_items] = 0;
	while ( !IS_PLAYER_SCRIPT_CONTROL_ON(GetPlayerIndex()) ) WAIT(1000);
	//TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME("modmanager");
		
	while ( TRUE )
	{
		WAIT(0);
		SET_SLEEP_MODE_ACTIVE(TRUE);
		PRINT_MAIN_LOGO("GTA IV Mission Mod Pack v2.0", 0.30, 0.05);
		PRINT_DESC(0.28, 0.11, "Created by rodd1981 (c) www.facebook.com/gtamodz");
		MenuSetup();
		
		if (page != page_check ) 
		{
			SetupPage();
		}
		
		DrawPage();
		Nav();
		
		/*
		if (IS_GAME_KEYBOARD_KEY_JUST_PRESSED(KEY_F11))
		{
			TERMINATE_THIS_SCRIPT();
		}
		*/
	}
}
void CGUIDialogVisualisationSettings::OnInitWindow()
{
  // set our visualisation
  CGUIMessage msg(GUI_MSG_GET_VISUALISATION, 0, 0);
  g_graphicsContext.SendMessage(msg);
  SetVisualisation((CVisualisation *)msg.GetLPVOID());

  SetupPage();
  // reset the default control
  m_lastControlID = CONTROL_START;
  CGUIDialog::OnInitWindow();
}
Beispiel #4
0
static bool ShowCommonFilesDlg ( FileList_t & tList, bool bShortcut )
{
	ULARGE_INTEGER uSize;
	int nFiles, nFolders;

	DWORD dwIncAttrib = 0;
	DWORD dwExAttrib = 0;

	CalcTotalSize ( tList, uSize, nFiles, nFolders, dwIncAttrib, dwExAttrib, SlowCallback );
	SetCursor ( LoadCursor ( NULL, IDC_ARROW ) );

	const int nPages = bShortcut ? 3 : 2;
	PROPSHEETPAGE dPages [3];
    PROPSHEETHEADER tHeader;

	SetupPage ( dPages [0], Txt ( T_DLG_TAB_PROPS ),	IDD_FILE_PROPERTIES0, 	DlgProc0 );	
	SetupPage ( dPages [1], Txt ( T_DLG_TAB_TIMEATTR ),	IDD_FILE_PROPERTIES1,	DlgProc1 );
	if ( bShortcut )
		SetupPage ( dPages [2], Txt ( T_DLG_TAB_SHORTCUT ), IDD_FILE_SHORTCUT,	DlgProcShortcut );

    tHeader.dwSize 		= sizeof(PROPSHEETHEADER);
    tHeader.dwFlags 	= PSH_MAXIMIZE | PSH_PROPSHEETPAGE | PSH_USECALLBACK;
    tHeader.hwndParent 	= g_hMainWindow;
    tHeader.hInstance 	= ResourceInstance ();
    tHeader.nPages 		= nPages;
    tHeader.nStartPage 	= 0;
    tHeader.ppsp 		= (LPCPROPSHEETPAGE) &dPages;
    tHeader.pfnCallback = PropSheetProc;
 
	g_pPropsDlg = new PropsDlg_c ( tList, uSize, nFiles, nFolders, dwIncAttrib, dwExAttrib );
	int iRes = PropertySheet ( &tHeader );

	bool bChanged = false;
	if ( iRes == 1 )
		bChanged = g_pPropsDlg->ApplyChanges ();

	SafeDelete ( g_pPropsDlg );

	return bChanged;	
}