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:
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);
int nResults = 0;
nResults = m_MsgBox.EventHandler(Event);
if(nResults == MessageBox::Buttons::Yes)
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:
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!