Rev 7799 | Rev 7972 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7799 | Rev 7806 | ||
---|---|---|---|
Line 82... | Line 82... | ||
82 | int xxx = _id * tab_w; |
82 | int xxx = _id * tab_w; |
83 | 83 | ||
Line 84... | Line 84... | ||
84 | if (_id==tab.active) { |
84 | if (_id==tab.active) { |
85 | tab.save_state(); |
85 | tab.save_state(); |
86 | bgcol = system.color.work_light; |
86 | bgcol = sc.work_light; |
87 | border_bottom_color = system.color.work_light; |
87 | border_bottom_color = sc.work_light; |
88 | } else { |
88 | } else { |
89 | bgcol=system.color.work; |
89 | bgcol=sc.work; |
90 | border_bottom_color = system.color.work_graph; |
90 | border_bottom_color = sc.work_graph; |
91 | } |
91 | } |
92 | if (data[_id].header) { |
92 | if (data[_id].header) { |
93 | strncpy(#header_no_version, #data[_id].header, strlen(#data[_id].header)-sizeof(version)-2); |
93 | strncpy(#header_no_version, #data[_id].header, strlen(#data[_id].header)-sizeof(version)-2); |
94 | strncpy(#name, #header_no_version, tab_w-CLOSE_S/6-2); |
94 | strncpy(#name, #header_no_version, tab_w-CLOSE_S/6-2); |
95 | } |
95 | } |
96 | DrawBar(xxx, TOOLBAR_H, 1, TAB_H, system.color.work_dark); |
96 | DrawBar(xxx, TOOLBAR_H, 1, TAB_H, sc.work_dark); |
97 | DrawBar(xxx+1, TOOLBAR_H, tab_w-1, TAB_H-1, bgcol); |
97 | DrawBar(xxx+1, TOOLBAR_H, tab_w-1, TAB_H-1, bgcol); |
98 | DrawBar(xxx+1, TOOLBAR_H+TAB_H-1, tab_w-1, 1, border_bottom_color); |
98 | DrawBar(xxx+1, TOOLBAR_H+TAB_H-1, tab_w-1, 1, border_bottom_color); |
99 | DefineHiddenButton(xxx, TOOLBAR_H-1, tab_w, TAB_H, TAB_ID+_id); |
99 | DefineHiddenButton(xxx, TOOLBAR_H-1, tab_w, TAB_H, TAB_ID+_id); |
100 | WriteTextCenter(xxx, TOOLBAR_H+6, tab_w-CLOSE_S, system.color.work_text, #name); |
100 | WriteTextCenter(xxx, TOOLBAR_H+6, tab_w-CLOSE_S, sc.work_text, #name); |
Line 101... | Line 101... | ||
101 | 101 | ||
102 | DefineHiddenButton(xxx+tab_w-CLOSE_S-3, TOOLBAR_H+3, CLOSE_S-1, CLOSE_S-1, TAB_CLOSE_ID+_id); |
102 | DefineHiddenButton(xxx+tab_w-CLOSE_S-3, TOOLBAR_H+3, CLOSE_S-1, CLOSE_S-1, TAB_CLOSE_ID+_id); |
103 | DrawBar(xxx+tab_w-CLOSE_S-3, TOOLBAR_H+3, CLOSE_S, CLOSE_S, system.color.work_dark); |
103 | DrawBar(xxx+tab_w-CLOSE_S-3, TOOLBAR_H+3, CLOSE_S, CLOSE_S, sc.work_dark); |
104 | WriteText(xxx+tab_w-CLOSE_S+1, TOOLBAR_H+5, 0x80, system.color.work_light, "x"); |
104 | WriteText(xxx+tab_w-CLOSE_S+1, TOOLBAR_H+5, 0x80, sc.work_light, "x"); |
Line 105... | Line 105... | ||
105 | } |
105 | } |
106 | 106 | ||
107 | void DrawActiveTab() |
107 | void DrawActiveTab() |
108 | { |
108 | { |
109 | if (tab_w == GetTabWidth()) DrawTab(tab.active); |
109 | if (tab_w == GetTabWidth()) DrawTab(tab.active); |
Line 110... | Line 110... | ||
110 | else DrawTabsBar(); |
110 | else DrawTabsBar(); |
111 | } |
111 | } |
112 | 112 | ||
113 | int DrawNewTabButton() |
113 | int DrawNewTabButton() |
114 | { |
114 | { |
Line 115... | Line 115... | ||
115 | dword btn_light = MixColors(system.color.work_button, 0xFFFfff, 220); |
115 | dword btn_light = MixColors(sc.button, 0xFFFfff, 220); |
116 | dword btn_dark = MixColors(system.color.work_button, 0, 180); |
116 | dword btn_dark = MixColors(sc.button, 0, 180); |
117 | int xxx = tab.count * tab_w; |
117 | int xxx = tab.count * tab_w; |
118 | 118 | ||
119 | if (tab.count < TABS_MAX) { |
119 | if (tab.count < TABS_MAX) { |
120 | DrawBar(xxx, TOOLBAR_H, 1, TAB_H, system.color.work_graph); |
120 | DrawBar(xxx, TOOLBAR_H, 1, TAB_H, sc.work_graph); |
121 | DrawBar(xxx+1, TOOLBAR_H, TAB_H, TAB_H-1, system.color.work_button); |
121 | DrawBar(xxx+1, TOOLBAR_H, TAB_H, TAB_H-1, sc.button); |
122 | DrawRectangle3D(xxx+1, TOOLBAR_H, TAB_H, TAB_H-1, btn_light, btn_dark); |
122 | DrawRectangle3D(xxx+1, TOOLBAR_H, TAB_H, TAB_H-1, btn_light, btn_dark); |
123 | PutPixel(xxx+1+TAB_H, TOOLBAR_H, btn_dark); |
123 | PutPixel(xxx+1+TAB_H, TOOLBAR_H, btn_dark); |
124 | DefineHiddenButton(xxx+1, TOOLBAR_H, TAB_H-1, TAB_H-1, NEW_TAB); |
124 | DefineHiddenButton(xxx+1, TOOLBAR_H, TAB_H-1, TAB_H-1, NEW_TAB); |
125 | WriteText(xxx+7, TOOLBAR_H+2, 0x90, system.color.work_button_text, "+"); |
125 | WriteText(xxx+7, TOOLBAR_H+2, 0x90, sc.button_text, "+"); |
126 | return xxx + TAB_H + 2; |
126 | return xxx + TAB_H + 2; |
Line 134... | Line 134... | ||
134 | dword i; |
134 | dword i; |
135 | tab_w = GetTabWidth(); |
135 | tab_w = GetTabWidth(); |
136 | for (i=0; i |
136 | for (i=0; i |
137 | i = DrawNewTabButton(); |
137 | i = DrawNewTabButton(); |
138 | DrawBar(i, TOOLBAR_H, Form.cwidth-i, TAB_H-1, MixColors(system.color.work_dark, system.color.work, 128)); |
138 | DrawBar(i, TOOLBAR_H, Form.cwidth-i, TAB_H-1, MixColors(sc.work_dark, sc.work, 128)); |
139 | DrawBar(i, TOOLBAR_H+TAB_H-1, Form.cwidth-i, 1, system.color.work_graph); |
139 | DrawBar(i, TOOLBAR_H+TAB_H-1, Form.cwidth-i, 1, sc.work_graph); |
140 | } |
140 | } |
141 | 141 | ||
Line 142... | Line 142... | ||
142 | void EventTabClose(int _id) |
142 | void EventTabClose(int _id) |
143 | { |
143 | { |
144 | DeleteButton(TAB_ID + tab.count-1); |
144 | DeleteButton(TAB_ID + tab.count-1); |