accessories tab

Former-commit-id: 542362e98e908c9ec7c563d7fdcd43c4b8f922fd
This commit is contained in:
Pfauenauge90 2019-03-28 18:25:00 +01:00 committed by Imbris
parent 93897f904a
commit 60df735e3b
43 changed files with 926 additions and 229 deletions

View File

@ -1,13 +1,3 @@
# Fresh # Fresh
An experiment An experiment
## Compile
```
git clone https://gitlab.com/veloren/fresh.git
cd fresh
git submodule update --init --recursive
rustup default nightly
cargo build
```

78
common/src/net/test.rs Normal file
View File

@ -0,0 +1,78 @@
use std::{
io::Write,
str::FromStr,
net::SocketAddr,
thread,
time::Duration,
};
use mio::{net::TcpStream, Events, Poll, PollOpt, Ready, Token};
use super::{error::PostError, PostBox, PostOffice};
fn new_local_addr(n: u16) -> SocketAddr {
SocketAddr::from(([127, 0, 0, 1], 12345 + n))
}
#[test]
fn basic_run() {
let srv_addr = new_local_addr(0);
let mut server: PostOffice<String, String> = PostOffice::new(srv_addr).unwrap();
let mut client: PostBox<String, String> = PostBox::to_server(srv_addr).unwrap();
std::thread::sleep(std::time::Duration::from_millis(10));
let mut scon = server.new_connections().next().unwrap();
std::thread::sleep(std::time::Duration::from_millis(10));
scon.send(String::from("foo")).unwrap();
client.send(String::from("bar")).unwrap();
std::thread::sleep(std::time::Duration::from_millis(10));
assert_eq!("foo", client.new_messages().next().unwrap());
assert_eq!("bar", scon.new_messages().next().unwrap());
}
#[test]
fn huge_size_header() {
let srv_addr = new_local_addr(1);
let mut server: PostOffice<String, String> = PostOffice::new(srv_addr).unwrap();
let mut client = TcpStream::connect(&srv_addr).unwrap();
std::thread::sleep(std::time::Duration::from_millis(10));
let mut scon = server.new_connections().next().unwrap();
std::thread::sleep(std::time::Duration::from_millis(10));
client.write(&[0xffu8; 64]).unwrap();
std::thread::sleep(std::time::Duration::from_millis(10));
assert_eq!(scon.new_messages().next(), None);
}
#[test]
fn disconnect() {
let srv_addr = new_local_addr(2);
let mut server = PostOffice::<_, String>::new(srv_addr)
.unwrap();
// Create then close client
{
PostBox::<String, String>::to_server(srv_addr).unwrap();
}
std::thread::sleep(std::time::Duration::from_millis(10));
let mut to_client = server
.new_connections()
.next()
.unwrap();
to_client.send(String::from("foo")).unwrap();
thread::sleep(Duration::from_millis(10));
match to_client.new_messages().next() {
None => {},
_ => panic!("Unexpected message!"),
}
match to_client.status() {
Some(PostError::Disconnected) => {},
s => panic!("Did not expect {:?}", s),
}
}

View File

@ -73,7 +73,7 @@ impl Chat {
.restrict_to_height(false) .restrict_to_height(false)
.font_size(14) .font_size(14)
.font_id(font) .font_id(font)
.bottom_left_with_margins_on(ui_widgets.window, 10.0, 30.0); .bottom_left_with_margins_on(ui_widgets.window, 10.0, 10.0);
let dims = match ( let dims = match (
text_edit.get_x_dimension(ui_widgets), text_edit.get_x_dimension(ui_widgets),
text_edit.get_y_dimension(ui_widgets), text_edit.get_y_dimension(ui_widgets),

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=Dieser Ordner wird online freigegeben.
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
IconIndex=16

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

View File

@ -0,0 +1 @@
*.png filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1 @@
*.png filter=lfs diff=lfs merge=lfs -text

BIN
voxygen/test_assets/ui/char_selection/text/White/login.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
voxygen/test_assets/ui/char_selection/text/White/quit.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
voxygen/test_assets/ui/char_selection/text/White/servers.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
*.png filter=lfs diff=lfs merge=lfs -text

BIN
voxygen/test_assets/ui/char_selection/text/Yellow/a01.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
voxygen/test_assets/ui/char_selection/text/Yellow/login.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
voxygen/test_assets/ui/char_selection/text/Yellow/quit.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
voxygen/test_assets/ui/char_selection/text/a01.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
voxygen/test_assets/ui/char_selection/text/login.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
voxygen/test_assets/ui/char_selection/text/quit.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
voxygen/test_assets/ui/char_selection/text/servers.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
voxygen/test_assets/ui/char_selection/text/settings.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
voxygen/test_assets/ui/char_selection/text/singleplayer.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
voxygen/test_assets/ui/char_selection/text/username.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

View File

@ -0,0 +1 @@
*.png filter=lfs diff=lfs merge=lfs -text

BIN
voxygen/test_assets/ui/hud/buttons/chat_arrow_down.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
voxygen/test_assets/ui/hud/buttons/chat_arrow_down_mo.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
voxygen/test_assets/ui/hud/buttons/chat_arrow_down_press.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
voxygen/test_assets/ui/hud/buttons/chat_arrow_tobot.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
voxygen/test_assets/ui/hud/buttons/chat_arrow_tobot_mo.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
voxygen/test_assets/ui/hud/buttons/chat_arrow_up.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
voxygen/test_assets/ui/hud/buttons/chat_arrow_up_mo.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
voxygen/test_assets/ui/hud/buttons/chat_arrow_up_press.png (Stored with Git LFS) Normal file

Binary file not shown.