void OnGUI() { OnGUI_Before("Werte? Wozu?"); OnGUI_ScrollViewStart(); GUILayout.Label("Menschenrechte wirken sich auf unseren Alltag aus\n\nVergleiche:", Master.styleTextHeaderCenter); GUILayout.BeginHorizontal(); GUILayout.Label("MIT Menschenrechte", Master.styleBoxTorquise, GUILayout.Height(Master.guiElementHeightDefault * 1.5f)); GUILayout.FlexibleSpace(); GUILayout.Label("OHNE Menschenrechte", Master.styleBoxRed, GUILayout.Height(Master.guiElementHeightDefault * 1.5f)); GUILayout.EndHorizontal(); GUILayout.BeginVertical(); GUILayout.Label("", GUILayout.Height(DisplayMetricsUtil.DpToPixel(1))); OnGUI_Line("Heirat", "Ich heirate, wen ich will und liebe.", "Ich werde verheiratet und es wird keine Rücksicht darauf genommen, wen ich liebe."); OnGUI_Line("Religion", "Ich glaube an einen oder keinen Gott. \nIch wechsle meine Religion.", "Religionswechsel ist nicht drin. \nDas könnte tödlich ausgehen!"); OnGUI_Line("Hautfarbe", "Meine Hautfarbe ist gelb, oder weiß , oder schwarz …egal, ich kann im Bus sitzen, wo ich will.", "Meine Hautfarbe ist gelb, oder weiß , oder schwarz …und davon hängt ab, wo ich im Bus sitze."); OnGUI_Line("Bildung", "Ich habe ein Recht darauf zu studieren.", "Bildung ist ein Privileg. Ich kann‘s mir nicht leisten - Pech gehabt! \nIch bin eine Frau – Pech gehabt! \nIch hab die falsche Hautfarbe – Pech gehabt!"); OnGUI_Line("Selbst-/Fremdbestimmung", "Mein Leben gehört mir. Ich entscheide selbst darüber.", "Mein Leben wird von willkürlichen Regeln von Staat und Kirche fremdbestimmt."); OnGUI_Line("Sozialer Status", "Ich bin gleich viel wert wie ein Mann, mein Nachbar, der Bundespräsident.", "Als Frau bin ich weniger wert als ein Mann. Die soziale Oberschicht hat mehr Rechte als die Unterschicht."); OnGUI_Line("Arbeit", "Ich habe ein Recht auf angemessene Bezahlung.", "Ich muss arbeiten wie ein Sklave, und schlimmer noch, ich werde wie einer bezahlt."); GUILayout.EndVertical(); OnGUI_ScrollViewEnd(); }
void Update_PositionOfTheValues() { float addToX = Master.globalContentPadding; float addToY = Master.getTitleBarHeight() + HOVContainer.spaceBetweenTitlebarAndHistoryTexture; curValueSmallLocation.x += addToX; curValueSmallLocation.y += addToY; // Special treatment: Y-axis of Locations of all values(small ones in the big histery texture) should be a little bit more. // I do not have an idea why but this is the easiest way. curValueSmallLocation.y += DisplayMetricsUtil.DpToPixel(4); Vector2 relZoomValueLocation = HOVContainer.valuePos1; if (currentStep > 11) { relZoomValueLocation = HOVContainer.valuePos2; } if (currentStep > 16) { relZoomValueLocation = HOVContainer.valuePos3; } if (currentStep > 22) { relZoomValueLocation = HOVContainer.valuePos4; } curValueBigLocation = new Vector2(relZoomValueLocation.x + addToX, relZoomValueLocation.y + addToY); }
private void OnGUI_Line(string lineHeader, string lineTextWith, string lineTextWithout) { GUILayout.BeginVertical(); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label(lineHeader, Master.styleTextHeader); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.BeginVertical(Master.styleBoxGreyLineOnTop); int indent = Mathf.RoundToInt(DisplayMetricsUtil.DpToPixel(DisplayMetricsUtil.PixelToDp(Screen.width) / 8)); GUILayout.BeginHorizontal(GUILayout.MaxHeight(0)); OnGUI_LineColumn(lineTextWith, Master.styleBoxTorquise); GUILayout.FlexibleSpace(); GUILayout.Label("", GUILayout.MinWidth(indent), GUILayout.Height(1)); // GUILayout.Height(1) it was not easy to find this solution for a not easy to understand problem GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("", GUILayout.MinWidth(indent), GUILayout.Height(1)); GUILayout.FlexibleSpace(); OnGUI_LineColumn(lineTextWithout, Master.styleBoxRed); GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.Label("", GUILayout.MinHeight(DisplayMetricsUtil.DpToPixel(5))); GUILayout.EndVertical(); }
private static void guiSkins() { menuSkin.button.fixedHeight = 56; // ABOVE: All values above ar in DP and will now be converted to pixel menuSkin.button = DisplayMetricsUtil.DpToPixel(menuSkin.button); // BELOW: All values below must be already converted from dp to pixel menuSkin.font = styleTextBigBold.font; menuSkin.button.fontSize = styleTextBigBold.fontSize; menuSkin.textField.fontSize = styleTextHeaderCenter.fontSize; menuSkin.textField.font = styleTextHeaderCenter.font; }
private static void initBaseValues() { fontSizeDefault = DisplayMetricsUtil.DpToPixel(baseFontSizeInDP); guiElementHeightDefault = DisplayMetricsUtil.DpToPixel(baseGuiElementHeightInDP); guiElementPaddingDefault = DisplayMetricsUtil.DpToPixel(baseGuiElementPaddingInDP); buttonHeightDefault = guiElementHeightDefault; globalContentPadding = DisplayMetricsUtil.DpToPixel(baseGlobalContentPadding); titleBarHeightInCaseOfPortrait = DisplayMetricsUtil.DpToPixel(baseTitleBarHeightInCaseOfPortrait); titleBarHeightInCaseOfLandscape = DisplayMetricsUtil.DpToPixel(baseTitleBarHeightInCaseOfLandscape); titleBarButtonHeight = DisplayMetricsUtil.DpToPixel(baseTitleBarButtonHeight); }
protected void OnGUI_ScrollViewEnd() { GUILayout.Label("", GUILayout.Height(Master.globalContentPadding / 2)); GUILayout.EndScrollView(); GUILayout.EndArea(); // White to Alpha blend for smooth scrolling at sharp borders int blendingHeight = DisplayMetricsUtil.DpToPixel(8); GUI.DrawTexture(new Rect(0, Master.getTitleBarHeight(), Screen.width, blendingHeight), Master.whiteToAlphaTexture); GUI.DrawTexture(new Rect(0, Screen.height - blendingHeight, Screen.width, blendingHeight), Master.alphaToWhiteTexture); }
private static void applyDefaultBorderMarginAndPadding(GUIStyle curStyle) { curStyle.border.top = 3; curStyle.border.right = 3; curStyle.border.bottom = 3; curStyle.border.left = 3; curStyle.margin.top = DisplayMetricsUtil.DpToPixel(4); curStyle.margin.right = DisplayMetricsUtil.DpToPixel(4); curStyle.margin.bottom = DisplayMetricsUtil.DpToPixel(4); curStyle.margin.left = DisplayMetricsUtil.DpToPixel(4); curStyle.padding.top = DisplayMetricsUtil.DpToPixel(3); curStyle.padding.right = DisplayMetricsUtil.DpToPixel(3); curStyle.padding.bottom = DisplayMetricsUtil.DpToPixel(3); curStyle.padding.left = DisplayMetricsUtil.DpToPixel(3); }
private void OnGUI_AddValue(int valueIndex) { //int baseIndentForStep = DisplayMetricsUtil.DpToPixel (40); //12 is good because first and last values text are at right side limted at the same time int tmp = Mathf.RoundToInt(DisplayMetricsUtil.GetShortSideInDP() / 50); //if (tmp < 40) { int baseIndentForStep = DisplayMetricsUtil.DpToPixel(tmp); //} GUILayout.BeginHorizontal(); GUILayout.Label("", GUILayout.Width(baseIndentForStep * valueIndex)); if (GUILayout.Button(new GUIContent(" " + valueComponents[valueIndex].valueTitle, valueComponents[valueIndex].valueTexture))) { currentStep = valueIndex; resetScrollPosition(); } GUILayout.EndHorizontal(); }
void OnGUI_GetActiveComponent(int index) { //BEFORE: GUILayout.BeginVertical (Master.styleBoxGreyWhite, GUILayout.ExpandHeight (true)); GUILayout.BeginVertical(GUILayout.ExpandHeight(true)); //TITLE GUILayout.Label(components[index].title, Master.styleTextHeaderPadding); //BEFORE: GUILayout.BeginVertical (Master.styleBoxWhiteGrey, GUILayout.ExpandHeight (true)); GUILayout.BeginVertical(Master.styleBoxGreyLineOnTop, GUILayout.ExpandHeight(true)); //TEXTURE GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (components [index].texture != null) { GUILayout.Label(components[index].texture, Master.styleTextDefaultCenter, GUILayout.Height(DisplayMetricsUtil.DpToPixel(130)), // GUILayout.Height is important because it resizes image to that height GUILayout.Width(DisplayMetricsUtil.DpToPixel(240))); // This will require a rectanlge with 130x240 which is ALWAYS taken. Even if texture is smaller. } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); //TEXT GUILayout.Label(components[index].text, Master.styleTextDefault); //URL GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (components [index].url != null) { if (GUILayout.Button(components [index].linkText, Master.styleButtonTorquise, GUILayout.Height(Master.guiElementHeightDefault))) { Application.OpenURL(components[index].url); } } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.EndVertical(); }
public static void init(int textureHistoryOrigWidth, int textureHistoryOrigHeight) { float percentWidthOfScreen = 0.97f; textureHistoryWidth = DisplayMetricsUtil.GetLongSide() * percentWidthOfScreen; textureHistoryHeight = textureHistoryWidth * textureHistoryOrigHeight / textureHistoryOrigWidth; textureHistoryScale = textureHistoryWidth / textureHistoryOrigWidth; valuePos1 = new Vector2(valuePos1.x * scale1750To1024 * textureHistoryScale, valuePos1.y * scale1750To1024 * textureHistoryScale); valuePos2 = new Vector2(valuePos2.x * scale1750To1024 * textureHistoryScale, valuePos2.y * scale1750To1024 * textureHistoryScale); valuePos3 = new Vector2(valuePos3.x * scale1750To1024 * textureHistoryScale, valuePos3.y * scale1750To1024 * textureHistoryScale); valuePos4 = new Vector2(valuePos4.x * scale1750To1024 * textureHistoryScale, valuePos4.y * scale1750To1024 * textureHistoryScale); timeAgeTextY = Mathf.RoundToInt(timeAgeTextY * scale1750To1024 * textureHistoryScale); timeAgeTextX1 = Mathf.RoundToInt(timeAgeTextX1 * scale1750To1024 * textureHistoryScale); timeAgeTextX2 = Mathf.RoundToInt(timeAgeTextX2 * scale1750To1024 * textureHistoryScale); timeAgeTextX3 = Mathf.RoundToInt(timeAgeTextX3 * scale1750To1024 * textureHistoryScale); timeAgeTextX4 = Mathf.RoundToInt(timeAgeTextX4 * scale1750To1024 * textureHistoryScale); timeAgeTextX5 = Mathf.RoundToInt(timeAgeTextX5 * scale1750To1024 * textureHistoryScale); Vector2 size = Master.styleTextDefault.CalcSize(new GUIContent("Altertum")); timeAgeTextRect1 = calcTimeAgeTextRect(timeAgeTextX2, timeAgeTextX1, size.y); timeAgeTextRect2 = calcTimeAgeTextRect(timeAgeTextX3, timeAgeTextX2, size.y); timeAgeTextRect3 = calcTimeAgeTextRect(timeAgeTextX4, timeAgeTextX3, size.y); timeAgeTextRect4 = calcTimeAgeTextRect(timeAgeTextX5, timeAgeTextX4, size.y); float tmp = DisplayMetricsUtil.GetLongSideInDP() / 8f; if (tmp >= 100) { textureValuesWidth = Mathf.RoundToInt(DisplayMetricsUtil.DpToPixel(100)); } else { textureValuesWidth = Mathf.RoundToInt(DisplayMetricsUtil.DpToPixel(tmp)); } textureAdditionalHeight = Mathf.RoundToInt(DisplayMetricsUtil.DpToPixel(100)); textureAdditionalWidth = Mathf.RoundToInt(DisplayMetricsUtil.DpToPixel(80)); }
void OnGUI() { OnGUI_Before("TeamFreiheit"); OnGUI_ScrollViewStart(); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label(logo, Master.styleTextDefaultCenter, GUILayout.Width(DisplayMetricsUtil.DpToPixel(240)), GUILayout.Height(DisplayMetricsUtil.DpToPixel(120))); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.Label("teamfreiheit.info", Master.styleTextDefaultTorquise); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Zur Website", Master.styleButtonTorquise, GUILayout.Height(Master.guiElementHeightDefault))) { //TODO debugTouchCounter = 100; //Application.OpenURL ("http://teamfreiheit.info"); } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); if (debugTouchCounter > debugTouchCountActiv) { OnGUI_debugInfo(); } OnGUI_Header("Über diese App"); GUILayout.Label("Diese App wurde von TeamFreiheit geschrieben, mit dem Ziel die Werte Europas zu vermitteln.", Master.styleTextDefault); OnGUI_Header("Wer ist 'TeamFreiheit'?"); GUILayout.Label("'TeamFreiheit' ist eine humanistische Organisation mit Sitz in Österreich, die sich unabhängig und überparteilich für den Erhalt der Freiheiten in Europa einsetzt. ", Master.styleTextDefault); OnGUI_ScrollViewEnd(); }
private void initTextures() { HOVContainer.init(h5X.width, h5X.height); mainMenuButtonTexture = ScaleTexture(mainMenuButtonTextureBASE, titleBarButtonHeight * 0.7f); arrowLeftI = ScaleTexture(arrowLeftX, titleBarButtonHeight * 0.7f); arrowRightI = ScaleTexture(arrowRightX, titleBarButtonHeight * 0.7f); infoTextureI = ScaleTexture(infoTextureX, titleBarButtonHeight * 0.7f); facebookI = ScaleTexture(facebookTexture, titleBarButtonHeight * 0.65f); menuIconDefault = ScaleTexture(menuIconDefault, Master.guiElementHeightDefault); menuIconQuestionMark = ScaleTexture(questionMarkTextureX, Master.guiElementHeightDefault); Texture2D h1 = scaletimeAgeTexture(h1X); Texture2D h2 = scaletimeAgeTexture(h2X); Texture2D h3 = scaletimeAgeTexture(h3X); Texture2D h4 = scaletimeAgeTexture(h4X); Texture2D h5 = scaletimeAgeTexture(h5X); Texture2D v1 = scaleValuesTexture(v1X); Texture2D v2 = scaleValuesTexture(v2X); Texture2D v3 = scaleValuesTexture(v3X); Texture2D v4 = scaleValuesTexture(v4X); Texture2D v5 = scaleValuesTexture(v5X); Texture2D v6 = scaleValuesTexture(v6X); v1p = ScaleTexture(v1X, Master.guiElementHeightDefault); v2p = ScaleTexture(v2X, Master.guiElementHeightDefault); v3p = ScaleTexture(v3X, Master.guiElementHeightDefault); v4p = ScaleTexture(v4X, Master.guiElementHeightDefault); v5p = ScaleTexture(v5X, Master.guiElementHeightDefault); v6p = ScaleTexture(v6X, Master.guiElementHeightDefault); int valueBigSize = DisplayMetricsUtil.DpToPixel(100); v1b = ScaleTexture(v1X, valueBigSize); v2b = ScaleTexture(v2X, valueBigSize); v3b = ScaleTexture(v3X, valueBigSize); v4b = ScaleTexture(v4X, valueBigSize); v5b = ScaleTexture(v5X, valueBigSize); v6b = ScaleTexture(v6X, valueBigSize); Texture2D v1l = scaleValuesTexture(v1lX); Texture2D v2l = scaleValuesTexture(v2lX); Texture2D v3l = scaleValuesTexture(v3lX); Texture2D v4l = scaleValuesTexture(v4lX); Texture2D v5l = scaleValuesTexture(v5lX); Texture2D v6l = scaleValuesTexture(v6lX); /* * p1 = ScaleTextureByMax (p1X, DisplayMetricsUtil.GetLongSide() * 0.9f , p1X.height); * p2 = ScaleTextureByMax (p2X, DisplayMetricsUtil.GetLongSide() * 0.9f , (DisplayMetricsUtil.GetShortSide() - Master.titleBarHeightInCaseOfLandscape) * 0.9f); * p3a = ScaleTextureByMax (p3aX, DisplayMetricsUtil.GetLongSide() * 0.9f , (DisplayMetricsUtil.GetShortSide() - Master.titleBarHeightInCaseOfLandscape) * 0.9f); * p3b = ScaleTextureByMax (p3bX, DisplayMetricsUtil.GetLongSide() * 0.9f , (DisplayMetricsUtil.GetShortSide() - Master.titleBarHeightInCaseOfLandscape) * 0.9f); * p4a = ScaleTextureByMax (p4aX, DisplayMetricsUtil.GetLongSide() * 0.9f , (DisplayMetricsUtil.GetShortSide() - Master.titleBarHeightInCaseOfLandscape) * 0.9f); * p4b = ScaleTextureByMax (p4bX, DisplayMetricsUtil.GetLongSide() * 0.9f , (DisplayMetricsUtil.GetShortSide() - Master.titleBarHeightInCaseOfLandscape) * 0.9f); * p5 = ScaleTextureByMax (p5X, DisplayMetricsUtil.GetLongSide() * 0.9f , (DisplayMetricsUtil.GetShortSide() - Master.titleBarHeightInCaseOfLandscape) * 0.9f); * p6 = ScaleTextureByMax (p6X, DisplayMetricsUtil.GetLongSide() * 0.9f , (DisplayMetricsUtil.GetShortSide() - Master.titleBarHeightInCaseOfLandscape) * 0.9f); */ p1 = p1X; p2 = p2X; p3a = p3aX; p3b = p3bX; p4a = p4aX; p4b = p4bX; p5 = p5X; p6 = p6X; Texture2D questionMark = scaleValuesTexture(questionMarkTextureX); //Texture2D emporer = ScaleTextureByMax (emperorTextureX, HOVContainer.textureAdditionalWidth, HOVContainer.textureAdditionalHeight); //Texture2D church = ScaleTextureByMax (churchTextureX, HOVContainer.textureAdditionalWidth, HOVContainer.textureAdditionalHeight); /* * circle1 = ScaleTextureByMax (circle1X, DisplayMetricsUtil.GetLongSide(), HOVContainer.textureHistoryHeight); * circle2 = ScaleTextureByMax (circle2X, DisplayMetricsUtil.GetLongSide(), HOVContainer.textureHistoryHeight); * circle3 = ScaleTextureByMax (circle3X, DisplayMetricsUtil.GetLongSide(), HOVContainer.textureHistoryHeight); * circle4 = ScaleTextureByMax (circle4X, DisplayMetricsUtil.GetLongSide(), HOVContainer.textureHistoryHeight); * circle5 = ScaleTextureByMax (circle5X, DisplayMetricsUtil.GetLongSide(), HOVContainer.textureHistoryHeight); * circle6 = ScaleTextureByMax (circle6X, DisplayMetricsUtil.GetLongSide(), HOVContainer.textureHistoryHeight); * circle7 = ScaleTextureByMax (circle7X, DisplayMetricsUtil.GetLongSide(), HOVContainer.textureHistoryHeight); */ circle1 = circle1X; circle2 = circle2X; circle3 = circle3X; circle3a = circle3aX; circle4 = circle4X; circle5 = circle5X; circle5a = circle5aX; circle6 = circle6X; circle6a = circle6aX; circle7 = circle7X; circle7a = circle7aX; HOVComponent[] hovComponents = HOVContainer.hovComponents; hovComponents[0] = new HOVComponent(h1, v1, null, circle2, circle1, new Vector2(215, 440), HOVContainer.colorYellow); hovComponents[1] = new HOVComponent(h1, v2, null, circle3, circle3a, new Vector2(250, 400), HOVContainer.colorOrange); hovComponents[2] = new HOVComponent(h1, v3, null, circle4, null, new Vector2(293, 355), HOVContainer.colorRed); hovComponents[3] = new HOVComponent(h1, v4, null, circle5, circle5a, new Vector2(325, 325), HOVContainer.colorViolet); hovComponents[4] = new HOVComponent(h1, v5, null, circle6, circle6a, new Vector2(355, 295), HOVContainer.colorBlueDark); hovComponents[5] = new HOVComponent(h1, v6, null, circle7, null, new Vector2(390, 265), HOVContainer.colorBlueBright); hovComponents[6] = new HOVComponent(h1, null, null, circle7, circle7a, new Vector2(0, 0), Color.black); hovComponents[7] = new HOVComponent(h2, v6l, null, circle6, null, new Vector2(498, 237), HOVContainer.colorBlueBright); hovComponents[8] = new HOVComponent(h2, v5l, v4l, circle4, null, new Vector2(527, 280), HOVContainer.colorBlueDark); hovComponents[9] = new HOVComponent(h2, v3l, null, circle3, null, new Vector2(555, 360), HOVContainer.colorRed); hovComponents[10] = new HOVComponent(h2, v2l, v1l, circle1, null, new Vector2(588, 420), HOVContainer.colorOrange); hovComponents[11] = new HOVComponent(h3, null, null, null, null, new Vector2(0, 0), Color.black); hovComponents[12] = new HOVComponent(h4, v1, null, null, null, new Vector2(935, 440), HOVContainer.colorYellow); hovComponents[13] = new HOVComponent(h4, v2, null, null, null, new Vector2(1070, 360), HOVContainer.colorOrange); hovComponents[14] = new HOVComponent(h4, v3, null, null, null, new Vector2(1160, 290), HOVContainer.colorRed); hovComponents[15] = new HOVComponent(h4, v4, null, null, null, new Vector2(1255, 230), HOVContainer.colorViolet); hovComponents[16] = new HOVComponent(h4, v5, null, null, null, new Vector2(1290, 205), HOVContainer.colorBlueDark); hovComponents[17] = new HOVComponent(h4, v6, null, null, null, new Vector2(1435, 115), HOVContainer.colorBlueBright); hovComponents[18] = new HOVComponent(h5, questionMark, null, null, null, new Vector2(1491, 100), Color.black); }
private static void applyDefaultBorderMarginAndPaddingForButton(GUIStyle curStyle) { applyDefaultBorderMarginAndPadding(curStyle); curStyle.padding.right = DisplayMetricsUtil.DpToPixel(10); curStyle.padding.left = DisplayMetricsUtil.DpToPixel(10); }
private void OnGUI_debugInfo() { GUILayout.Label("\n\n\n\nDEBUG MODE\n", Master.styleTextStartSceneBig); GUILayout.BeginVertical(); GUILayout.Label("Current display settings", Master.styleTextHeader); GUILayout.Label(" DPI (in use)______: " + DisplayMetricsUtil.GetDPI_Debug(), Master.styleTextDefault); GUILayout.Label(" DPI by Unity______: " + Screen.dpi, Master.styleTextDefault); if (DisplayMetricsAndroid.IsAndroid) { GUILayout.Label(" DPI by Android____: " + DisplayMetricsAndroid.DensityDPI, Master.styleTextDefault); } GUILayout.Label(" Resolution type__: " + DisplayMetricsUtil.GetResolutionType(), Master.styleTextDefault); GUILayout.Label(" Scale____________: " + DisplayMetricsUtil.GetScale_DEBUG(), Master.styleTextDefault); GUILayout.Label(" Screensize_______: " + DisplayMetricsUtil.GetScreenSize_DEBUG(), Master.styleTextDefault); GUILayout.Label(" Short Side: " + DisplayMetricsUtil.GetShortSideInDP() + " dp = " + DisplayMetricsUtil.GetShortSide() + " pixel = " + DisplayMetricsUtil.GetShortSideInInch() + " inch = " + DisplayMetricsUtil.GetShortSideInCentimeters() + " cm", Master.styleTextDefault); GUILayout.Label(" Long Side: " + DisplayMetricsUtil.GetLongSideInDP() + " dp = " + DisplayMetricsUtil.GetLongSide() + " pixel = " + DisplayMetricsUtil.GetLongSideInInch() + " inch = " + DisplayMetricsUtil.GetLongSideInCentimeters() + " cm", Master.styleTextDefault); GUILayout.Label("Member information:", Master.styleTextHeader); GUILayout.Label(" Was there an internet connection(at last check) " + Member.internetConnectionExists, Master.styleTextDefault); GUILayout.Label(" Error message(In case an error occurred): " + Member.errorMessage, Master.styleTextDefault); if (GUILayout.Button("Delete Member information")) { Member.DeleteMember(); } GUILayout.Label("\n\n", Master.styleTextDefault); if (debugTouchCounter > debugTouchCountActiv * 4) { GUILayout.Label("Touch Data: \n" + debugTouchEnd, Master.styleTextDefault); GUILayout.Label("\n\n", Master.styleTextDefault); GUILayout.Label("How often was Update() called: " + countUpdate, Master.styleTextDefault); GUILayout.Label("\n\n\n", Master.styleTextDefault); GUILayout.Label("DisplayMetricsAndroid says", Master.styleTextHeader); GUILayout.Label(" IsAndroid=" + DisplayMetricsAndroid.IsAndroid, Master.styleTextDefault); if (DisplayMetricsAndroid.IsAndroid) { GUILayout.Label(" " + DisplayMetricsAndroid.HeightPixels + "x" + DisplayMetricsAndroid.WidthPixels + " (Screen size)", Master.styleTextDefault); GUILayout.Label(" Density=" + DisplayMetricsAndroid.Density, Master.styleTextDefault); GUILayout.Label(" DensityDPI=" + DisplayMetricsAndroid.DensityDPI, Master.styleTextDefault); GUILayout.Label(" X-DPI=" + DisplayMetricsAndroid.XDPI, Master.styleTextDefault); GUILayout.Label(" Y-DPI=" + DisplayMetricsAndroid.YDPI, Master.styleTextDefault); float widthInch2 = DisplayMetricsAndroid.HeightPixels / DisplayMetricsAndroid.DensityDPI; float heightInch2 = DisplayMetricsAndroid.WidthPixels / DisplayMetricsAndroid.DensityDPI; GUILayout.Label(" " + widthInch2 + "x" + heightInch2 + " inch", Master.styleTextDefault); GUILayout.Label(" " + System.Math.Round(widthInch2 * 2.54f, 1) + "x" + System.Math.Round(heightInch2 * 2.54f, 1) + " (Calculated cm)", Master.styleTextDefault); } GUILayout.Label("\n\n\n", Master.styleTextDefault); GUILayout.Label("What is the right dpi for this display?", Master.styleTextDefault); GUILayout.Label("Measure below which grey line has 5.08 cm(+/-0.1; equal to 2 inch).", Master.styleTextDefault); GUILayout.Label("The line which matches is the right dpi:", Master.styleTextDefault); GUILayout.Label("The line should match the first grey line - if not then UI might not be as perfect as possible:", Master.styleTextDefault); GUILayout.Button("MATCH THIS", GUILayout.Height(15), GUILayout.Width(DisplayMetricsUtil.DpToPixel(160 * 2))); GUILayout.Button(" 96 dpi", GUILayout.Height(15), GUILayout.Width(96 * 2)); GUILayout.Button("101 dpi", GUILayout.Height(15), GUILayout.Width(101 * 2)); GUILayout.Button("160 dpi", GUILayout.Height(15), GUILayout.Width(160 * 2)); GUILayout.Button("213 dpi", GUILayout.Height(15), GUILayout.Width(213 * 2)); GUILayout.Button("234 dpi", GUILayout.Height(15), GUILayout.Width(234 * 2)); GUILayout.Button("240 dpi", GUILayout.Height(15), GUILayout.Width(240 * 2)); GUILayout.Button("267 dpi", GUILayout.Height(15), GUILayout.Width(267 * 2)); GUILayout.Button("285 dpi", GUILayout.Height(15), GUILayout.Width(285 * 2)); GUILayout.Button("294 dpi", GUILayout.Height(15), GUILayout.Width(294 * 2)); GUILayout.Button("312 dpi", GUILayout.Height(15), GUILayout.Width(312 * 2)); GUILayout.Button("326 dpi", GUILayout.Height(15), GUILayout.Width(326 * 2)); GUILayout.Button("342 dpi", GUILayout.Height(15), GUILayout.Width(342 * 2)); GUILayout.Button("367 dpi", GUILayout.Height(15), GUILayout.Width(367 * 2)); GUILayout.Button("380 dpi", GUILayout.Height(15), GUILayout.Width(380 * 2)); } GUILayout.EndVertical(); }
private static void textStyles() { // // ABSOLUTE DEFAULT settings for every text // // 16 ist the absolute Minimum Font Size - Also minimum on Galaxy ACE // styleTextDefault = new GUIStyle(); styleTextDefault.font = fontRegular; styleTextDefault.fontSize = baseFontSizeInDP; styleTextDefault.normal.textColor = Color.black; styleTextDefault.wordWrap = true; styleTextDefaultBold = new GUIStyle(styleTextDefault); styleTextDefaultBold.font = fontBold; styleTextDefaultBoldPadding = new GUIStyle(styleTextDefaultBold); styleTextDefaultBoldPadding.padding.top = 6; styleTextDefaultBoldPadding.padding.bottom = 1; styleTextDefaultBoldPadding.padding.left = 12; styleTextDefaultBoldPadding.padding.right = 12; styleTextDefaultBoldItalic = new GUIStyle(styleTextDefault); styleTextDefaultBoldItalic.font = fontBoldItalic; styleTextDefaultBoldItalic.fontStyle = FontStyle.Italic; styleTextDefaultItalic = new GUIStyle(styleTextDefault); styleTextDefaultItalic.font = fontItalic; styleTextDefaultItalic.fontStyle = FontStyle.Italic; styleTextDefaultPadding = new GUIStyle(styleTextDefault); styleTextDefaultPadding.padding.top = 10; styleTextDefaultPadding.padding.bottom = 10; styleTextDefaultPadding.padding.left = 10; styleTextDefaultPadding.padding.right = 10; styleTextDefaultCenter = new GUIStyle(styleTextDefault); styleTextDefaultCenter.alignment = TextAnchor.MiddleCenter; styleTextDefaultCenterItalic = new GUIStyle(styleTextDefaultItalic); styleTextDefaultCenterItalic.alignment = TextAnchor.MiddleCenter; styleTextDefaultTorquise = new GUIStyle(styleTextDefaultBold); styleTextDefaultTorquise.fontSize = baseFontSizeInDP + 6; //styleTextDefaultTorquise.fontStyle = FontStyle.Bold; styleTextDefaultTorquise.alignment = TextAnchor.MiddleCenter; styleTextDefaultTorquise.normal.textColor = new Color(0.173f, 0.741f, 0.722f); styleTextDefaultTorquise.onNormal.textColor = new Color(0.173f, 0.741f, 0.722f); styleTextDefaultTorquise.padding.top = 20; styleTextDefaultTorquise.padding.bottom = 2; styleTextDefaultTorquise.padding.left = 20; styleTextDefaultTorquise.padding.right = 20; styleTextDefaultRed = new GUIStyle(styleTextDefault); styleTextDefaultRed.alignment = TextAnchor.MiddleCenter; styleTextDefaultRed.normal.textColor = Color.red; styleTextDefaultRed.onNormal.textColor = Color.red; styleTextSmall = new GUIStyle(styleTextDefault); styleTextSmall.fontSize = baseFontSizeInDP - 2; styleTextSmallPadding = new GUIStyle(styleTextSmall); styleTextSmallPadding.padding.top = 8; styleTextSmallPadding.padding.bottom = 2; styleTextSmallPadding.padding.left = 20; styleTextSmallPadding.padding.right = 20; styleTextSmallCenter = new GUIStyle(styleTextSmall); styleTextSmallCenter.alignment = TextAnchor.MiddleCenter; styleTextSmallItalic = new GUIStyle(styleTextSmall); styleTextSmallItalic.fontStyle = FontStyle.Italic; styleTextSmallCenterItalic = new GUIStyle(styleTextSmallItalic); styleTextSmallCenterItalic.alignment = TextAnchor.MiddleCenter; styleTextBig = new GUIStyle(styleTextDefault); styleTextBig.fontSize = baseFontSizeInDP + 2; styleTextBigBold = new GUIStyle(styleTextBig); //styleTextBigBold.fontStyle = FontStyle.Bold; styleTextBigBold.font = fontBold; styleTextBigBoldPadding = new GUIStyle(styleTextBigBold); styleTextBigBoldPadding.padding.top = 6; styleTextBigBoldPadding.padding.bottom = 1; styleTextBigBoldPadding.padding.left = 12; styleTextBigBoldPadding.padding.right = 12; styleTextBigYellow = new GUIStyle(styleTextBig); //styleTextBigYellow.fontStyle = FontStyle.Bold; styleTextBigYellow.font = fontBold; styleTextBigYellow.normal.textColor = new Color(0.99f, 0.74f, 0f); styleTextBigYellow.onNormal.textColor = new Color(0.99f, 0.74f, 0f); styleTextBigYellow.padding.top = 20; styleTextBigYellow.padding.bottom = 2; styleTextBigYellow.padding.left = 20; styleTextBigYellow.padding.right = 20; // // Headers // styleTextHeader = new GUIStyle(styleTextDefault); styleTextHeader.fontSize = baseFontSizeInDP + 4; styleTextHeaderCenter = new GUIStyle(styleTextHeader); styleTextHeaderCenter.alignment = TextAnchor.MiddleCenter; styleTextHeaderPadding = new GUIStyle(styleTextHeader); styleTextHeaderPadding.padding.top = 30; // // Titles // styleTextTitleBar = new GUIStyle(styleTextDefault); styleTextTitleBar.fontSize = baseFontSizeInDP + 4; styleTextTitleBar.normal.textColor = Color.white; //styleTextTitleBar.fontStyle = FontStyle.Bold; styleTextTitleBar.font = fontBold; styleTextStartSceneBig = new GUIStyle(styleTextDefault); styleTextStartSceneBig.fontSize = Mathf.RoundToInt(baseFontSizeInDP + 10); styleTextStartSceneBig.normal.textColor = Color.black; styleTextStartSceneBig.alignment = TextAnchor.MiddleCenter; styleTextStartSceneBig.font = fontBold; styleTextStartSceneSmall = new GUIStyle(styleTextStartSceneBig); styleTextStartSceneSmall.fontSize = baseFontSizeInDP + 1; styleTextStartSceneSmall.font = fontRegular; styleTextAppCode = new GUIStyle(styleTextBigBold); styleTextAppCode.alignment = TextAnchor.MiddleRight; // // DP -> PIXEL // styleTextDefault = DisplayMetricsUtil.DpToPixel(styleTextDefault); styleTextDefaultBold = DisplayMetricsUtil.DpToPixel(styleTextDefaultBold); styleTextDefaultBoldPadding = DisplayMetricsUtil.DpToPixel(styleTextDefaultBoldPadding); styleTextDefaultBoldItalic = DisplayMetricsUtil.DpToPixel(styleTextDefaultBoldItalic); styleTextDefaultTorquise = DisplayMetricsUtil.DpToPixel(styleTextDefaultTorquise); styleTextDefaultRed = DisplayMetricsUtil.DpToPixel(styleTextDefaultRed); styleTextBigYellow = DisplayMetricsUtil.DpToPixel(styleTextBigYellow); styleTextDefaultItalic = DisplayMetricsUtil.DpToPixel(styleTextDefaultItalic); styleTextDefaultPadding = DisplayMetricsUtil.DpToPixel(styleTextDefaultPadding); styleTextDefaultCenter = DisplayMetricsUtil.DpToPixel(styleTextDefaultCenter); styleTextDefaultCenterItalic = DisplayMetricsUtil.DpToPixel(styleTextDefaultCenterItalic); styleTextSmall = DisplayMetricsUtil.DpToPixel(styleTextSmall); styleTextSmallItalic = DisplayMetricsUtil.DpToPixel(styleTextSmallItalic); styleTextSmallCenter = DisplayMetricsUtil.DpToPixel(styleTextSmallCenter); styleTextSmallCenterItalic = DisplayMetricsUtil.DpToPixel(styleTextSmallCenterItalic); styleTextSmallPadding = DisplayMetricsUtil.DpToPixel(styleTextSmallPadding); styleTextBig = DisplayMetricsUtil.DpToPixel(styleTextBig); styleTextBigBold = DisplayMetricsUtil.DpToPixel(styleTextBigBold); styleTextBigBoldPadding = DisplayMetricsUtil.DpToPixel(styleTextBigBoldPadding); styleTextHeader = DisplayMetricsUtil.DpToPixel(styleTextHeader); styleTextHeaderCenter = DisplayMetricsUtil.DpToPixel(styleTextHeaderCenter); styleTextHeaderPadding = DisplayMetricsUtil.DpToPixel(styleTextHeaderPadding); styleTextTitleBar = DisplayMetricsUtil.DpToPixel(styleTextTitleBar); styleTextStartSceneBig = DisplayMetricsUtil.DpToPixel(styleTextStartSceneBig); styleTextStartSceneSmall = DisplayMetricsUtil.DpToPixel(styleTextStartSceneSmall); styleTextAppCode = DisplayMetricsUtil.DpToPixel(styleTextAppCode); }
/** * PLAYER SETTINGS - SCRIPTING BACKEND - auf 64 bit gesetzt. Siehe: http://docs.unity3d.com/Manual/iphone-64bit.html * * Bundle Identifier * * The Bundle Identifier string MUST MATCH the provisioning profile of the game you are building. The basic structure of the identifier is com.CompanyName.GameName. This structure may vary internationally based on where you live, so always default to the string provided to you by Apple for your Developer Account. Your GameName is set up in your provisioning certificates, that are manageable from the Apple iPhone Developer Center website. Please refer to the Apple iPhone Developer Center website for more information on how this is performed. * * * * * TODO - CHECK PERFORMANCE IMPACT (IF IT IS NOT OBVIOUS I MIGHT JUST NEGLECT THIS) * What kind of performance impact will UnityGUI make on my games? * * A: UnityGUI is fairly expensive when many controls are used. * It is ideal to limit your use of UnityGUI to game menus or very minimal GUI Controls while your game is running. * It is important to note that every object with a script containing an OnGUI() call * will require additional processor time – even if it is an empty OnGUI() block. * It is best to disable any scripts that have an OnGUI() call if the GUI Controls are not being used. * You can do this by marking the script as enabled = false. * * * * Any other tips for using UnityGUI? * A: Try using GUILayout as little as possible. If you are not using GUILayout at all from one OnGUI() call, you can disable all GUILayout rendering using MonoBehaviour.useGUILayout = false; This doubles GUI rendering performance. Finally, use as few GUI elements while rendering 3D scenes as possible. */ void OnGUI() { OnGUI_Before(""); OnGUI_ScrollViewStart(); GUILayout.FlexibleSpace(); if (!Member.isMember) { if (!Member.connectionCheckCompleted || !Member.internetConnectionExists) { GUILayout.Label("DIE EUROPÄISCHEN WERTE", Master.styleTextStartSceneBig); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button(Master.circle7a, Master.styleButtonNoStyle, GUILayout.MaxHeight(DisplayMetricsUtil.GetShortSide() * 0.6f), GUILayout.MaxWidth(DisplayMetricsUtil.GetShortSide() * 0.6f))) { Application.LoadLevel("MainScene"); } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); if (Member.connectionCheckCompleted && !Member.internetConnectionExists) { GUILayout.Label("Bitte stellen Sie eine Verbindung mit dem Internet her.\nDas ist nur einmal notwendig.", Master.styleTextDefaultCenter); } else { GUILayout.Label("Die APP wird initialisiert.\nBitte warten ...", Master.styleTextDefaultCenter); } } else { // This code is reached when // - Connection check is completed // - Internet connection exists // - User is NOT a member //GUILayout.Label("Geben Sie unten Ihren Code ein,\nden Sie von TeamFreiheit erhalten,\n um die App zu aktivieren:", Master.styleTextDefaultCenter); //GUILayout.Label("", GUILayout.MinHeight(DisplayMetricsUtil.DpToPixel(3))); GUILayout.Label("APP CODE eingeben:", Master.styleTextHeaderCenter); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); //GUILayout.Label("APP CODE:", Master.styleTextAppCode, GUILayout.Height(Master.guiElementHeightDefault*1.1f)); //NOTE: Dirty small UI fix enteredMemberId = GUILayout.TextField(enteredMemberId, Master.menuSkin.textField, GUILayout.Height(Master.guiElementHeightDefault), GUILayout.Width(DisplayMetricsUtil.DpToPixel(130))); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.Label("", GUILayout.MinHeight(DisplayMetricsUtil.DpToPixel(3))); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Aktivieren", Master.styleButtonTorquise, GUILayout.Height(Master.guiElementHeightDefault), GUILayout.Width(DisplayMetricsUtil.DpToPixel(250)))) { Application.LoadLevel("MainScene"); } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.Label("", GUILayout.MinHeight(DisplayMetricsUtil.DpToPixel(5))); if (Member.checkFailed) { GUILayout.Label(Member.errorMessage, Master.styleTextDefaultRed); } else { if (!Member.isEveryone) { GUILayout.Label("Der Code ist nicht gültig", Master.styleTextDefaultRed); } } GUILayout.Label("", GUILayout.MinHeight(DisplayMetricsUtil.DpToPixel(5))); GUILayout.FlexibleSpace(); GUILayout.FlexibleSpace(); GUILayout.Label("Um einen App Code zu bekommen, \nschreiben Sie eine E-Mail mit dem Betreff \"APP CODE\" an:", Master.styleTextDefaultCenter); GUILayout.Label("", GUILayout.MinHeight(DisplayMetricsUtil.DpToPixel(3))); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button(GetActive.emailAdress, Master.styleButtonTorquise, GUILayout.Height(Master.guiElementHeightDefault))) { Application.OpenURL("mailto:" + GetActive.emailAdress); } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label("Besuchen Sie auch die Website:", Master.styleTextDefaultCenter); GUILayout.Label("", GUILayout.MinHeight(DisplayMetricsUtil.DpToPixel(3))); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Europaeischewerte.info", Master.styleButtonTorquise, GUILayout.Height(Master.guiElementHeightDefault))) { Application.OpenURL(GetActive.urlEuropeanValues); } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); } } else { GUILayout.Label("DIE EUROPÄISCHEN WERTE", Master.styleTextStartSceneBig); GUILayout.Label("", GUILayout.MinHeight(DisplayMetricsUtil.DpToPixel(15))); GUILayout.BeginHorizontal(); GUILayout.Label("", GUILayout.MinWidth(DisplayMetricsUtil.DpToPixel(1))); // Indent complete menu to the right GUILayout.BeginVertical(); GUI.skin = Master.menuSkin; if (GUILayout.Button(new GUIContent(" Die Werte ", Master.v1p))) { Application.LoadLevel("ValuesScene"); } if (GUILayout.Button(new GUIContent(" Ihre Geschichte", Master.v2p))) { Application.LoadLevel("HistoryOfValuesScene"); } if (GUILayout.Button(new GUIContent(" Werte? Wozu?", Master.menuIconQuestionMark))) { Application.LoadLevel("NeedOfValues"); } if (GUILayout.Button(new GUIContent(" Was kann ich tun?", Master.menuIconDefault))) { Application.LoadLevel("GetActiveScene"); } GUILayout.EndVertical(); GUILayout.Label("", GUILayout.MinWidth(DisplayMetricsUtil.DpToPixel(1))); // Indent complete menu to the left GUILayout.EndHorizontal(); GUILayout.Label("", GUILayout.MinHeight(DisplayMetricsUtil.DpToPixel(15))); GUILayout.Label("Copyright by TeamFreiheit.info\nHumanistischer Verein für Demokratie und Menschenrechte", Master.styleTextStartSceneSmall); } GUILayout.FlexibleSpace(); GUILayout.FlexibleSpace(); OnGUI_ScrollViewEnd(); OnGUI_Button(); }
void OnGUI_0To4Sequence() { float usedScreenWidth = HOVContainer.textureHistoryWidth * 0.95f; float usedScreenHeight = Screen.height - Master.titleBarHeightInCaseOfLandscape - DisplayMetricsUtil.DpToPixel(90); if (currentStep == 0) { GUILayout.BeginVertical(); GUILayout.Label("Die Geschichte Europas ist von einem ständigen Wandel von Werten und den entsprechenden Weltbildern gekennzeichnet.\n", Master.styleTextHeaderCenter); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label(Master.p1, Master.styleTextDefaultCenter, GUILayout.Height(Master.p1.height * usedScreenWidth / Master.p1.width), GUILayout.Width(usedScreenWidth)); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.EndVertical(); } else if (currentStep == 1) { GUILayout.BeginVertical(); GUILayout.Label("Wandel der Weltbilder in Europa", Master.styleTextHeaderCenter); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label(Master.p2, Master.styleTextDefaultCenter, GUILayout.Height(Master.p2.height * usedScreenWidth / Master.p2.width), GUILayout.Width(usedScreenWidth)); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.EndVertical(); } else if (currentStep == 2) { GUILayout.BeginVertical(); GUILayout.Label("Von dem theozentrischen Weltbild\nmit Gott im Mittelpunkt des Denkens ...", Master.styleTextHeaderCenter); GUILayout.Label("", Master.styleButtonNoStyle, GUILayout.MinHeight(1)); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label(Master.circle1, Master.styleTextDefaultCenter, GUILayout.Height(usedScreenHeight), GUILayout.Width(usedScreenWidth / 2)); GUILayout.FlexibleSpace(); GUILayout.Label(Master.p3b, Master.styleTextDefaultCenter, GUILayout.Height(usedScreenHeight), GUILayout.Width(usedScreenWidth / 2)); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.EndVertical(); } else if (currentStep == 3) { GUILayout.BeginVertical(); GUILayout.Label("... zu dem humanistischen Weltbild\nmit dem Menschen im Mittelpunkt des Denkens!", Master.styleTextHeaderCenter); GUILayout.Label("", Master.styleButtonNoStyle, GUILayout.MinHeight(1)); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label(Master.circle7, Master.styleTextDefaultCenter, GUILayout.Height(usedScreenHeight), GUILayout.Width(usedScreenWidth / 2)); GUILayout.FlexibleSpace(); GUILayout.Label(Master.p4b, Master.styleTextDefaultCenter, GUILayout.Height(usedScreenHeight), GUILayout.Width(usedScreenWidth / 2)); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.EndVertical(); } else if (currentStep == 4) { GUILayout.BeginVertical(); GUILayout.Label("Humanistische Entwicklung in Europa.", Master.styleTextDefaultBold); GUILayout.Label("Diese Kurve veranschaulicht das Zu- oder Abnehmen der 6 grundlegenden Europäischen Werte in der Geschichte Europas.", Master.styleTextDefault); GUILayout.Label("", GUILayout.MinHeight(DisplayMetricsUtil.DpToPixel(3))); GUILayout.Label(Master.p5, Master.styleTextDefaultCenter, GUILayout.Height(Master.p5.height * usedScreenWidth / Master.p5.width), GUILayout.Width(usedScreenWidth)); GUILayout.Label("", GUILayout.MinHeight(DisplayMetricsUtil.DpToPixel(3))); GUILayout.Label("Zeichenerklärung der Sterne im Feld „Altertum“?", Master.styleTextDefaultBold); GUILayout.Label("Die Anzahl der Sterne zeigt, in welchem Maße die humanistischen Prinzipien Eingang in die gesellschaftliche Ordnung der Antike gefunden haben. Die Bewertung reicht von 6 Sternen für die volle Umsetzung des neuen Denkens bis zu einem Stern für eine nur sehr begrenzte Umsetzung. ", Master.styleTextDefault); GUILayout.Label("", GUILayout.MinHeight(DisplayMetricsUtil.DpToPixel(9))); GUILayout.Label(Master.p6, Master.styleTextDefaultCenter, GUILayout.Height(Master.p6.height * usedScreenWidth / Master.p6.width), GUILayout.Width(usedScreenWidth)); GUILayout.Label("Unter besonderer Berücksichtigung dieser Entwicklungen und Ereignisse:", Master.styleTextDefault); GUILayout.Label(" - Griechische Antike (800 - 146 v. Chr.)", Master.styleTextDefault); GUILayout.Label(" - Römische Antike (509 v. Chr. - 500 n. Chr.)", Master.styleTextDefault); GUILayout.Label(" - Christentum wird Staatsreligion (380 n. Chr.) ", Master.styleTextDefault); GUILayout.Label(" - Renaissance (1450-1600)", Master.styleTextDefault); GUILayout.Label(" - Reformation (1517-1600)", Master.styleTextDefault); GUILayout.Label(" - Aufklärung (1600-1800)", Master.styleTextDefault); GUILayout.Label(" - Franz. Revolution (1789)\n", Master.styleTextDefault); GUILayout.FlexibleSpace(); GUILayout.EndVertical(); } }
void OnGUI() { OnGUI_Before("Ihre Geschichte"); if (DisplayMetricsUtil.isScreenPortrait()) { Rect guiArea = new Rect(Master.globalContentPadding, Master.getTitleBarHeight(), Screen.width - Master.globalContentPadding * 2, Screen.height - Master.getTitleBarHeight()); GUILayout.BeginArea(guiArea); GUILayout.Label("", GUILayout.Height(HOVContainer.spaceBetweenTitlebarAndHistoryTexture)); GUILayout.BeginVertical(); GUILayout.FlexibleSpace(); GUILayout.Label(portraitLandscape, Master.styleTextDefaultCenter, GUILayout.Height(DisplayMetricsUtil.DpToPixel(200))); GUILayout.FlexibleSpace(); GUILayout.EndVertical(); GUILayout.EndArea(); return; } if (currentStep < 5) { OnGUI_ScrollViewStart(); OnGUI_0To4Sequence(); OnGUI_ScrollViewEnd(); } else { OnGUI_5To23Sequence(); OnGUI_Value(); //OnGUI_timeAgeText (); - NOT NECESSARY ANYMORE } OnGUI_Button(); }
void OnGUI() { OnGUI_Before("Was kann ich tun?"); OnGUI_ScrollViewStart(); int spaceAfterYellowText = DisplayMetricsUtil.DpToPixel(20); int spaceAfterGetActiveComponent = DisplayMetricsUtil.DpToPixel(30); for (int i = 0; i < components.Length; i++) { if (i == 0) { GUILayout.Label("Jeder kann etwas auf seine Weise beitragen!\n" + "Und jeder hat Verantwortung für kommende Generationen!", Master.styleTextBigYellow); GUILayout.Label("", GUILayout.MinHeight(spaceAfterYellowText)); GUILayout.Label("Informier dich", Master.styleTextDefaultTorquise); } else if (i == 3) { GUILayout.Label("Informier dich über die Europäischen Werte", Master.styleTextDefaultTorquise); } else if (i == 7) { GUILayout.Label("Werte müssen immer wieder aktiv eingefordert werden. Dort wo sie nicht eingefordert werden, werden sie sonst ignoriert und übergangen.", Master.styleTextBigYellow); GUILayout.Label("", GUILayout.MinHeight(spaceAfterYellowText)); GUILayout.Label("Sei selbst aktiv in der Demokratie", Master.styleTextDefaultTorquise); } else if (i == 11) { GUILayout.Label("Ein Wassertropfen allein versickert leicht unbemerkt – aber viele Tropfen werden zu einem mächtigen Strom!", Master.styleTextBigYellow); GUILayout.Label("", GUILayout.MinHeight(spaceAfterYellowText)); GUILayout.Label("Empfehle uns weiter, damit wir breiter aufgestellt sind", Master.styleTextDefaultTorquise); } else if (i == 13) { GUILayout.Label("Unterstütze uns", Master.styleTextDefaultTorquise); } else if (i == 15) { GUILayout.Label("Werde selbst aktiv bei TeamFreiheit", Master.styleTextDefaultTorquise); } OnGUI_GetActiveComponent(i); /* * if (i == 9){ * GUILayout.BeginHorizontal(); * GUILayout.FlexibleSpace (); * if (GUILayout.Button ("Tipps für Leserbrief",Master.styleButtonTorquise,GUILayout.Height(Master.guiElementHeightDefault))) { * Application.LoadLevel("HintsForLetterScene"); * } * GUILayout.FlexibleSpace (); * GUILayout.EndHorizontal (); * } */ GUILayout.Label("", GUILayout.MinHeight(spaceAfterGetActiveComponent)); } OnGUI_ScrollViewEnd(); }