Redesign InputEvent editor plugin

- Use vertical layout and add text wrapping
- Fix Window.popup_centered() rect calculation
This commit is contained in:
FireForge 2022-04-07 17:46:49 -05:00
parent 43f94c95aa
commit 0b0a74e135
5 changed files with 31 additions and 33 deletions

View file

@ -35,8 +35,8 @@
#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
class InputEventConfigContainer : public HBoxContainer {
GDCLASS(InputEventConfigContainer, HBoxContainer);
class InputEventConfigContainer : public VBoxContainer {
GDCLASS(InputEventConfigContainer, VBoxContainer);
Label *input_event_text = nullptr;
Button *open_config_button = nullptr;
@ -50,10 +50,10 @@ class InputEventConfigContainer : public HBoxContainer {
void _event_changed();
protected:
void _notification(int p_what);
static void _bind_methods();
public:
virtual Size2 get_minimum_size() const override;
void set_event(const Ref<InputEvent> &p_event);
InputEventConfigContainer();