Skip to content

Commit

Permalink
nalgebra -> cgmath
Browse files Browse the repository at this point in the history
  • Loading branch information
ozkriff committed Mar 31, 2020
1 parent 8eca07e commit 4db22fd
Show file tree
Hide file tree
Showing 26 changed files with 60 additions and 114 deletions.
104 changes: 25 additions & 79 deletions 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ui = { path = "ggwp-zgui", package = "ggwp-zgui" }
scene = { path = "ggwp-zscene", package = "ggwp-zscene" }
zcomponents = { path = "zcomponents" }
rand = { version = "0.7", features = [] }
nalgebra = { version = "0.18", features = ["mint"] } # TODO: update (or replace with cgmath)
cgmath = { version = "0.17", features = ["mint"] }
qrand = { git = "https://github.com/not-fl3/quad-rand", package = "quad-rand", features = ['rand'] }
gwg = { git = "https://github.com/not-fl3/good-web-game", package = "good-web-game" }

Expand Down
2 changes: 1 addition & 1 deletion ggwp-zgui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ keywords = ["gamedev", "gui"]

[dependencies]
log = "0.4"
nalgebra = { version = "0.18", features = ["mint"] }
cgmath = { version = "0.17", features = ["mint"] }
gwg = { git = "https://github.com/not-fl3/good-web-game", package = "good-web-game" }
4 changes: 2 additions & 2 deletions ggwp-zgui/examples/absolute_coordinates.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use cgmath::Point2;
use ggwp_zgui as ui;
use gwg::{
conf, event,
graphics::{self, Font, Rect, Text},
Context, GameResult,
};
use nalgebra::Point2;

#[derive(Clone, Copy, Debug)]
enum Message {
Expand Down Expand Up @@ -90,7 +90,7 @@ impl event::EventHandler for State {
let window_pos = Point2::new(x, y);
let pos = ui::window_to_screen(context, window_pos);
let message = self.gui.click(pos);
println!("[{},{}] -> {}: {:?}", x, y, pos, message);
println!("[{},{}] -> {:?}: {:?}", x, y, pos, message);
}
}

Expand Down
4 changes: 2 additions & 2 deletions ggwp-zgui/examples/layers_layout.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use cgmath::Point2;
use ggwp_zgui as ui;
use gwg::{
conf, event,
graphics::{self, Font, Image, Text},
Context, GameResult,
};
use nalgebra::Point2;

#[derive(Clone, Copy, Debug)]
enum Message {
Expand Down Expand Up @@ -65,7 +65,7 @@ impl event::EventHandler for State {
let window_pos = Point2::new(x, y);
let pos = ui::window_to_screen(context, window_pos);
let message = self.gui.click(pos);
println!("[{},{}] -> {}: {:?}", x, y, pos, message);
println!("[{},{}] -> {:?}: {:?}", x, y, pos, message);
}

fn resize_event(&mut self, context: &mut Context, w: f32, h: f32) {
Expand Down
4 changes: 2 additions & 2 deletions ggwp-zgui/examples/nested.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use cgmath::Point2;
use ggwp_zgui as ui;
use gwg::{
conf, event,
graphics::{self, Font, Image, Rect, Text},
Context, GameResult,
};
use nalgebra::Point2;

#[derive(Clone, Copy, Debug)]
enum Message {
Expand Down Expand Up @@ -127,7 +127,7 @@ impl event::EventHandler for State {
let window_pos = Point2::new(x, y);
let pos = ui::window_to_screen(context, window_pos);
let message = self.gui.click(pos);
println!("[{},{}] -> {}: {:?}", x, y, pos, message);
println!("[{},{}] -> {:?}: {:?}", x, y, pos, message);
}
}

Expand Down
4 changes: 2 additions & 2 deletions ggwp-zgui/examples/pixel_coordinates.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use cgmath::Point2;
use ggwp_zgui as ui;
use gwg::{
conf, event,
graphics::{self, Font, Text},
Context, GameResult,
};
use nalgebra::Point2;

#[derive(Clone, Copy, Debug)]
enum Message {
Expand Down Expand Up @@ -90,7 +90,7 @@ impl event::EventHandler for State {
let window_pos = Point2::new(x, y);
let pos = ui::window_to_screen(context, window_pos);
let message = self.gui.click(pos);
println!("[{},{}] -> {}: {:?}", x, y, pos, message);
println!("[{},{}] -> {:?}: {:?}", x, y, pos, message);
}
}

Expand Down
4 changes: 2 additions & 2 deletions ggwp-zgui/examples/remove.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use cgmath::Point2;
use ggwp_zgui as ui;
use gwg::{
conf, event,
graphics::{self, Font, Image, Text},
Context, GameResult,
};
use nalgebra::Point2;

#[derive(Clone, Copy, Debug)]
enum Message {
Expand Down Expand Up @@ -89,7 +89,7 @@ impl event::EventHandler for State {
let window_pos = Point2::new(x, y);
let pos = ui::window_to_screen(context, window_pos);
let message = self.gui.click(pos);
println!("[{},{}] -> {}: {:?}", x, y, pos, message);
println!("[{},{}] -> {:?}: {:?}", x, y, pos, message);
if let Some(Message::AddOrRemove) = message {
if self.label.is_some() {
self.remove_label();
Expand Down
4 changes: 2 additions & 2 deletions ggwp-zgui/examples/text_button.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use cgmath::Point2;
use ggwp_zgui as ui;
use gwg::{
conf, event,
graphics::{self, Font, Text},
Context, GameResult,
};
use nalgebra::Point2;

#[derive(Clone, Copy, Debug)]
enum Message {
Expand Down Expand Up @@ -64,7 +64,7 @@ impl event::EventHandler for State {
let window_pos = Point2::new(x, y);
let pos = ui::window_to_screen(context, window_pos);
let message = self.gui.click(pos);
println!("[{},{}] -> {}: {:?}", x, y, pos, message);
println!("[{},{}] -> {:?}: {:?}", x, y, pos, message);
}
}

Expand Down
Loading

0 comments on commit 4db22fd

Please sign in to comment.