Scroll improvements
This commit is contained in:
@@ -28,7 +28,7 @@ impl Widget for ScrollText {
|
|||||||
|
|
||||||
impl<const N: usize> ScrollState<N> {
|
impl<const N: usize> ScrollState<N> {
|
||||||
pub fn get_selected(&self, index: usize) -> &'static str {
|
pub fn get_selected(&self, index: usize) -> &'static str {
|
||||||
if index == self.0 { "\x1b[32m" } else { "" }
|
if index == self.0 { "\x1b[4m\x1b[1m" } else { "\x1b[1m" }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn scroll(&self, index: usize, title: String, text: String) -> ScrollText {
|
pub fn scroll(&self, index: usize, title: String, text: String) -> ScrollText {
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ async fn main() -> tokio::io::Result<()> {
|
|||||||
pulse_ui::run(|ctx| {
|
pulse_ui::run(|ctx| {
|
||||||
client.use_app(PulseTradeApp {
|
client.use_app(PulseTradeApp {
|
||||||
command: ctx.use_state(InputState::new()),
|
command: ctx.use_state(InputState::new()),
|
||||||
scroll: ctx.use_state(ScrollState(0, [0; 7])),
|
scroll: ctx.use_state(ScrollState(1, [0; 7])),
|
||||||
watch_list: ctx.use_state(Vec::new()),
|
watch_list: ctx.use_state(Vec::new()),
|
||||||
active_positions: ctx.use_state(Vec::new()),
|
active_positions: ctx.use_state(Vec::new()),
|
||||||
signals: ctx.use_state(Vec::new()),
|
signals: ctx.use_state(Vec::new()),
|
||||||
|
|||||||
Reference in New Issue
Block a user