Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
Minecraft referance
Browse files Browse the repository at this point in the history
  • Loading branch information
StormAxs committed Mar 2, 2024
1 parent 7bf17d1 commit 193990d
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/game/client/components/menus.h
Original file line number Diff line number Diff line change
Expand Up @@ -776,5 +776,6 @@ class CMenus : public CComponent
ColorHSLA RenderHSLScrollbars(CUIRect *pRect, unsigned int *pColor, bool Alpha = false, bool ClampedLight = false);

CServerProcess m_ServerProcess;
void RotateLabel(CUIRect rect, void *pVoid, const char *str, float d, ETextAlignment alignment, SLabelProperties properties, int i, void *pVoid1, float d1);
};
#endif
1 change: 1 addition & 0 deletions src/game/client/components/menus_ingame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1248,3 +1248,4 @@ void CMenus::RenderIngameHint()
TextRender()->Text(5, 280, 5, Localize("Menu opened. Press Esc key again to close menu."), -1.0f);
UI()->MapScreen();
}

2 changes: 1 addition & 1 deletion src/game/client/components/menus_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3244,7 +3244,7 @@ enum
};

void CMenus::RenderSettingsStA(CUIRect MainView)
{
{//TODO: buttons before upd
char aBuf[128];
static int s_CurTab = 0;

Expand Down
78 changes: 74 additions & 4 deletions src/game/client/components/menus_start.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,61 @@
#include <ctime> // For time()

std::vector<std::string> quotes = {
"Melon, keki4, and StormAxD",
"GAE",
"CHEEERYAAAAA",
"Client was made by -StormAx",
"don't use S-Client lol xD",
"Aslo try S-Client",
"Cook some maps today >:D",
"Hi!",
"Bye;c",
"You go gaming?",
"-StormAxD",
"Inner peace clan on top, isn't it?",
"The cake is lie :c",
"AH GG!!!!",
"YEPYEPYEPYEPYEP",
"My discord is 'stormaxd' go on!",
"Cheeru?",
"Cheeru!",
"Cheeru!?",
"Cheeru?!",
"The gamer is here!:D",
"OwO",
"UWU",
"QWQ",
"!ban 0.0.0.0-255.255.255.255",
"Me gamer :0, Me go hook random tees",
"PDGADHHAHDHAHAHADADAAAHAHAHAHAH",
"What is your best Grandma time? mine is 2:21:43",
"Со мной воюет сатана!!!!!!!",
"Never gonna give you.... forget it",
"AWwwwwww, you so cutie >.<",
"WhAt ThE...?",
"Kurw........Amach",
"Suka blyad'",
"Paxtell...",
"Number one roblox player",
"AYAYAAAAAA, ayakaaaaa",
"liga a camera ae!",
"Я рот ебал ваших ДДнетов",
"caos e regresso",
"Do HH right broh!",
"ПК это печь керамическая",
"melo melo melooon",
":gigachad:",
"-Dummygod was here",
"VAMO VER QM DA MAIS O RABO, PRA VER SE EU NUM GANHO!",
"muhehehehe",
"10/10",
"10010101010ERROR11010101010101010101011011010110ERROR101010011",
"voulez-vous couchez avec moi?!?",
"BlueMeww, Bluee... BlueMewing!... F*CK",
"ronyan'",
"W's in the shhhhhaaata :screamin':",
"W's in the shhhhhaaat :screamin':",




};

// Function to get a random quote
Expand Down Expand Up @@ -57,7 +109,7 @@ void CMenus::RenderStartMenu(CUIRect MainView)
}




const float Rounding = 10.0f;
const float VMargin = MainView.w / 2 - 190.0f;
Expand Down Expand Up @@ -168,6 +220,7 @@ void CMenus::RenderStartMenu(CUIRect MainView)
Menu.HSplitBottom(55.0f, &Menu, &Button);
static CButtonContainer s_LocalServerButton;


if(!is_process_alive(m_ServerProcess.m_Process))
KillServer();

Expand Down Expand Up @@ -238,6 +291,23 @@ void CMenus::RenderStartMenu(CUIRect MainView)
VersionUpdate.VSplitRight(50.0f, &CurVersion, 0);
VersionUpdate.VMargin(VMargin, &VersionUpdate);

CUIRect RandomText;
RandomText.x = 595.0f;
RandomText.y = 110.0f;
RandomText.w = 230.0f;
RandomText.h = 150.0f;
static bool Quote = false;

if (!Quote)
{
Quote = true;
dbg_msg("Quotes", "%s", randomQuote.c_str());
}

TextRender()->TextColor(1.0f, 1.0f, 0.0f, 1.0f);
UI()->DoLabel(&RandomText, randomQuote.c_str(), 20.0f, TEXTALIGN_ML);
TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f);

#if defined(CONF_AUTOUPDATE)

char aBuf[64];
Expand Down
1 change: 1 addition & 0 deletions src/game/client/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ void CUI::DoLabel(const CUIRect *pRect, const char *pText, float Size, int Align
TextRender()->TextEx(&Cursor, pText, -1);
}


void CUI::DoLabel(CUIElement::SUIElementRect &RectEl, const CUIRect *pRect, const char *pText, float Size, int Align, const SLabelProperties &LabelProps, int StrLen, const CTextCursor *pReadCursor) const
{
const int Flags = GetFlagsForLabelProperties(LabelProps, pReadCursor);
Expand Down
1 change: 1 addition & 0 deletions src/game/client/ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ class CUI
void DoSmoothScrollLogic(float *pScrollOffset, float *pScrollOffsetChange, float ViewPortSize, float TotalSize, bool SmoothClamp = false, float ScrollSpeed = 10.0f) const;
static vec2 CalcAlignedCursorPos(const CUIRect *pRect, vec2 TextSize, int Align, const float *pBiggestCharHeight = nullptr);


void DoLabel(const CUIRect *pRect, const char *pText, float Size, int Align, const SLabelProperties &LabelProps = {}) const;

void DoLabel(CUIElement::SUIElementRect &RectEl, const CUIRect *pRect, const char *pText, float Size, int Align, const SLabelProperties &LabelProps = {}, int StrLen = -1, const CTextCursor *pReadCursor = nullptr) const;
Expand Down

0 comments on commit 193990d

Please sign in to comment.