annotate GUI/UI/Books/AutonotesBook.cpp @ 2574:dd36326a9994

More texture refactoring GetLeather -> DrawTextureCustomHeight
author a.parshin
date Mon, 07 Mar 2016 03:48:40 +0200
parents 0c67be4ec900
children
rev   line source
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
1 #include "Engine/Engine.h"
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
2 #include "Engine/AssetsManager.h"
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
3 #include "Engine/LOD.h"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
4 #include "Engine/Party.h"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
5 #include "Engine/Timer.h"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
6 #include "Engine/Autonotes.h"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
7 #include "Engine/Awards.h"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
8 #include "Engine/texts.h"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
9 #include "Engine/Graphics/IRender.h"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
10 #include "Engine/Graphics/Viewport.h"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
11
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
12 #include "GUI/GUIFont.h"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
13 #include "GUI/UI/Books/AutonotesBook.h"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
14
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
15 #include "Media/Audio/AudioPlayer.h"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
16
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
17
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
18
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
19 Image *ui_book_autonotes_background = nullptr;
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
20
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
21
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
22 GUIWindow_AutonotesBook::GUIWindow_AutonotesBook() :
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
23 GUIWindow_Book()
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
24 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
25 this->ptr_1C = (void *)WINDOW_AutonotesBook; // inherited from GUIWindow::GUIWindow
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
26 BasicBookInitialization();
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
27
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
28 // --------------------------------
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
29 // 004304E7 Game_EventLoop --- part
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
30 pEventTimer->Pause();
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
31 pAudioPlayer->StopChannels(-1, -1);
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
32 pBooksButtonOverlay = new GUIWindow_BooksButtonOverlay(527, 353, 0, 0, (int)pBtn_Autonotes, 0);
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
33 bFlashAutonotesBook = 0;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
34
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
35 // ----------------------------------------------
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
36 // 00411BFC GUIWindow::InitializeBookView -- part
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
37 ui_book_autonotes_background = assets->GetImage_16BitColorKey(L"sbautnot", 0x7FF);
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
38 ui_book_quest_div_bar = assets->GetImage_16BitAlpha(L"divbar");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
39
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
40 ui_book_button1_on = assets->GetImage_16BitAlpha(L"tab-an-6b");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
41 ui_book_button2_on = assets->GetImage_16BitAlpha(L"tab-an-7b");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
42 ui_book_button3_on = assets->GetImage_16BitAlpha(L"tab-an-1b");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
43 ui_book_button4_on = assets->GetImage_16BitAlpha(L"tab-an-2b");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
44 ui_book_button5_on = assets->GetImage_16BitAlpha(L"tab-an-3b");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
45 ui_book_button6_on = assets->GetImage_16BitAlpha(L"tab-an-5b");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
46 ui_book_button7_on = assets->GetImage_16BitAlpha(L"tab-an-4b");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
47 ui_book_button8_on = assets->GetImage_16BitAlpha(L"tab-an-8b");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
48 ui_book_button1_off = assets->GetImage_16BitAlpha(L"tab-an-6a");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
49 ui_book_button2_off = assets->GetImage_16BitAlpha(L"tab-an-7a");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
50 ui_book_button3_off = assets->GetImage_16BitAlpha(L"tab-an-1a");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
51 ui_book_button4_off = assets->GetImage_16BitAlpha(L"tab-an-2a");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
52 ui_book_button5_off = assets->GetImage_16BitAlpha(L"tab-an-3a");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
53 ui_book_button6_off = assets->GetImage_16BitAlpha(L"tab-an-5a");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
54 ui_book_button7_off = assets->GetImage_16BitAlpha(L"tab-an-4a");
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
55 ui_book_button8_off = assets->GetImage_16BitAlpha(L"tab-an-8a");
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
56
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
57 pBtn_Book_1 = CreateButton(
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
58 pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, 50, 34, 1, 0,
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
59 UIMSG_ClickBooksBtn, 11, 0, pGlobalTXT_LocalizationStrings[193], ui_book_button1_on, 0
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
60 );
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
61 pBtn_Book_2 = CreateButton(
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
62 pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, 50, 34, 1, 0,
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
63 UIMSG_ClickBooksBtn, 10, 0, pGlobalTXT_LocalizationStrings[192], ui_book_button2_on, 0
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
64 );
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
65 pBtn_Book_3 = CreateButton(
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
66 pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, 50, 34, 1, 0,
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
67 UIMSG_ClickBooksBtn, 2, 0, pGlobalTXT_LocalizationStrings[85], ui_book_button3_on, 0
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
68 ); // "Potion Notes"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
69 pBtn_Book_4 = CreateButton(
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
70 pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, 50, 34, 1, 0,
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
71 UIMSG_ClickBooksBtn, 3, 0, pGlobalTXT_LocalizationStrings[137], ui_book_button4_on, 0
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
72 ); // "Fountain Notes"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
73 pBtn_Book_5 = CreateButton(
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
74 pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, 50, 34, 1, 0,
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
75 UIMSG_ClickBooksBtn, 4, 0, pGlobalTXT_LocalizationStrings[8], ui_book_button5_on, 0
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
76 ); // "Obelisk Notes"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
77 pBtn_Book_6 = CreateButton(
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
78 pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, 50, 34, 1, 0,
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
79 UIMSG_ClickBooksBtn, 5, 0, pGlobalTXT_LocalizationStrings[141], ui_book_button6_on, 0
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
80 ); // "Seer Notes"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
81 pBtn_Autonotes_Misc = CreateButton(
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
82 pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 264, 50, 34, 1, 0,
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
83 UIMSG_ClickBooksBtn, 6, 0, pGlobalTXT_LocalizationStrings[123], ui_book_button7_on, 0
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
84 ); // "Miscellaneous Notes"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
85 pBtn_Autonotes_Instructors = CreateButton(
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
86 pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 302, 50, 34, 1, 0,
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
87 UIMSG_ClickBooksBtn, 7, 0, pGlobalTXT_LocalizationStrings[662], ui_book_button8_on, 0
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
88 ); // "Instructors"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
89
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
90 int num_achieved_awards = 0;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
91 for (uint i = books_primary_item_per_page; i < 196; ++i)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
92 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
93 if (_506568_autonote_type == pAutonoteTxt[i].eType)//dword_72371C[2 * v10] )
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
94 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
95 if (i)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
96 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
97 if (_449B57_test_bit(pParty->_autonote_bits, i) && pAutonoteTxt[i].pText)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
98 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
99 achieved_awards[num_achieved_awards] = (AwardType)i;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
100 ++num_achieved_awards;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
101 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
102 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
103 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
104 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
105 full_num_items_in_book = num_achieved_awards;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
106 num_achieved_awards = 0;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
107 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
108
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
109
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
110
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
111 void GUIWindow_AutonotesBook::Update()
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
112 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
113 // -----------------------------------
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
114 // 004156F0 GUI_UpdateWindows --- part
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
115 // {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
116 // BookUI_Draw((WindowType)(int)ptr_1C);
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
117 // }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
118
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
119 // ----- (00413CC6) --------------------------------------------------------
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
120 // void BookUI_Draw(WindowType book) --- part
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
121 // {
2573
0c67be4ec900 DrawTextureIndexed renamed to DrawTextureTransparentColorKey
a.parshin
parents: 2548
diff changeset
122 pRenderer->DrawTextureAlphaNew(471/640.0f, 445/480.0f, ui_exit_cancel_button_background);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
123 // BookUI_Autonotes_Draw();
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
124
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
125 // ----- (0041338E) --------------------------------------------------------
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
126 // void BookUI_Autonotes_Draw()
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
127 // {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
128 int pTextHeight; // eax@65
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
129 bool change_flag; // [sp+10h] [bp-58h]@1
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
130 GUIWindow autonotes_window; // [sp+14h] [bp-54h]@46
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
131
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
132 change_flag = false;
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
133 pRenderer->DrawTextureAlphaNew(pViewport->uViewportTL_X/640.0f, pViewport->uViewportTL_Y/480.0f, ui_book_autonotes_background);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
134 if (BtnUp_flag || !books_primary_item_per_page)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
135 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 407)/640.0f, (pViewport->uViewportTL_Y + 2)/480.0f, ui_book_button1_off);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
136 else
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
137 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 398)/640.0f, (pViewport->uViewportTL_Y + 1)/480.0f, ui_book_button1_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
138
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
139 if (BtnDown_flag || books_primary_item_per_page + num_achieved_awards >= full_num_items_in_book)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
140 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 407)/640.0f, (pViewport->uViewportTL_Y + 38)/480.0f, ui_book_button2_off);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
141 else
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
142 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 398)/640.0f, (pViewport->uViewportTL_Y + 38)/480.0f, ui_book_button2_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
143
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
144 if (Book_PageBtn3_flag)//Potions_page_flag
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
145 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
146 if (_506568_autonote_type == AUTONOTE_POTION_RECEPIE)//press again(повторное нажатие)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
147 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 398)/640.0f, (pViewport->uViewportTL_Y + 113)/480.0f, ui_book_button3_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
148 else//press(нажатие)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
149 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
150 change_flag = true;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
151 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
152 _506568_autonote_type = AUTONOTE_POTION_RECEPIE;
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
153 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 398)/640.0f, (pViewport->uViewportTL_Y + 113)/480.0f, ui_book_button3_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
154 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
155 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
156 else
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
157 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
158 if (_506568_autonote_type == AUTONOTE_POTION_RECEPIE)// default(по умолчанию при запуске окна)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
159 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 398)/640.0f, (pViewport->uViewportTL_Y + 113)/480.0f, ui_book_button3_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
160 else//Potions_page not active(вкладка снадобья не активна)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
161 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 408)/640.0f, (pViewport->uViewportTL_Y + 113)/480.0f, ui_book_button3_off);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
162 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
163
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
164 if (Book_PageBtn4_flag)//Fontains_page_flag
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
165 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
166 if (_506568_autonote_type == AUTONOTE_STAT_HINT)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
167 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 399)/640.0f, (pViewport->uViewportTL_Y + 150)/480.0f, ui_book_button4_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
168 else
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
169 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
170 change_flag = true;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
171 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
172 _506568_autonote_type = AUTONOTE_STAT_HINT;
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
173 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 399)/640.0f, (pViewport->uViewportTL_Y + 150)/480.0f, ui_book_button4_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
174 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
175 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
176 else
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
177 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
178 if (_506568_autonote_type == AUTONOTE_STAT_HINT)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
179 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 399)/640.0f, (pViewport->uViewportTL_Y + 150)/480.0f, ui_book_button4_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
180 else
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
181 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 408)/640.0f, (pViewport->uViewportTL_Y + 150)/480.0f, ui_book_button4_off);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
182 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
183
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
184 if (Book_PageBtn5_flag)//Autonotes_Obelisks_page_flag
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
185 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
186 if (_506568_autonote_type == AUTONOTE_OBELISK)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
187 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 397)/640.0f, (pViewport->uViewportTL_Y + 188)/480.0f, ui_book_button5_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
188 else
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
189 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
190 change_flag = true;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
191 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
192 _506568_autonote_type = AUTONOTE_OBELISK;
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
193 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 397)/640.0f, (pViewport->uViewportTL_Y + 188)/480.0f, ui_book_button5_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
194 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
195 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
196 else
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
197 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
198 if (_506568_autonote_type == AUTONOTE_OBELISK)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
199 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 397)/640.0f, (pViewport->uViewportTL_Y + 188)/480.0f, ui_book_button5_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
200 else
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
201 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 408)/640.0f, (pViewport->uViewportTL_Y + 188)/480.0f, ui_book_button5_off);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
202 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
203
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
204 if (Book_PageBtn6_flag)//Autonotes_Seer_page_flag
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
205 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
206 if (_506568_autonote_type == AUTONOTE_SEER)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
207 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 397)/640.0f, (pViewport->uViewportTL_Y + 226)/480.0f, ui_book_button6_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
208 else
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
209 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
210 change_flag = true;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
211 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
212 _506568_autonote_type = AUTONOTE_SEER;
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
213 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 397)/640.0f, (pViewport->uViewportTL_Y + 226)/480.0f, ui_book_button6_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
214 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
215 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
216 else
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
217 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
218 if (_506568_autonote_type == AUTONOTE_SEER)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
219 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 397)/640.0f, (pViewport->uViewportTL_Y + 226)/480.0f, ui_book_button6_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
220 else
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
221 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 408)/640.0f, (pViewport->uViewportTL_Y + 226)/480.0f, ui_book_button6_off);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
222 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
223
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
224 if (Autonotes_Misc_page_flag)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
225 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
226 if (_506568_autonote_type == AUTONOTE_MISC)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
227 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 397)/640.0f, (pViewport->uViewportTL_Y + 264)/480.0f, ui_book_button7_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
228 else
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
229 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
230 change_flag = true;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
231 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
232 _506568_autonote_type = AUTONOTE_MISC;
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
233 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 397)/640.0f, (pViewport->uViewportTL_Y + 264)/480.0f, ui_book_button7_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
234 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
235 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
236 else
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
237 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
238 if (_506568_autonote_type == AUTONOTE_MISC)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
239 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 397)/640.0f, (pViewport->uViewportTL_Y + 264)/480.0f, ui_book_button7_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
240 else
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
241 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 408)/640.0f, (pViewport->uViewportTL_Y + 263)/480.0f, ui_book_button7_off);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
242 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
243
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
244 if (Autonotes_Instructors_page_flag)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
245 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
246 if (_506568_autonote_type == AUTONOTE_TEACHER)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
247 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 397)/640.0f, (pViewport->uViewportTL_Y + 302)/480.0f, ui_book_button8_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
248 else
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
249 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
250 change_flag = true;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
251 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
252 _506568_autonote_type = AUTONOTE_TEACHER;
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
253 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 397)/640.0f, (pViewport->uViewportTL_Y + 302)/480.0f, ui_book_button8_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
254 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
255 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
256 else
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
257 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
258 if (_506568_autonote_type == AUTONOTE_TEACHER)
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
259 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 397)/640.0f, (pViewport->uViewportTL_Y + 302)/480.0f, ui_book_button8_on);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
260 else
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
261 pRenderer->DrawTextureAlphaNew((pViewport->uViewportTL_X + 408)/640.0f, (pViewport->uViewportTL_Y + 302)/480.0f, ui_book_button8_off);
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
262 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
263
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
264 //for title
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
265 autonotes_window.uFrameWidth = game_viewport_width;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
266 autonotes_window.uFrameHeight = game_viewport_height;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
267 autonotes_window.uFrameX = game_viewport_x;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
268 autonotes_window.uFrameY = game_viewport_y;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
269 autonotes_window.uFrameZ = game_viewport_z;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
270 autonotes_window.uFrameW = game_viewport_w;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
271 autonotes_window.DrawTitleText(pBook2Font, 0, 22, ui_book_autonotes_title_color, pGlobalTXT_LocalizationStrings[154], 3); // "Auto notes"
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
272
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
273 //for other text
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
274 autonotes_window.uFrameX = 48;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
275 autonotes_window.uFrameY = 70;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
276 autonotes_window.uFrameWidth = 360;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
277 autonotes_window.uFrameHeight = 264;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
278 autonotes_window.uFrameZ = 407;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
279 autonotes_window.uFrameW = 333;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
280 if (change_flag)//change bookmark(смена закладки)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
281 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
282 full_num_items_in_book = 0;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
283 books_primary_item_per_page = 0;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
284 books_page_number = 0;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
285 num_achieved_awards = 0;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
286 for (uint i = 1; i <= 195; ++i)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
287 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
288 if (pAutonoteTxt[i].eType == _506568_autonote_type)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
289 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
290 if ((unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, i) && (char *)pAutonoteTxt[i].pText)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
291 achieved_awards[num_achieved_awards++] = (AwardType)i;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
292 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
293 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
294 full_num_items_in_book = num_achieved_awards;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
295 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
296 else//not change bookmark(не меняется закладка)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
297 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
298 if (BtnDown_flag)// press Down bookmark(нажатие закладки пролистать дальше)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
299 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
300 if (num_achieved_awards + books_primary_item_per_page < full_num_items_in_book)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
301 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
302 books_num_items_per_page[books_page_number++] = num_achieved_awards;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
303 books_primary_item_per_page = num_achieved_awards + books_primary_item_per_page;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
304 pAudioPlayer->PlaySound(SOUND_openbook, 0, 0, -1, 0, 0, 0, 0);
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
305 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
306 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
307 if (BtnUp_flag && books_page_number)// press Up bookmark(нажатие закладки пролистать назад)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
308 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
309 --books_page_number;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
310 books_primary_item_per_page -= (unsigned __int8)books_num_items_per_page[books_page_number];
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
311 pAudioPlayer->PlaySound(SOUND_openbook, 0, 0, -1, 0, 0, 0, 0);
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
312 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
313 if (!num_achieved_awards || !books_primary_item_per_page)//количество записей 0 или номер первой страницы 0
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
314 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
315 books_primary_item_per_page = 0;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
316 books_page_number = 0;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
317 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
318 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
319 BtnUp_flag = 0;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
320 BtnDown_flag = 0;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
321 Book_PageBtn3_flag = 0;//Potions_page_flag
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
322 Book_PageBtn4_flag = 0;//Fontains_page_flag
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
323 Book_PageBtn5_flag = 0;//Autonotes_Obelisks_page_flag
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
324 Book_PageBtn6_flag = 0;//Autonotes_Seer_page_flag
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
325 Autonotes_Misc_page_flag = 0;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
326 Autonotes_Instructors_page_flag = 0;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
327 num_achieved_awards = 0;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
328 for (uint i = books_primary_item_per_page; i < full_num_items_in_book; ++i)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
329 {
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
330 ++num_achieved_awards;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
331 autonotes_window.DrawText(pAutonoteFont, 1, 0, ui_book_autonotes_text_color, pAutonoteTxt[achieved_awards[i]].pText, 0, 0, 0);
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
332 pTextHeight = pAutonoteFont->CalcTextHeight(pAutonoteTxt[achieved_awards[i]].pText, &autonotes_window, 1, 0);
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
333 if ((signed int)(autonotes_window.uFrameY + pTextHeight) > (signed int)autonotes_window.uFrameHeight)
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
334 break;
2574
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
335
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
336 pRenderer->DrawTextureAlphaNew(100/640.0f, ((autonotes_window.uFrameY + pTextHeight) + 12)/480.0f, ui_book_quest_div_bar);
dd36326a9994 More texture refactoring
a.parshin
parents: 2573
diff changeset
337
2548
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
338 autonotes_window.uFrameY = (autonotes_window.uFrameY + pTextHeight) + 24;
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
339 }
87e5590d034b All Books windows are refactored into respective classes
a.parshin
parents:
diff changeset
340 }