0x004CC989
| 683 | |
| 684 | // 0x004CC989 |
| 685 | void showBelow(Window* window, WidgetIndex_t widgetIndex, size_t count, int8_t itemHeight, uint8_t flags) |
| 686 | { |
| 687 | assert(count < std::numeric_limits<uint8_t>::max()); |
| 688 | |
| 689 | WindowManager::close(WindowType::dropdown, 0); |
| 690 | _dropdownFlags = Flags::none; |
| 691 | |
| 692 | if (Input::state() != Input::State::widgetPressed || Input::hasFlag(Input::Flags::widgetPressed)) |
| 693 | { |
| 694 | _dropdownFlags = _dropdownFlags | Flags::unk1; |
| 695 | } |
| 696 | |
| 697 | if (Input::getPressedWindowType() != WindowType::undefined) |
| 698 | { |
| 699 | WindowManager::invalidateWidget(Input::getPressedWindowType(), Input::getPressedWindowNumber(), Input::getPressedWidgetIndex()); |
| 700 | } |
| 701 | |
| 702 | Input::setPressedWidgetIndex(widgetIndex); |
| 703 | Input::setPressedWindowType(window->type); |
| 704 | Input::setPressedWindowNumber(window->number); |
| 705 | WindowManager::invalidateWidget(window->type, window->number, widgetIndex); |
| 706 | |
| 707 | auto widget = window->widgets[widgetIndex]; |
| 708 | auto colour = window->getColour(widget.windowColour).translucent(); |
| 709 | |
| 710 | auto x = widget.left + window->x; |
| 711 | auto y = widget.top + window->y; |
| 712 | |
| 713 | if (colour.isTranslucent()) |
| 714 | { |
| 715 | colour = kDropdownColourTable[enumValue(colour.c())]; |
| 716 | colour = colour.translucent(); |
| 717 | } |
| 718 | |
| 719 | Input::resetFlag(Input::Flags::flag1); |
| 720 | Input::resetFlag(Input::Flags::flag2); |
| 721 | |
| 722 | if (flags & (1 << 7)) |
| 723 | { |
| 724 | Input::setFlag(Input::Flags::flag1); |
| 725 | } |
| 726 | |
| 727 | flags &= ~(1 << 7); |
| 728 | |
| 729 | common::showText(x, y, widget.width(), widget.height(), itemHeight, colour, count, flags); |
| 730 | } |
| 731 | |
| 732 | // 0x004CC989 |
| 733 | void showBelow(Window* window, WidgetIndex_t widgetIndex, size_t count, uint8_t flags) |
no test coverage detected