mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
disabled chat arrows
Former-commit-id: 5a5ea8e7101c16ae780af1fb9b3e6e4ba59a98b4
This commit is contained in:
parent
a4f96b4642
commit
b29343490f
@ -153,23 +153,23 @@ impl Chat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Up and Down Arrows => Scroll the chat up/down one row per click;
|
// Up and Down Arrows => Scroll the chat up/down one row per click;
|
||||||
if Button::image(imgs.chat_arrow_up)
|
//if Button::image(imgs.chat_arrow_up)
|
||||||
.w_h(22.0, 22.0)
|
//.w_h(22.0, 22.0)
|
||||||
.hover_image(imgs.chat_arrow_up_mo)
|
//.hover_image(imgs.chat_arrow_up_mo)
|
||||||
.press_image(imgs.chat_arrow_up_press)
|
//.press_image(imgs.chat_arrow_up_press)
|
||||||
.up_from(self.ids.chat_arrow_down, 60.0)
|
//.up_from(self.ids.chat_arrow_down, 60.0)
|
||||||
.set(self.ids.chat_arrow_up, ui_widgets)
|
//.set(self.ids.chat_arrow_up, ui_widgets)
|
||||||
.was_clicked()
|
//.was_clicked()
|
||||||
{};
|
//{};
|
||||||
|
|
||||||
if Button::image(imgs.chat_arrow_down)
|
//if Button::image(imgs.chat_arrow_down)
|
||||||
.w_h(22.0, 22.0)
|
// .w_h(22.0, 22.0)
|
||||||
.hover_image(imgs.chat_arrow_down_mo)
|
//.hover_image(imgs.chat_arrow_down_mo)
|
||||||
.press_image(imgs.chat_arrow_down_press)
|
//.press_image(imgs.chat_arrow_down_press)
|
||||||
.bottom_right_with_margins_on(self.ids.message_box_bg, 73.0, 2.0)
|
//.bottom_right_with_margins_on(self.ids.message_box_bg, 73.0, 2.0)
|
||||||
.set(self.ids.chat_arrow_down, ui_widgets)
|
// .set(self.ids.chat_arrow_down, ui_widgets)
|
||||||
.was_clicked()
|
//.was_clicked()
|
||||||
{};
|
//{};
|
||||||
|
|
||||||
// If enter is pressed send the current message
|
// If enter is pressed send the current message
|
||||||
if ui_widgets
|
if ui_widgets
|
||||||
|
@ -18,6 +18,9 @@ widget_ids! {
|
|||||||
struct Ids {
|
struct Ids {
|
||||||
// Test
|
// Test
|
||||||
bag_space_add,
|
bag_space_add,
|
||||||
|
inventorytest_button,
|
||||||
|
inventorytest_button_label,
|
||||||
|
|
||||||
// Bag and Inventory
|
// Bag and Inventory
|
||||||
bag,
|
bag,
|
||||||
bag_contents,
|
bag_contents,
|
||||||
@ -375,6 +378,7 @@ pub struct Hud {
|
|||||||
map_open: bool,
|
map_open: bool,
|
||||||
show_ui: bool,
|
show_ui: bool,
|
||||||
inventory_space: i32,
|
inventory_space: i32,
|
||||||
|
inventorytest_button: bool,
|
||||||
settings_tab: SettingsTab,
|
settings_tab: SettingsTab,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,6 +421,7 @@ impl Hud {
|
|||||||
menu_open: false,
|
menu_open: false,
|
||||||
map_open: false,
|
map_open: false,
|
||||||
show_ui: true,
|
show_ui: true,
|
||||||
|
inventorytest_button: false,
|
||||||
inventory_space: 8,
|
inventory_space: 8,
|
||||||
open_windows: Windows::None,
|
open_windows: Windows::None,
|
||||||
font_metamorph,
|
font_metamorph,
|
||||||
@ -430,19 +435,20 @@ impl Hud {
|
|||||||
|
|
||||||
if self.show_ui {
|
if self.show_ui {
|
||||||
// Add Bag-Space Button
|
// Add Bag-Space Button
|
||||||
if Button::image(self.imgs.mmap_button)
|
if self.inventorytest_button {
|
||||||
.w_h(50.0, 50.0)
|
if Button::image(self.imgs.mmap_button)
|
||||||
.top_right_with_margins_on(ui_widgets.window, 2.0, 2.0)
|
.w_h(100.0, 100.0)
|
||||||
.label("+1 Space")
|
.middle_of(ui_widgets.window)
|
||||||
.label_font_size(10)
|
.label("+1 Space")
|
||||||
.hover_image(self.imgs.mmap_button_hover)
|
.label_font_size(10)
|
||||||
.press_image(self.imgs.mmap_button_press)
|
.hover_image(self.imgs.mmap_button_hover)
|
||||||
.set(self.ids.bag_space_add, ui_widgets)
|
.press_image(self.imgs.mmap_button_press)
|
||||||
.was_clicked()
|
.set(self.ids.bag_space_add, ui_widgets)
|
||||||
{
|
.was_clicked()
|
||||||
self.inventory_space = self.inventory_space + 1;
|
{
|
||||||
};
|
self.inventory_space = self.inventory_space + 1;
|
||||||
|
};
|
||||||
|
}
|
||||||
// Chat box
|
// Chat box
|
||||||
if let Some(msg) = self
|
if let Some(msg) = self
|
||||||
.chat
|
.chat
|
||||||
@ -855,6 +861,23 @@ impl Hud {
|
|||||||
.graphics_for(self.ids.button_help)
|
.graphics_for(self.ids.button_help)
|
||||||
.rgba(220.0, 220.0, 220.0, 0.8)
|
.rgba(220.0, 220.0, 220.0, 0.8)
|
||||||
.set(self.ids.show_help_label, ui_widgets);
|
.set(self.ids.show_help_label, ui_widgets);
|
||||||
|
|
||||||
|
self.inventorytest_button = ToggleButton::new(
|
||||||
|
self.inventorytest_button,
|
||||||
|
self.imgs.check,
|
||||||
|
self.imgs.check_checked,
|
||||||
|
)
|
||||||
|
.w_h(288.0 / 24.0, 288.0 / 24.0)
|
||||||
|
.top_left_with_margins_on(self.ids.rectangle, 40.0, 15.0)
|
||||||
|
.hover_images(self.imgs.check_checked_mo, self.imgs.check_mo)
|
||||||
|
.press_images(self.imgs.check_press, self.imgs.check_press)
|
||||||
|
.set(self.ids.inventorytest_button, ui_widgets);
|
||||||
|
Text::new("Show Inventory Test Button")
|
||||||
|
.x_relative_to(self.ids.inventorytest_button, 55.0)
|
||||||
|
.font_size(12)
|
||||||
|
.graphics_for(self.ids.inventorytest_button)
|
||||||
|
.rgba(220.0, 220.0, 220.0, 0.8)
|
||||||
|
.set(self.ids.inventorytest_button_label, ui_widgets);
|
||||||
}
|
}
|
||||||
//2 Gameplay////////////////
|
//2 Gameplay////////////////
|
||||||
if Button::image(if let SettingsTab::Gameplay = self.settings_tab {
|
if Button::image(if let SettingsTab::Gameplay = self.settings_tab {
|
||||||
|
@ -8,6 +8,9 @@ use vek::*;
|
|||||||
use client::{self, Client};
|
use client::{self, Client};
|
||||||
use common::clock::Clock;
|
use common::clock::Clock;
|
||||||
|
|
||||||
|
// Convert Input to a valid string
|
||||||
|
use std::net::ToSocketAddrs;
|
||||||
|
|
||||||
// Crate
|
// Crate
|
||||||
use crate::{
|
use crate::{
|
||||||
hud::{Event as HudEvent, Hud},
|
hud::{Event as HudEvent, Hud},
|
||||||
|
Loading…
Reference in New Issue
Block a user