Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #region background
- float descWidth = Width / Main.ScreenWidth;
- float descHeight = MenuItems[CurrentIndex].GetDescriptionHeight();
- float descX = (Position.X + (Width / 2f)) / Main.ScreenWidth;
- float descY = (2f + MenuItemsYOffset + ((descHeight / 2f) * Main.ScreenHeight)) / Main.ScreenHeight + (28f / Main.ScreenHeight);
- //DrawRect()
- SetScriptGfxAlign(LeftAligned ? 76 : 82, 84);
- SetScriptGfxAlignParams(0f, 0f, 0f, 0f);
- DrawRect(descX, descY - descHeight / 2f, descWidth, 4f / Main.ScreenHeight, 0, 0, 0, 200);
- DrawSprite(Main._texture_dict, "gradient_bgd", descX, descY, descWidth, descHeight, 0f, 255, 255, 255, 255);
- ResetScriptGfxAlign();
- #endregion
- #region description text
- int font = 0;
- float size = 0.35f;
- SetScriptGfxAlign(76, 84);
- SetScriptGfxAlignParams(0f, 0f, 0f, 0f);
- BeginTextCommandDisplayText("CELL_EMAIL_BCON");
- SetTextFont(font);
- SetTextScale(size, size);
- SetTextJustification(1);
- string text = MenuItems[CurrentIndex].Description;
- string[] strings = CitizenFX.Core.UI.Screen.StringToArray(text);
- foreach (string s in strings)
- {
- AddTextComponentSubstringPlayerName(s);
- }
- if (LeftAligned)
- {
- SetTextWrap(0f, 500f / Main.ScreenWidth);
- EndTextCommandDisplayText(descX, descY);
- }
- else
- {
- SetTextWrap(0f, GetSafeZoneSize() - (15f / Main.ScreenWidth));
- EndTextCommandDisplayText((Main.ScreenWidth - 485f) / Main.ScreenWidth - (1f - GetSafeZoneSize()), descY - (descHeight / 2f) + (4f / Main.ScreenHeight));
- }
- ResetScriptGfxAlign();
- #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement