Pasting and Creating Menu's

Posts 13 of 3 · Page 1 of 1
Pasting and Creating Menu's
Can anyone add my skype and give me a hand with this menu, Ive done a paste but need a bit of help changing gui and removing feautures.

thanks
Misty


Skype
Nekughi
Draw some boxes, check where your mouse is and if you clicked, if so then do something with that object. That's the most basic menu you can make probably. With the same logic you can achieve stuff like sliders, comboboxes and clickable buttons. Can show an example later.


Code:
class CMenuObject
{
public:
	std::wstring m_wstrName;
	int m_x;
	int m_y;
	int m_nValue;
	CMenuObject()
	{

	}
	int Get()
	{
		return this->m_nValue;
	}
	virtual void Draw()
	{

	}
};
Code:
class CBox : public CMenuObject
{
	int m_nIncreaseDecreaseBy;
	int m_nMaxValue;
	int m_nMinValue;
public:
	CBox(int x, int y, std::wstring wstrName, int max = 1, int min = 0, int nIncDecBy = 1)
	{
		this->m_x = x;
		this->m_y = y;
		this->m_wstrName = wstrName;
		this->m_nMaxValue = max;
		this->m_nMinValue = min;
		this->m_nIncreaseDecreaseBy = nIncDecBy;
	}
	virtual void Draw()
	{
		if (MouseInArea(MousePos, this->m_x, this->m_y, this->m_x + 15, this->m_y + 15))
		{
			if (LClicked)
			{
				this->m_nValue += this->m_nIncreaseDecreaseBy;
				if (this->m_nValue > this->m_nMaxValue)
					this->m_nValue = this->m_nMinValue;
			}
			if (RClicked)
			{
				this->m_nValue -= this->m_nIncreaseDecreaseBy;
				if (this->m_nValue < this->m_nMinValue)
					this->m_nValue = this->m_nMaxValue;
			}
			pDrawing->DrawOutlinedRect(m_x, m_y, m_x + 15, m_y + 15, Colors::Blue);
		}
		else
		{
			pDrawing->DrawOutlinedRect(m_x, m_y, m_x + 15, m_y + 15, Colors::Red);
		}
		pDrawing->DrawString(m_x + 15 + 5, m_y, Fonts::TimesNewRoman, Colors::White, (this->m_wstrName + L": " + std::to_wstring(this->m_nValue)).c_str());
	}
};


As for removing features, just look at the functions/names and remove shit that you don't need.
lol /2short
Posts 13 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?