Designer is working great now, and this fixes a bunch of things about the mouse.
This commit is contained in:
parent
f05f652c26
commit
ffc787df64
10 changed files with 4958 additions and 91 deletions
16
panel.cpp
16
panel.cpp
|
@ -38,13 +38,27 @@ const std::wstring& Panel::to_string() {
|
|||
void Panel::mouse_click(ftxui::Mouse::Button btn, Point pos) {
|
||||
ftxui::Mouse mev{
|
||||
.button=btn,
|
||||
.motion=ftxui::Mouse::Motion::Pressed,
|
||||
.x=int(pos.x), .y=int(pos.y)
|
||||
};
|
||||
|
||||
$component->OnEvent(ftxui::Event::Mouse("", mev));
|
||||
}
|
||||
|
||||
void Panel::mouse_release(ftxui::Mouse::Button btn, Point pos) {
|
||||
ftxui::Mouse mev{
|
||||
.button=btn,
|
||||
.motion=ftxui::Mouse::Motion::Released,
|
||||
.x=int(pos.x), .y=int(pos.y)
|
||||
};
|
||||
|
||||
const Screen &Panel::screen() {
|
||||
$component->OnEvent(ftxui::Event::Mouse("", mev));
|
||||
}
|
||||
|
||||
const Screen& Panel::screen() {
|
||||
return $screen;
|
||||
}
|
||||
|
||||
void Panel::key_press(ftxui::Event event) {
|
||||
$component->OnEvent(event);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue