• entries
707
1173
• views
433781

# Untitled

71 views

Well, I guess I'll repost since I only got one reply (thanks Telastyn.) Refer to the last entry and it's second comment.

I worked on another map for Malathedra today, almost completely finished (still needs graphics.) Not much I can really say without giving something away. So, moving on.

I worked a little bit on my 4E5 entry today. I copied a lot of code from my 5 Hour Demo. So far I have my splash screen and my main menu. I just got done implementing a message box system. Like Win32 it supports ok, ok-cancel, yes, yes-no, and yes-no-cancel. BUT, you have to position and size it accordingly (buttons are 100x24, so for yes-no-cancel, 320xHeight is the best choice. Here's a screenshot:

MessageBox w/ ButtonSets::YesNoCancel

I'm going to try a different implementation tomorrow, since with this you have to position, size, have an instance sitting around, track it's visibility, etc, etc. I'm not going to spend too much time on it though, since I need to move onto the actual game stuff.

Here's the code that uses it:
// Init()m_MsgBox.Set("Really quit?", "Are you sure you want to quit?", MessageBox::ButtonSets::YesNoCancel, (m_pGraphics->GetPresentParams().BackBufferWidth / 2) - 160, (m_pGraphics->GetPresentParams().BackBufferHeight / 2) - (96 / 2), 320, 96);// Frame()if(m_bQuitBoxVisible)	m_MsgBox.Render(m_pGraphics, m_pFont);//EventHandler()int nResults = 0;if(m_bQuitBoxVisible){	nResults = m_MsgBox.EventHandler(Event);	if(nResults == MessageBox::Buttons::Yes)		PostQuitMessage(0);	else if(nResults == MessageBox::Buttons::No)		m_bQuitBoxVisible = false;}

On a side note - is using static-const filled structs instead of enums a bad idea?

For example, my ButtonSets looks like so:
struct ButtonSets{    static const int Ok = 0;    static const int OkCancel = 1;    static const int YesNo = 2;    static const int YesNoCancel = 3;};

I really like accessing my values better this way.

Anyway, more tomorrow!
[/entry]

What API will you be using for the project?

-IV

Hey, Jack! Welcome back.

I'll be using C++, Win32, and DirectX9 for my project.

## Create an account

Register a new account