Adding words by parts
This commit is contained in:
+9
-14
@@ -1,10 +1,10 @@
|
||||
use crate::RootMessage;
|
||||
use crate::lang::KanaSet;
|
||||
use crate::navigation::Page::PreviousPage;
|
||||
use crate::navigation::{NavigatedPage, Page};
|
||||
use crate::styling::*;
|
||||
use crate::RootMessage;
|
||||
use iced::widget::*;
|
||||
use iced::{alignment, Element, Fill, Task};
|
||||
use iced::{Element, Fill, Task, alignment};
|
||||
use rand::seq::SliceRandom;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
@@ -27,8 +27,7 @@ impl NavigatedPage<WritingMessage> for WritingState {
|
||||
}
|
||||
}
|
||||
|
||||
fn navigated(&mut self) {
|
||||
}
|
||||
fn navigated(&mut self) {}
|
||||
fn update(&mut self, message: WritingMessage) -> Task<RootMessage> {
|
||||
match message {
|
||||
WritingMessage::Back => todo!(),
|
||||
@@ -56,13 +55,13 @@ impl NavigatedPage<WritingMessage> for WritingState {
|
||||
]
|
||||
.spacing(DEFAULT_SPACING)
|
||||
]
|
||||
.spacing(DEFAULT_SPACING)
|
||||
.align_x(alignment::Horizontal::Center),
|
||||
.spacing(DEFAULT_SPACING)
|
||||
.align_x(alignment::Horizontal::Center),
|
||||
)
|
||||
.center_x(Fill)
|
||||
.center_y(Fill)
|
||||
.padding(10)
|
||||
.into()
|
||||
.center_x(Fill)
|
||||
.center_y(Fill)
|
||||
.padding(10)
|
||||
.into()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,8 +82,6 @@ impl WritingState {
|
||||
}
|
||||
|
||||
impl WritingState {
|
||||
|
||||
|
||||
fn next(&mut self) {
|
||||
if self.set.is_empty() {
|
||||
self.kana = "".to_string();
|
||||
@@ -113,8 +110,6 @@ impl WritingState {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
fn answers(&self) -> Element<'_, WritingMessage> {
|
||||
if self.set.is_empty() {
|
||||
text!("{}", self.kana_total).size(36).into()
|
||||
|
||||
Reference in New Issue
Block a user