Ejemplo n.º 1
0
 void OnGUI()
 {
     if (countryFocused)
     {
         Misc.Size imageSize   = Misc.getImageSize(focusedCountryCloseButton.width, focusedCountryCloseButton.height, 64, 64);
         float     imageWidth  = imageSize.width;
         float     imageHeight = imageSize.height;
         if (GUI.Button(new Rect(20, 20, imageWidth, imageHeight), focusedCountryCloseButton, GUIStyle.none))
         {
             StartCoroutine(unfocusCountry());
         }
     }
 }
Ejemplo n.º 2
0
    private void drawFailedStamp(ref float y, float windowWidth, bool onlyCalculation)
    {
        float center = windowWidth / 2f;

        Misc.Size imageSize   = Misc.getImageSize(failedStamp.width, failedStamp.height, 426, 230);
        float     imageWidth  = imageSize.width;
        float     imageHeight = imageSize.height;

        if (!onlyCalculation)
        {
            GUI.Label(new Rect(center - imageWidth / 2f, 20f + y, imageWidth, imageHeight), failedStamp);
        }
        y += 20f + imageHeight + 5f;
    }