Skip to content

Commit

Permalink
SimpleTextInput- use offical repo with my fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Leinnan committed Feb 19, 2024
1 parent c91b170 commit 6e67d31
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 21 deletions.
12 changes: 6 additions & 6 deletions bevy_forge/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bevy_forge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ serde_json = "1.0"
futures-lite = "2.2.0"
bevy_pkv = "0.9.1"
bevy_button_released_plugin = "0.3.1"
bevy_simple_text_input = {git="https://github.com/Leinnan/bevy_simple_text_input"}
bevy_simple_text_input = {git="https://github.com/rparrett/bevy_simple_text_input", rev="79663893770a090c6b85f8f41d9a6bba4166fe8e"}
bevy_args = "1.2.0"
clap = { version = "4.4", features = ["derive"] }

Expand Down
2 changes: 1 addition & 1 deletion bevy_forge/src/states/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fn setup(
},
)
.with_text_alignment(TextAlignment::Center),
)
).insert(Name::new("GameLogo"))
.insert(GameLogoText);
});
}
16 changes: 3 additions & 13 deletions bevy_forge/src/states/login_screen.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use bevy::prelude::*;
use bevy_button_released_plugin::ButtonReleasedEvent;
use bevy_simple_text_input::TextStorage;
use bevy_simple_text_input::TextInput;

use crate::{
beam::context::{BeamContext, CreateAnononymousUserEvent},
Expand Down Expand Up @@ -36,12 +36,12 @@ fn handle_buttons(
mut reader: EventReader<ButtonReleasedEvent>,
mut ev: EventWriter<CreateAnononymousUserEvent>,
q: Query<&LoginScreenButton>,
text: Query<&TextStorage, Changed<TextStorage>>,
text: Query<&TextInput, Changed<TextInput>>,
mut beam: ResMut<BeamContext>,
) {
if let Ok(text) = text.get_single() {
if !text.0.is_empty() {
beam.name = Some((**text).clone());
beam.name = Some(text.0.clone());
}
}
for event in reader.read() {
Expand Down Expand Up @@ -117,15 +117,5 @@ fn setup(
.with_text_alignment(TextAlignment::Center),
);
});
// parent.spawn(ImageBundle {
// image: UiImage::new(asset_server.load("gfx/gameIconTransparent.png")),
// ..default()
// });
// parent
// .spawn(
// TextBundle::from_section("Hi! Request will start soon.", text_style.clone())
// .with_text_alignment(TextAlignment::Center),
// )
// .insert(RequestText);
});
}

0 comments on commit 6e67d31

Please sign in to comment.