mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
22aeb64ff9
- Include order and forward decls were breaking button.h because a declared but not defined struct can't be initiated (honestly this file was cooked, crazy include order). - `MAXINT` is GCC specific, `INT_MAX` is portable. - InterlockedDecrement takes a LONG, not ULONG - an imgui printf-style call using a direct string instead of %s (let's ignore the fact that it's actually safe based on how the str is constructed) - missing `override` on a virtual subclass - `CALLBACK` on a lambda threw me for a loop, but I believe moving it after the arg list is the correct approach (see if it builds on gcc I guess) - `std::result_of` was removed in C++20, which the project is built with
34 lines
748 B
C++
34 lines
748 B
C++
#pragma once
|
|
|
|
#include "overlay/window.h"
|
|
#include "cfg/button.h"
|
|
#include "cfg/light.h"
|
|
|
|
namespace overlay::windows {
|
|
|
|
class IOPanel : public Window {
|
|
public:
|
|
IOPanel(SpiceOverlay *overlay);
|
|
void build_content() override;
|
|
|
|
protected:
|
|
virtual void build_io_panel();
|
|
void build_button(
|
|
const char *label,
|
|
const ImVec2 &size,
|
|
Button *button,
|
|
Button *button_alt = nullptr,
|
|
Light *light = nullptr);
|
|
|
|
float get_suggested_height();
|
|
|
|
private:
|
|
void find_buttons();
|
|
void build_operator_menu();
|
|
|
|
bool operator_unlocked = false;
|
|
Button *test_button = nullptr;
|
|
Button *service_button = nullptr;
|
|
};
|
|
}
|