2 * Acess GUI (AxWin) Version 2
3 * By John Hodge (thePowersGang)
6 * > Main Overarching UI
11 int giInterface_Width = 0;
12 tElement *gpInterface_Sidebar;
13 tElement *gpInterface_MainArea;
14 tElement *gpInterface_HeaderBar;
15 tElement *gpInterface_TabBar;
16 tElement *gpInterface_TabContent;
20 * \brief Initialise the UI
22 void Interface_Init(void)
28 giInterface_Width = giScreenWidth/16;
30 // Set root window to no-border
33 // -- Create Sidebar --
34 gpInterface_Sidebar = WM_CreateElement(NULL, ELETYPE_TOOLBAR, ELEFLAG_VERTICAL);
35 WM_SetSize( gpInterface_Sidebar, giInterface_Width );
37 // --- Top segment ---
38 area = WM_CreateElement(gpInterface_Sidebar, ELETYPE_BOX, ELEFLAG_VERTICAL);
39 // ---- Menu Button ----
40 btn = WM_CreateElement(area, ELETYPE_BUTTON, ELEFLAG_NOSTRETCH);
41 WM_SetSize(btn, giInterface_Width);
42 //text = WM_CreateElement(btn, ELETYPE_IMAGE, ELEFLAG_SCALE);
43 //WM_SetText(text, "asset://LogoSmall.sif");
44 text = WM_CreateElement(btn, ELETYPE_TEXT, 0);
45 WM_SetText(text, "Acess");
47 // ---- Plain <hr/> style spacer ----
48 WM_CreateElement(area, ELETYPE_SPACER, 0);
50 // Open Windows Go Here
52 // --- Bottom Segment ---
53 area = WM_CreateElement(gpInterface_Sidebar, ELETYPE_BOX, ELEFLAG_VERTICAL|ELEFLAG_ALIGN_END);
55 // ---- Plain <hr/> style spacer ----
56 WM_CreateElement(area, ELETYPE_SPACER, 0);
58 // ---- Version String ----
59 text = WM_CreateElement(area, ELETYPE_TEXT, ELEFLAG_WRAP);
60 WM_SetText(text, "AxWin 1.0");
62 // -- Create Main Area and regions within --
63 gpInterface_MainArea = WM_CreateElement(NULL, ELETYPE_BOX, ELEFLAG_VERTICAL);
64 gpInterface_HeaderBar = WM_CreateElement(gpInterface_MainArea, ELETYPE_BOX, 0);
65 gpInterface_TabBar = WM_CreateElement(gpInterface_MainArea, ELETYPE_TABBAR, 0);
66 gpInterface_TabContent = WM_CreateElement(gpInterface_MainArea, ELETYPE_BOX, 0);
69 void Interface_Update(void)
71 giInterface_Width = giScreenWidth/16;
72 WM_SetSize( gpInterface_Sidebar, giInterface_Width );
75 void Interface_Render(void)
80 giInterface_Width, giScreenHeight,