diff GUI/UI/UIMainMenu.cpp @ 2575:a76d408c5132 tip

DrawTranslucent -> DrawTextureGrayShade Removed old texture drawing stuff
author a.parshin
date Wed, 09 Mar 2016 01:39:52 +0200
parents dd36326a9994
children
line wrap: on
line diff
--- a/GUI/UI/UIMainMenu.cpp	Mon Mar 07 03:48:40 2016 +0200
+++ b/GUI/UI/UIMainMenu.cpp	Wed Mar 09 01:39:52 2016 +0200
@@ -67,9 +67,21 @@
     //    pWindow = pGUIWindow_CurrentMenu;
 
 
+    static bool b = false;
+    if (!b)
+    {
+        pUIAnim_Food->icon = pIconsFrameTable->GetIcon("torchA");
+        pIconsFrameTable->InitializeAnimation(pUIAnim_Food->icon->id);
+        b = true;
+    }
+
+    auto icon = pIconsFrameTable->GetFrame(pUIAnim_Food->icon->id, GetTickCount()/2);
+    pRenderer->DrawTextureAlphaNew(64 / 640.0f, 48 / 480.0f, icon->texture);
+
+
     if (GetCurrentMenuID() == MENU_MAIN)
     {
-        Texture_MM7 *pTexture = nullptr;
+        Image *pTexture = nullptr;
         if (!pModalWindow)// ???
         {
             auto pButton = pWindow->pControlsHead;
@@ -84,23 +96,23 @@
                     switch (pControlParam) // backlight for buttons
                     {
                     case 0:
-                        pTexture = pIcons_LOD->LoadTexturePtr("title_new", TEXTURE_16BIT_PALETTE);
+                        pTexture = assets->GetImage_16BitColorKey("title_new", 0x7FF);
                         pY = 172;
                         break;
                     case 1:
-                        pTexture = pIcons_LOD->LoadTexturePtr("title_load", TEXTURE_16BIT_PALETTE);
+                        pTexture = assets->GetImage_16BitColorKey("title_load", 0x7FF);
                         pY = 227;
                         break;
                     case 2:
-                        pTexture = pIcons_LOD->LoadTexturePtr("title_cred", TEXTURE_16BIT_PALETTE);
+                        pTexture = assets->GetImage_16BitColorKey("title_cred", 0x7FF);
                         pY = 282;
                         break;
                     case 3:
-                        pTexture = pIcons_LOD->LoadTexturePtr("title_exit", TEXTURE_16BIT_PALETTE);
+                        pTexture = assets->GetImage_16BitColorKey("title_exit", 0x7FF);
                         pY = 337;
                         break;
                     }
-                    pRenderer->DrawTextureTransparentColorKey(495, pY, pTexture);
+                    pRenderer->DrawTextureAlphaNew(495/640.0f, pY/480.0f, pTexture);
                 }
             }
         }