Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void GUI::Keybind(int column, int width, int* value, bool& clicked, const char* name)
- {
- itemheight[column] += 16;
- int x = column == 0 ? (columns[column] + (tabs[3].w / 2) - 36) : (columns[column] + (tabs[3].w / 2) - 40);
- g_Drawing.MenuStringNormal(false, true, columns[column] + (tabs[3].w / 2) + tabs[2].w - 43, itemheight[column] + 7, Color(255, 255, 255, 200), "%s", name);
- int col = 80;
- g_Drawing.FilledRect(x, itemheight[column], tabs[2].w - 15, 1, Color(col, col, col, 255));
- g_Drawing.FilledRect(x, itemheight[column] + 1, tabs[2].w - 15, 1, Color(col - 2, col - 2, col - 2, 255));
- g_Drawing.FilledRect(x, itemheight[column] + 2, tabs[2].w - 15, 1, Color(col - 4, col - 4, col - 4, 255));
- g_Drawing.FilledRect(x, itemheight[column] + 3, tabs[2].w - 15, 1, Color(col - 8, col - 8, col - 8, 255));
- g_Drawing.FilledRect(x, itemheight[column] + 4, tabs[2].w - 15, 1, Color(col - 12, col - 12, col - 12, 255));
- g_Drawing.FilledRect(x, itemheight[column] + 5, tabs[2].w - 15, 1, Color(col - 14, col - 14, col - 14, 255));
- g_Drawing.FilledRect(x, itemheight[column] + 6, tabs[2].w - 15, 9, Color(col - 16, col - 16, col - 16, 255));
- g_Drawing.OutlinedRect(x, itemheight[column], tabs[2].w - 15, 15, Color(51, 51, 51, 255));
- g_Drawing.FilledRect(x, itemheight[column], tabs[2].w - 16, 1, Color(91, 91, 91, 255));
- g_Drawing.FilledRect(x, itemheight[column], 1, 14, Color(91, 91, 91, 255));
- char* active_text = nullptr;
- if (g_Stuff.Mouse.Click(x, itemheight[column], width, 15)) {
- clicked = true;
- }
- else {
- if (clicked == false) {
- active_text = (char*)GetNameFromCode(*value).c_str();
- }
- }
- if (clicked) {
- active_text = "...";
- for (int i = 0; i < 124; i++) {
- if (GetAsyncKeyState(i) & 1) {
- *value = i;
- clicked = false;
- break;
- }
- }
- }
- g_Drawing.MenuStringNormal(true, true, x+((tabs[2].w - 15) / 2), itemheight[column] + 7, Color(255, 255, 255, 200), "%s", active_text);
- itemscount++;
- }
Advertisement
Add Comment
Please, Sign In to add comment