Mercurial > mm7
comparison GUI/GUIWindow.cpp @ 2506:9b96a51011fb
for sound
author | Ritor1 |
---|---|
date | Thu, 25 Sep 2014 10:39:49 +0600 |
parents | a77c34acdbc9 |
children | c7264ab7132f |
comparison
equal
deleted
inserted
replaced
2505:e3a619609dae | 2506:9b96a51011fb |
---|---|
1922 continue; | 1922 continue; |
1923 } | 1923 } |
1924 case WINDOW_PressedButton2: | 1924 case WINDOW_PressedButton2: |
1925 { | 1925 { |
1926 if ( pWindow->Hint != (char *)1 ) | 1926 if ( pWindow->Hint != (char *)1 ) |
1927 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 1927 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
1928 pButton = (GUIButton *)pWindow->ptr_1C; | 1928 pButton = (GUIButton *)pWindow->ptr_1C; |
1929 if ( pButton->uX >= 0 && pButton->uX <= window->GetWidth() ) | 1929 if ( pButton->uX >= 0 && pButton->uX <= window->GetWidth() ) |
1930 { | 1930 { |
1931 if ( pButton->uY >= 0 && pButton->uY <= window->GetHeight() ) | 1931 if ( pButton->uY >= 0 && pButton->uY <= window->GetHeight() ) |
1932 { | 1932 { |
1951 continue; | 1951 continue; |
1952 } | 1952 } |
1953 case WINDOW_CharactersPressedButton: | 1953 case WINDOW_CharactersPressedButton: |
1954 { | 1954 { |
1955 if ( pWindow->Hint != (char *)1 ) | 1955 if ( pWindow->Hint != (char *)1 ) |
1956 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 1956 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
1957 pButton = (GUIButton *)pWindow->ptr_1C; | 1957 pButton = (GUIButton *)pWindow->ptr_1C; |
1958 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[1]); | 1958 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[1]); |
1959 viewparams->bRedrawGameUI = 1; | 1959 viewparams->bRedrawGameUI = 1; |
1960 if ( pWindow->Hint ) | 1960 if ( pWindow->Hint ) |
1961 { | 1961 { |
1966 continue; | 1966 continue; |
1967 } | 1967 } |
1968 case WINDOW_PressedButton: | 1968 case WINDOW_PressedButton: |
1969 { | 1969 { |
1970 if ( pWindow->Hint != (char *)1 ) | 1970 if ( pWindow->Hint != (char *)1 ) |
1971 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 1971 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
1972 pButton = (GUIButton *)pWindow->ptr_1C; | 1972 pButton = (GUIButton *)pWindow->ptr_1C; |
1973 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]); | 1973 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]); |
1974 viewparams->bRedrawGameUI = 1; | 1974 viewparams->bRedrawGameUI = 1; |
1975 if ( pWindow->Hint ) | 1975 if ( pWindow->Hint ) |
1976 { | 1976 { |
1981 continue; | 1981 continue; |
1982 } | 1982 } |
1983 case WINDOW_5D: | 1983 case WINDOW_5D: |
1984 { | 1984 { |
1985 if ( pWindow->Hint != (char *)1 ) | 1985 if ( pWindow->Hint != (char *)1 ) |
1986 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 1986 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
1987 pButton = (GUIButton *)pWindow->ptr_1C; | 1987 pButton = (GUIButton *)pWindow->ptr_1C; |
1988 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[1]); | 1988 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[1]); |
1989 viewparams->bRedrawGameUI = 1; | 1989 viewparams->bRedrawGameUI = 1; |
1990 pWindow->Release(); | 1990 pWindow->Release(); |
1991 continue; | 1991 continue; |
1992 } | 1992 } |
1993 case WINDOW_SaveLoadBtn: | 1993 case WINDOW_SaveLoadBtn: |
1994 { | 1994 { |
1995 if (pWindow->Hint != (char *)1) | 1995 if (pWindow->Hint != (char *)1) |
1996 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | 1996 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
1997 pButton = (GUIButton *)pWindow->ptr_1C; | 1997 pButton = (GUIButton *)pWindow->ptr_1C; |
1998 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]); | 1998 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]); |
1999 pHint = pWindow->Hint; | 1999 pHint = pWindow->Hint; |
2000 viewparams->bRedrawGameUI = 1; | 2000 viewparams->bRedrawGameUI = 1; |
2001 if ( pHint && pHint != (char *)1 ) | 2001 if ( pHint && pHint != (char *)1 ) |
2008 continue; | 2008 continue; |
2009 } | 2009 } |
2010 case WINDOW_LoadGame_CancelBtn: | 2010 case WINDOW_LoadGame_CancelBtn: |
2011 { | 2011 { |
2012 if ( pWindow->Hint != (char *)1 ) | 2012 if ( pWindow->Hint != (char *)1 ) |
2013 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 2013 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
2014 pButton = (GUIButton *)pWindow->ptr_1C; | 2014 pButton = (GUIButton *)pWindow->ptr_1C; |
2015 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]); | 2015 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]); |
2016 viewparams->bRedrawGameUI = 1; | 2016 viewparams->bRedrawGameUI = 1; |
2017 if ( pWindow->Hint && pWindow->Hint != (char *)1 ) | 2017 if ( pWindow->Hint && pWindow->Hint != (char *)1 ) |
2018 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0); | 2018 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0); |
2021 continue; | 2021 continue; |
2022 } | 2022 } |
2023 case WINDOW_CloseRestWindowBtn: | 2023 case WINDOW_CloseRestWindowBtn: |
2024 { | 2024 { |
2025 if ( pWindow->Hint != (char *)1 ) | 2025 if ( pWindow->Hint != (char *)1 ) |
2026 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | 2026 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
2027 pGUIButton = (GUIButton *)pWindow->ptr_1C; | 2027 pGUIButton = (GUIButton *)pWindow->ptr_1C; |
2028 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pGUIButton->pTextures[0]); | 2028 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pGUIButton->pTextures[0]); |
2029 pHint = pWindow->Hint; | 2029 pHint = pWindow->Hint; |
2030 viewparams->bRedrawGameUI = 1; | 2030 viewparams->bRedrawGameUI = 1; |
2031 if ( pHint && pHint != (char *)1 ) | 2031 if ( pHint && pHint != (char *)1 ) |
2035 continue; | 2035 continue; |
2036 } | 2036 } |
2037 case WINDOW_ExitCharacterWindow: | 2037 case WINDOW_ExitCharacterWindow: |
2038 { | 2038 { |
2039 if ( pWindow->Hint != (char *)1 ) | 2039 if ( pWindow->Hint != (char *)1 ) |
2040 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | 2040 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
2041 pButton = (GUIButton *)pWindow->ptr_1C; | 2041 pButton = (GUIButton *)pWindow->ptr_1C; |
2042 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[1]); | 2042 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[1]); |
2043 pHint = pWindow->Hint; | 2043 pHint = pWindow->Hint; |
2044 viewparams->bRedrawGameUI = 1; | 2044 viewparams->bRedrawGameUI = 1; |
2045 if ( pHint && pHint != (char *)1 ) | 2045 if ( pHint && pHint != (char *)1 ) |
2057 GUIButton2.uX = 27; | 2057 GUIButton2.uX = 27; |
2058 GUIButton2.uY = 161; | 2058 GUIButton2.uY = 161; |
2059 GUIButton2.uWidth = 171; | 2059 GUIButton2.uWidth = 171; |
2060 GUIButton2.uHeight = 37; | 2060 GUIButton2.uHeight = 37; |
2061 GUIButton2.pParent = pButton_RestUI_WaitUntilDawn->pParent; | 2061 GUIButton2.pParent = pButton_RestUI_WaitUntilDawn->pParent; |
2062 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | 2062 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
2063 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)pWindow->ptr_1C + 15)); | 2063 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)pWindow->ptr_1C + 15)); |
2064 viewparams->bRedrawGameUI = 1; | 2064 viewparams->bRedrawGameUI = 1; |
2065 GUIButton2.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, 0, 0);//Отдых и лечение 8 часов | 2065 GUIButton2.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, 0, 0);//Отдых и лечение 8 часов |
2066 GUIButton2.pParent = 0; | 2066 GUIButton2.pParent = 0; |
2067 pGUIWindow2 = pWindow; | 2067 pGUIWindow2 = pWindow; |