1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
#include "viewHeader.h"
cViewHeader::cViewHeader(skindesignerapi::cViewElement* viewElem)
{
m_pViewElem = std::shared_ptr<skindesignerapi::cViewElement>(viewElem);
m_eCurrentTab = ePlexMenuTab::pmtOnDeck;
}
void cViewHeader::Draw(cGridElement* elem)
{
m_pViewElem->Clear();
m_pViewElem->ClearTokens();
elem->AddTokens(m_pViewElem, false);
switch(m_eCurrentTab) {
case ePlexMenuTab::pmtOnDeck:
m_pViewElem->AddIntToken("istab1active", 1);
m_pViewElem->AddIntToken("istab2active", 0);
m_pViewElem->AddIntToken("istab3active", 0);
m_pViewElem->AddStringToken("tab1name", "On Deck");
break;
case ePlexMenuTab::pmtRecentlyAdded:
m_pViewElem->AddIntToken("istab1active", 0);
m_pViewElem->AddIntToken("istab2active", 1);
m_pViewElem->AddIntToken("istab3active", 0);
m_pViewElem->AddStringToken("tab2name", "Recently Added");
break;
case ePlexMenuTab::pmtLibrary:
m_pViewElem->AddIntToken("istab1active", 0);
m_pViewElem->AddIntToken("istab2active", 0);
m_pViewElem->AddIntToken("istab3active", 1);
m_pViewElem->AddStringToken("tab3name", "Library");
break;
}
m_pViewElem->Display();
}
ePlexMenuTab cViewHeader::NextTab()
{
switch(m_eCurrentTab) {
case ePlexMenuTab::pmtOnDeck:
m_eCurrentTab = ePlexMenuTab::pmtRecentlyAdded;
break;
case ePlexMenuTab::pmtRecentlyAdded:
m_eCurrentTab = ePlexMenuTab::pmtLibrary;
break;
case ePlexMenuTab::pmtLibrary:
m_eCurrentTab = ePlexMenuTab::pmtOnDeck;
break;
}
return m_eCurrentTab;
}
ePlexMenuTab cViewHeader::PrevTab()
{
switch(m_eCurrentTab) {
case ePlexMenuTab::pmtOnDeck:
m_eCurrentTab = ePlexMenuTab::pmtLibrary;
break;
case ePlexMenuTab::pmtRecentlyAdded:
m_eCurrentTab = ePlexMenuTab::pmtOnDeck;
break;
case ePlexMenuTab::pmtLibrary:
m_eCurrentTab = ePlexMenuTab::pmtRecentlyAdded;
break;
}
return m_eCurrentTab;
}
|