Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Track egui 0.26 API changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrueger committed Feb 9, 2024
1 parent 3e4d6f6 commit db86bd1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Visit https://www.telnetbbsguide.com/ for a start to enter the BBS world.
Features supported so far:
- Platforms: Linux, macOs, Windows
- Telnet, SSH, Websockets and Raw connections.
- Ansi BBS, Avatar, PETSCII, ATASCII and Viewdata emulation
- Ansi BBS, Avatar, PETSCII, ATASCII, Viewdata and RIPscrip emulation
- File transfer X/Y/Z Modem and variants (1k/1k-G/8k)
- Rich set of ansi features
- Modern engine with extended colors, 24bit fonts, ice support
Expand Down Expand Up @@ -60,6 +60,10 @@ Viewdata screenshot:

![Viewdata](assets/viewdata_bbs.png?raw=true "Viewdata")

RIPscrip screenshot:

![Viewdata](assets/ripscrip_bbs.png?raw=true "RIPscrip")

# History

I had an own BBS back in the 90'. When I started rust I searched a project and some days earlier I spoke with my wife about the good old days, PCBoard and then I got the idea to improve the PPL decompiler we used these days.
Expand Down
Binary file added assets/ripscrip_bbs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 8 additions & 5 deletions src/ui/terminal_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,15 @@ impl MainWindow {
if self.use_rip {
let fields = &self.buffer_update_thread.lock().mouse_field;
if response.clicked_by(PointerButton::Primary) {
if let Some(mouse_pos) = response.interact_pointer_pos() {
if let Some(mouse_pos) = response.hover_pos() {
let mouse_pos = mouse_pos.to_vec2() - calc.buffer_rect.left_top().to_vec2();

let x = (mouse_pos.x / calc.buffer_rect.width() * 640.0) as i32;
let y = (mouse_pos.y / calc.buffer_rect.height() * 350.0) as i32;
println!("x: {x}, y: {y}");
let mut found_field = None;
for mouse_field in fields {
println!("field: {}", mouse_field.style.is_mouse_button());
if !mouse_field.style.is_mouse_button() {
continue;
}
Expand All @@ -435,6 +437,7 @@ impl MainWindow {
continue;
}
}
println!("found field - click");
found_field = Some(mouse_field.clone());
}
}
Expand Down Expand Up @@ -476,7 +479,7 @@ impl MainWindow {
}

if response.clicked_by(PointerButton::Primary) {
if let Some(mouse_pos) = response.interact_pointer_pos() {
if let Some(mouse_pos) = response.hover_pos() {
if calc.buffer_rect.contains(mouse_pos) && !calc.vert_scrollbar_rect.contains(mouse_pos) {
self.buffer_view.lock().clear_selection();
}
Expand All @@ -485,7 +488,7 @@ impl MainWindow {

if response.drag_started_by(PointerButton::Primary) {
self.drag_start = None;
if let Some(mouse_pos) = response.interact_pointer_pos() {
if let Some(mouse_pos) = response.hover_pos() {
if calc.buffer_rect.contains(mouse_pos) && !calc.vert_scrollbar_rect.contains(mouse_pos) {
let click_pos = calc.calc_click_pos(mouse_pos);
self.last_pos = Position::new(click_pos.x as i32, click_pos.y as i32);
Expand All @@ -503,7 +506,7 @@ impl MainWindow {
}

if response.dragged_by(PointerButton::Primary) && self.drag_start.is_some() {
if let Some(mouse_pos) = response.interact_pointer_pos() {
if let Some(mouse_pos) = response.hover_pos() {
let click_pos = calc.calc_click_pos(mouse_pos);
let cur = Position::new(click_pos.x as i32, click_pos.y as i32);

Expand Down Expand Up @@ -532,7 +535,7 @@ impl MainWindow {

if response.drag_released_by(PointerButton::Primary) && self.drag_start.is_some() {
self.shift_pressed_during_selection = ui.input(|i| i.modifiers.shift);
if response.interact_pointer_pos().is_some() {
if response.hover_pos().is_some() {
let l = self.buffer_view.lock();
if let Some(sel) = &mut l.get_selection() {
sel.locked = true;
Expand Down

0 comments on commit db86bd1

Please sign in to comment.