Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Multiwinia achievements window for scroll bar.
- //GameMenuWindow.cpp
- //Line: 3,252
- //at void GameMenuWindow::...
- //Scroll bar at line 3,297 and 3,298
- void GameMenuWindow::SetupAchievementsPage()
- {
- float leftX, leftY, leftW, leftH;
- float rightX, rightY, rightW, rightH;
- float titleX, titleY, titleW, titleH;
- float fontLarge, fontMed, fontSmall;
- float buttonW, buttonH, gap;
- GetPosition_LeftBox(leftX, leftY, leftW, leftH );
- GetPosition_RightBox(rightX, rightY, rightW, rightH );
- GetPosition_TitleBar(titleX, titleY, titleW, titleH );
- GetFontSizes( fontLarge, fontMed, fontSmall );
- GetButtonSizes( buttonW, buttonH, gap );
- float x = leftX + (leftW-buttonW)/2.0f;
- float y = leftY + buttonH;
- float fontSize = fontMed;
- float buttonX = x;
- buttonW = (titleW / 2.0f) * 0.9f;
- m_serverX = buttonX;
- m_serverY = y;
- m_serverW = titleW * 0.9f;
- m_serverH = (g_app->m_renderer->ScreenH()/16) * 1.6f; // 64 pixels is height of achievement images
- m_serverFontSize = fontSmall;
- m_serverGap = m_serverH;
- m_serverButtonOrderStartIndex = m_buttonOrder.Size();
- float yPos = leftY;
- yPos += buttonH * 0.5f;
- GameMenuTitleButton *title = new GameMenuTitleButton();
- title->SetShortProperties( "title", leftX+10, leftY+10, titleW-20, buttonH*1.5f, LANGUAGEPHRASE("multiwinia_menu_achievements") );
- title->m_fontSize = fontMed;
- RegisterButton( title );
- yPos += buttonH*1.5f;
- m_serverY = yPos;
- int scrollbarW = buttonH / 2.0f;
- int scrollbarX = leftX + titleW - (scrollbarW + 10);// 10 + buttonW;
- int scrollbarY = m_serverY;//leftY+10+buttonH*1.6f;
- int scrollbarH = (leftY + leftH - buttonH * 2)-scrollbarY;
- m_scrollBar = new ScrollBar(this);
- m_scrollBar->Create("scrollBar", scrollbarX, scrollbarY, scrollbarW, scrollbarH, 0, 10 );
- yPos = leftY + leftH - buttonH * 2;
- GameMenuButton *button = new BackPageButton( PageMain );
- button->SetShortProperties( "multiwinia_menu_back", buttonX, yPos, buttonW, buttonH, LANGUAGEPHRASE("multiwinia_menu_back") );
- button->m_fontSize = fontSize;
- RegisterButton( button );
- m_buttonOrder.PutData( button );
- m_setupAchievementsPage = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement