This commit is contained in:
@ -283,10 +283,10 @@ impl GameRulesConfigurationScreen {
|
||||
.constraints([Constraint::Percentage(50), Constraint::Percentage(50)])
|
||||
.split(chunks[EditingField::OK as usize]);
|
||||
|
||||
let button = ButtonWidget::new("Cancel", self.curr_field == EditingField::Cancel);
|
||||
let button = ButtonWidget::cancel(self.curr_field == EditingField::Cancel);
|
||||
f.render_widget(button, buttons_chunk[0]);
|
||||
|
||||
let button = ButtonWidget::new("OK", self.curr_field == EditingField::OK)
|
||||
let button = ButtonWidget::ok(self.curr_field == EditingField::OK)
|
||||
.set_disabled(!self.rules.is_valid());
|
||||
f.render_widget(button, buttons_chunk[1]);
|
||||
|
||||
|
@ -35,7 +35,7 @@ pub struct ConfirmDialogScreen<'a> {
|
||||
impl<'a> ConfirmDialogScreen<'a> {
|
||||
pub fn new(msg: &'a str) -> Self {
|
||||
Self {
|
||||
title: "Confirmation Request",
|
||||
title: "❔ Confirmation Request",
|
||||
msg,
|
||||
is_confirm: true,
|
||||
can_escape: false,
|
||||
@ -123,10 +123,10 @@ impl<'a> ConfirmDialogScreen<'a> {
|
||||
.constraints([Constraint::Percentage(50), Constraint::Percentage(50)].as_ref())
|
||||
.split(chunks[1]);
|
||||
|
||||
let cancel_button = ButtonWidget::new("Cancel", true).set_disabled(self.is_confirm);
|
||||
let cancel_button = ButtonWidget::cancel(true).set_disabled(self.is_confirm);
|
||||
f.render_widget(cancel_button, buttons_area[0]);
|
||||
|
||||
let ok_button = ButtonWidget::new("Confirm", true).set_disabled(!self.is_confirm);
|
||||
let ok_button = ButtonWidget::new("✅ Confirm", true).set_disabled(!self.is_confirm);
|
||||
f.render_widget(ok_button, buttons_area[1]);
|
||||
}
|
||||
}
|
||||
|
@ -163,12 +163,12 @@ impl<'a> InputScreen<'a> {
|
||||
.constraints([Constraint::Percentage(50), Constraint::Percentage(50)].as_ref())
|
||||
.split(*chunks.last().unwrap());
|
||||
|
||||
let cancel_button = ButtonWidget::new("Cancel", self.is_cancel_hovered)
|
||||
let cancel_button = ButtonWidget::cancel(self.is_cancel_hovered)
|
||||
.set_disabled(!self.can_cancel)
|
||||
.set_min_width(8);
|
||||
f.render_widget(cancel_button, buttons_area[0]);
|
||||
|
||||
let ok_button = ButtonWidget::new("OK", !self.is_cancel_hovered)
|
||||
let ok_button = ButtonWidget::ok(!self.is_cancel_hovered)
|
||||
.set_min_width(8)
|
||||
.set_disabled(error.is_some());
|
||||
f.render_widget(ok_button, buttons_area[1]);
|
||||
|
@ -202,7 +202,7 @@ impl<'a> SetBoatsLayoutScreen<'a> {
|
||||
.add_colored_cells(current_boat)
|
||||
.add_colored_cells(invalid_boats)
|
||||
.add_colored_cells(other_boats)
|
||||
.set_title("Choose your boat layout")
|
||||
.set_title("🛥 Set your boats layout")
|
||||
.set_yield_func(|c, r| {
|
||||
for i in 0..r.width {
|
||||
for j in 0..r.height {
|
||||
|
Reference in New Issue
Block a user