mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
changes restore
This commit is contained in:
parent
1dfc85a75b
commit
b5d529f824
BIN
assets/voxygen/voxel/fixture/selection_bg.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/fixture/selection_bg.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/world/structures/human/mage_tower.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/structures/human/mage_tower.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,10 +1,13 @@
|
||||
use conrod_core::{
|
||||
color,
|
||||
widget::{self, Button, Image, Rectangle},
|
||||
widget_ids, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
widget::{self, Button, Image, Rectangle, Text},
|
||||
widget_ids, Colorable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
|
||||
use super::{img_ids::Imgs, Fonts};
|
||||
use super::{img_ids::Imgs, Fonts, Show, TEXT_COLOR_2};
|
||||
use client::{self, Client};
|
||||
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
widget_ids! {
|
||||
struct Ids {
|
||||
@ -17,22 +20,28 @@ widget_ids! {
|
||||
map_frame_r,
|
||||
map_frame_bl,
|
||||
map_frame_br,
|
||||
location_name,
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(WidgetCommon)]
|
||||
pub struct Map<'a> {
|
||||
show: &'a Show,
|
||||
|
||||
client: &'a Client,
|
||||
|
||||
imgs: &'a Imgs,
|
||||
fonts: &'a Fonts,
|
||||
|
||||
#[conrod(common_builder)]
|
||||
common: widget::CommonBuilder,
|
||||
}
|
||||
|
||||
impl<'a> Map<'a> {
|
||||
pub fn new(imgs: &'a Imgs, fonts: &'a Fonts) -> Self {
|
||||
pub fn new(show: &'a Show, client: &'a Client, imgs: &'a Imgs, fonts: &'a Fonts) -> Self {
|
||||
Self {
|
||||
show,
|
||||
imgs,
|
||||
client,
|
||||
fonts,
|
||||
common: widget::CommonBuilder::default(),
|
||||
}
|
||||
@ -108,6 +117,21 @@ impl<'a> Widget for Map<'a> {
|
||||
return Some(Event::Close);
|
||||
}
|
||||
|
||||
// Location Name
|
||||
match self.client.current_chunk() {
|
||||
Some(chunk) => Text::new(chunk.meta().name())
|
||||
.mid_top_with_margin_on(state.ids.map_bg, 40.0)
|
||||
.font_size(40)
|
||||
.color(TEXT_COLOR_2)
|
||||
.parent(state.ids.map_frame_r)
|
||||
.set(state.ids.location_name, ui),
|
||||
None => Text::new(" ")
|
||||
.mid_top_with_margin_on(state.ids.map_bg, 3.0)
|
||||
.font_size(40)
|
||||
.color(TEXT_COLOR_2)
|
||||
.set(state.ids.location_name, ui),
|
||||
}
|
||||
|
||||
None
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ impl<'a> Widget for MiniMap<'a> {
|
||||
.font_size(14)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.mmap_location, ui),
|
||||
None => Text::new("Wait what")
|
||||
None => Text::new(" ")
|
||||
.mid_top_with_margin_on(state.ids.mmap_frame, 3.0)
|
||||
.font_size(14)
|
||||
.color(TEXT_COLOR)
|
||||
|
@ -43,6 +43,7 @@ use vek::*;
|
||||
|
||||
const XP_COLOR: Color = Color::Rgba(0.59, 0.41, 0.67, 1.0);
|
||||
const TEXT_COLOR: Color = Color::Rgba(1.0, 1.0, 1.0, 1.0);
|
||||
const TEXT_COLOR_2: Color = Color::Rgba(0.0, 0.0, 0.0, 1.0);
|
||||
const HP_COLOR: Color = Color::Rgba(0.33, 0.63, 0.0, 1.0);
|
||||
const MANA_COLOR: Color = Color::Rgba(0.42, 0.41, 0.66, 1.0);
|
||||
|
||||
@ -641,7 +642,9 @@ impl Hud {
|
||||
|
||||
// Map
|
||||
if self.show.map {
|
||||
match Map::new(&self.imgs, &self.fonts).set(self.ids.map, ui_widgets) {
|
||||
match Map::new(&self.show, client, &self.imgs, &self.fonts)
|
||||
.set(self.ids.map, ui_widgets)
|
||||
{
|
||||
Some(map::Event::Close) => {
|
||||
self.show.map(false);
|
||||
self.force_ungrab = true;
|
||||
@ -650,7 +653,6 @@ impl Hud {
|
||||
}
|
||||
}
|
||||
|
||||
// Esc-menu
|
||||
if self.show.esc_menu {
|
||||
match EscMenu::new(&self.imgs, &self.fonts).set(self.ids.esc_menu, ui_widgets) {
|
||||
Some(esc_menu::Event::OpenSettings(tab)) => {
|
||||
|
@ -65,7 +65,7 @@ impl Scene {
|
||||
backdrop_model: renderer
|
||||
.create_model(&FigureModelCache::load_mesh(
|
||||
"fixture/selection_bg.vox",
|
||||
Vec3::new(-55.0, -50.0, -1.0),
|
||||
Vec3::new(-55.0, -49.5, -2.0),
|
||||
))
|
||||
.unwrap(),
|
||||
backdrop_state: FigureState::new(renderer, FixtureSkeleton::new()),
|
||||
@ -84,7 +84,7 @@ impl Scene {
|
||||
.set_orientation(Vec3::new(client.state().get_time() as f32 * 0.0, 0.0, 0.0));
|
||||
|
||||
let (view_mat, proj_mat, cam_pos) = self.camera.compute_dependents(client);
|
||||
const CHAR_SELECT_TIME_OF_DAY: f32 = 50000.0; // 12*3600 seconds
|
||||
const CHAR_SELECT_TIME_OF_DAY: f32 = 80000.0; // 12*3600 seconds
|
||||
if let Err(err) = renderer.update_consts(
|
||||
&mut self.globals,
|
||||
&[Globals::new(
|
||||
@ -93,7 +93,7 @@ impl Scene {
|
||||
cam_pos,
|
||||
self.camera.get_focus_pos(),
|
||||
CHAR_SELECT_TIME_OF_DAY,
|
||||
500.0,
|
||||
55800.0,
|
||||
client.state().get_time(),
|
||||
renderer.get_resolution(),
|
||||
)],
|
||||
|
@ -142,7 +142,6 @@ widget_ids! {
|
||||
image_ids! {
|
||||
struct Imgs {
|
||||
<VoxelGraphic>
|
||||
v_logo: "voxygen/element/v_logo.vox",
|
||||
button: "voxygen/element/buttons/button.vox",
|
||||
button_hover: "voxygen/element/buttons/button_hover.vox",
|
||||
button_press: "voxygen/element/buttons/button_press.vox",
|
||||
@ -171,7 +170,6 @@ image_ids! {
|
||||
skin_eyes_window: "voxygen/element/frames/skin_eyes.png",
|
||||
hair_window: "voxygen/element/frames/skin_eyes.png",
|
||||
accessories_window: "voxygen/element/frames/skin_eyes.png",
|
||||
color_picker_bg: "voxygen/element/misc_bg/color_picker_blank.png",
|
||||
slider_range: "voxygen/element/slider/track.png",
|
||||
slider_indicator: "voxygen/element/slider/indicator.png",
|
||||
window_frame_2: "voxygen/element/frames/window_2.png",
|
||||
|
@ -70,7 +70,9 @@ image_ids! {
|
||||
<ImageGraphic>
|
||||
bg: "voxygen/background/bg_main.png",
|
||||
error_frame: "voxygen/element/frames/window_2.png",
|
||||
nothing: "voxygen/element/nothing.png",
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
font_ids! {
|
||||
@ -137,6 +139,7 @@ impl MainMenuUi {
|
||||
let ref mut ui_widgets = self.ui.set_widgets();
|
||||
let version = env!("CARGO_PKG_VERSION");
|
||||
const TEXT_COLOR: Color = Color::Rgba(1.0, 1.0, 1.0, 1.0);
|
||||
const TEXT_COLOR_2: Color = Color::Rgba(1.0, 1.0, 1.0, 0.2);
|
||||
// Background image, Veloren logo, Alpha-Version Label
|
||||
Image::new(self.imgs.bg)
|
||||
.middle_of(ui_widgets.window)
|
||||
@ -302,8 +305,8 @@ impl MainMenuUi {
|
||||
}
|
||||
if self.show_servers {
|
||||
Image::new(self.imgs.error_frame)
|
||||
.top_left_with_margins_on(ui_widgets.window, 3.0, 3.0)
|
||||
.w_h(400.0, 400.0)
|
||||
.mid_top_with_margin_on(self.ids.username_bg, -320.0)
|
||||
.w_h(400.0, 300.0)
|
||||
.set(self.ids.servers_frame, ui_widgets);
|
||||
|
||||
let net_settings = &global_state.settings.networking;
|
||||
@ -320,7 +323,7 @@ impl MainMenuUi {
|
||||
while let Some(item) = items.next(ui_widgets) {
|
||||
let mut text = "".to_string();
|
||||
if &net_settings.servers[item.i] == &self.server_address {
|
||||
text.push_str("* ")
|
||||
text.push_str("-> ")
|
||||
} else {
|
||||
text.push_str(" ")
|
||||
}
|
||||
@ -328,11 +331,11 @@ impl MainMenuUi {
|
||||
|
||||
if item
|
||||
.set(
|
||||
Button::image(self.imgs.button)
|
||||
.w_h(100.0, 53.0)
|
||||
.mid_bottom_with_margin_on(self.ids.servers_frame, 5.0)
|
||||
.hover_image(self.imgs.button_hover)
|
||||
.press_image(self.imgs.button_press)
|
||||
Button::image(self.imgs.nothing)
|
||||
.w_h(100.0, 50.0)
|
||||
.mid_top_with_margin_on(self.ids.servers_frame, 10.0)
|
||||
//.hover_image(self.imgs.button_hover)
|
||||
//.press_image(self.imgs.button_press)
|
||||
.label_y(Relative::Scalar(2.0))
|
||||
.label(&text)
|
||||
.label_font_size(20)
|
||||
@ -465,10 +468,10 @@ impl MainMenuUi {
|
||||
if Button::image(self.imgs.button)
|
||||
.w_h(190.0, 40.0)
|
||||
.up_from(self.ids.quit_button, 8.0)
|
||||
.hover_image(self.imgs.button_hover)
|
||||
.press_image(self.imgs.button_press)
|
||||
//.hover_image(self.imgs.button_hover)
|
||||
//.press_image(self.imgs.button_press)
|
||||
.label("Settings")
|
||||
.label_color(TEXT_COLOR)
|
||||
.label_color(TEXT_COLOR_2)
|
||||
.label_font_size(20)
|
||||
.label_y(Relative::Scalar(3.0))
|
||||
.set(self.ids.settings_button, ui_widgets)
|
||||
|
@ -42,16 +42,18 @@ pub struct Kingdom {
|
||||
fn generate_name<R: Rng>(rng: &mut R) -> String {
|
||||
let firstsyl = [
|
||||
"Eri", "Val", "Gla", "Wilde", "Cold", "Deep", "Dura", "Ester", "Fay", "Dark", "West",
|
||||
"East", "North", "South", "Ray", "Eri", "Dal", "Som", "Black", "Iron", "Grey", "Hel",
|
||||
"Gal", "Mor", "Lo", "Nil", "Mana", "Gar", "Mountain",
|
||||
"East", "North", "South", "Ray", "Eri", "Dal", "Som", "Sommer", "Black", "Iron", "Grey",
|
||||
"Hel", "Gal", "Mor", "Lo", "Nil", "Bel", "Lor", "Gold", "Red", "Marble", "Mana", "Gar",
|
||||
"Mountain", "Red", "Cheo", "Far", "High",
|
||||
];
|
||||
let mid = ["ka", "se", "au", "da", "di", "u"];
|
||||
let mid = ["ka", "se", "au", "da", "di"];
|
||||
let tails = [
|
||||
"mill", "ben", "sel", "dori", "theas", "dar", "bur", "to", "vis", "ten", "stone", "tiva",
|
||||
/*"mill",*/ "ben", "sel", "dori", "theas", "dar", "bur", "to", "vis", "ten", "stone", "tiva",
|
||||
"id", "and", "or", "el", "ond", "ia", "eld", "ald", "aft", "ift", "ity", "well", "oll",
|
||||
"ill", "all", "wyn", "light", "hill", "lin", "mont", "mor", "cliff", "rok", "den", "mi",
|
||||
"ill", "all", "wyn", "light", " Hill", "lin", "mont", "mor", "cliff", "rok", "den", "mi",
|
||||
"rock", "glenn", "rovi", "lea", "gate", "view", "ley", "wood", "ovia", "cliff", "marsh",
|
||||
"kor", "light", "ice", "river", "venn", "vale",
|
||||
"kor", "ice", /*"river",*/ "acre", "venn", "crest", "field", "vale", "spring", " Vale",
|
||||
"grasp", "fel", "fall", "grove", "wyn", "edge",
|
||||
];
|
||||
|
||||
let mut name = String::new();
|
||||
|
Loading…
Reference in New Issue
Block a user