mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
settings window
Former-commit-id: a7a72ab6b1db411fcfcf3e03d1db4fce56370af3
This commit is contained in:
parent
1109c55671
commit
cbd754bd90
@ -1047,11 +1047,9 @@ impl Hud {
|
||||
// 0 Settings
|
||||
|
||||
if let Windows::Settings = self.open_windows {
|
||||
// Alignment
|
||||
// Frame Alignment
|
||||
Rectangle::fill_with([824.0, 488.0], color::TRANSPARENT)
|
||||
.middle_of(ui_widgets.window)
|
||||
.scroll_kids()
|
||||
.scroll_kids_vertically()
|
||||
.middle_of(ui_widgets.window)
|
||||
.set(self.ids.settings_bg, ui_widgets);
|
||||
// Frame
|
||||
Image::new(self.imgs.settings_frame_l)
|
||||
@ -1076,10 +1074,20 @@ impl Hud {
|
||||
.set(self.ids.settings_content, ui_widgets);
|
||||
=======
|
||||
Image::new(self.imgs.settings_frame_r)
|
||||
.top_right_with_margins_on(self.ids.settings_bg, 0.0, 0.0)
|
||||
.right_from(self.ids.settings_l, 0.0)
|
||||
.parent(self.ids.settings_bg)
|
||||
.w_h(412.0, 488.0)
|
||||
.set(self.ids.settings_r, ui_widgets);
|
||||
<<<<<<< HEAD
|
||||
>>>>>>> Map Window, Settings Window
|
||||
=======
|
||||
// Content Alignment
|
||||
Rectangle::fill_with([189.0*4.0, 97.0*4.0], color::TRANSPARENT)
|
||||
.top_right_with_margins_on(self.ids.settings_r, 21.0*4.0, 4.0*4.0)
|
||||
.scroll_kids()
|
||||
.scroll_kids_vertically()
|
||||
.set(self.ids.settings_content, ui_widgets);
|
||||
>>>>>>> settings window
|
||||
// X-Button
|
||||
if Button::image(self.imgs.close_button)
|
||||
.w_h(28.0, 28.0)
|
||||
@ -1115,6 +1123,7 @@ impl Hud {
|
||||
// 1 Interface////////////////////////////
|
||||
if Button::image(if let SettingsTab::Interface = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
<<<<<<< HEAD
|
||||
} else {
|
||||
self.imgs.settings_button
|
||||
})
|
||||
@ -1130,6 +1139,23 @@ impl Hud {
|
||||
self.imgs.settings_button_press
|
||||
})
|
||||
.top_left_with_margins_on(self.ids.settings_l, 8.0 * 4.0, 2.0 * 4.0)
|
||||
=======
|
||||
} else {
|
||||
self.imgs.settings_button
|
||||
})
|
||||
.w_h(31.0*4.0, 12.0*4.0)
|
||||
.hover_image(if let SettingsTab::Interface = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
self.imgs.settings_button_hover
|
||||
})
|
||||
.press_image(if let SettingsTab::Interface = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
self.imgs.settings_button_press
|
||||
})
|
||||
.top_left_with_margins_on(self.ids.settings_l, 8.0*4.0, 2.0*4.0)
|
||||
>>>>>>> settings window
|
||||
.label("Interface")
|
||||
.label_font_size(14)
|
||||
.label_color(TEXT_COLOR)
|
||||
@ -1192,11 +1218,16 @@ impl Hud {
|
||||
}
|
||||
|
||||
// 2 Gameplay////////////////
|
||||
<<<<<<< HEAD
|
||||
if Button::image(if let SettingsTab::Gameplay = self.settings_tab {
|
||||
=======
|
||||
if Button::image(if let SettingsTab::Gameplay = self.settings_tab {
|
||||
>>>>>>> settings window
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
self.imgs.settings_button
|
||||
})
|
||||
<<<<<<< HEAD
|
||||
.w_h(31.0 * 4.0, 12.0 * 4.0)
|
||||
.hover_image(if let SettingsTab::Gameplay = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
@ -1208,6 +1239,19 @@ impl Hud {
|
||||
} else {
|
||||
self.imgs.settings_button_press
|
||||
})
|
||||
=======
|
||||
.w_h(31.0*4.0, 12.0*4.0)
|
||||
.hover_image(if let SettingsTab::Gameplay = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
self.imgs.settings_button_hover
|
||||
})
|
||||
.press_image(if let SettingsTab::Gameplay = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
self.imgs.settings_button_press
|
||||
})
|
||||
>>>>>>> settings window
|
||||
.right_from(self.ids.interface, 0.0)
|
||||
.label("Gameplay")
|
||||
.label_font_size(14)
|
||||
@ -1224,7 +1268,11 @@ impl Hud {
|
||||
} else {
|
||||
self.imgs.settings_button
|
||||
})
|
||||
<<<<<<< HEAD
|
||||
.w_h(31.0 * 4.0, 12.0 * 4.0)
|
||||
=======
|
||||
.w_h(31.0*4.0, 12.0*4.0)
|
||||
>>>>>>> settings window
|
||||
.hover_image(if let SettingsTab::Controls = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
@ -1246,11 +1294,16 @@ impl Hud {
|
||||
}
|
||||
|
||||
// 4 Video////////////////////////////////
|
||||
<<<<<<< HEAD
|
||||
if Button::image(if let SettingsTab::Video = self.settings_tab {
|
||||
=======
|
||||
if Button::image(if let SettingsTab::Video = self.settings_tab {
|
||||
>>>>>>> settings window
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
self.imgs.settings_button
|
||||
})
|
||||
<<<<<<< HEAD
|
||||
.w_h(31.0 * 4.0, 12.0 * 4.0)
|
||||
.hover_image(if let SettingsTab::Video = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
@ -1262,6 +1315,19 @@ impl Hud {
|
||||
} else {
|
||||
self.imgs.settings_button_press
|
||||
})
|
||||
=======
|
||||
.w_h(31.0*4.0, 12.0*4.0)
|
||||
.hover_image(if let SettingsTab::Video = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
self.imgs.settings_button_hover
|
||||
})
|
||||
.press_image(if let SettingsTab::Video = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
self.imgs.settings_button_press
|
||||
})
|
||||
>>>>>>> settings window
|
||||
.right_from(self.ids.controls, 0.0)
|
||||
.label("Video")
|
||||
.parent(self.ids.settings_r)
|
||||
@ -1276,6 +1342,7 @@ impl Hud {
|
||||
// 5 Sound///////////////////////////////
|
||||
if Button::image(if let SettingsTab::Sound = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
<<<<<<< HEAD
|
||||
} else {
|
||||
self.imgs.settings_button
|
||||
})
|
||||
@ -1290,6 +1357,22 @@ impl Hud {
|
||||
} else {
|
||||
self.imgs.settings_button_press
|
||||
})
|
||||
=======
|
||||
} else {
|
||||
self.imgs.settings_button
|
||||
})
|
||||
.w_h(31.0*4.0, 12.0*4.0)
|
||||
.hover_image(if let SettingsTab::Sound = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
self.imgs.settings_button_hover
|
||||
})
|
||||
.press_image(if let SettingsTab::Sound = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
self.imgs.settings_button_press
|
||||
})
|
||||
>>>>>>> settings window
|
||||
.right_from(self.ids.video, 0.0)
|
||||
.parent(self.ids.settings_r)
|
||||
.label("Sound")
|
||||
@ -1599,6 +1682,7 @@ impl Hud {
|
||||
.w_h(412.0, 488.0)
|
||||
.set(self.ids.map_frame_l, ui_widgets);
|
||||
Image::new(self.imgs.map_frame_r)
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
.right_from(self.ids.map_frame_l, 0.0)
|
||||
.w_h(412.0, 488.0)
|
||||
@ -1613,14 +1697,17 @@ impl Hud {
|
||||
.set(self.ids.map_frame_bl, ui_widgets);
|
||||
=======
|
||||
.top_right_with_margins_on(self.ids.map_bg, 0.0, 0.0)
|
||||
=======
|
||||
.right_from(self.ids.map_frame_l, 0.0)
|
||||
>>>>>>> settings window
|
||||
.w_h(412.0, 488.0)
|
||||
.set(self.ids.map_frame_r, ui_widgets);
|
||||
Image::new(self.imgs.map_frame_br)
|
||||
.bottom_right_with_margins_on(self.ids.map_bg, 0.0, 0.0)
|
||||
.down_from(self.ids.map_frame_r, 0.0)
|
||||
.w_h(412.0, 488.0)
|
||||
.set(self.ids.map_frame_br, ui_widgets);
|
||||
Image::new(self.imgs.map_frame_bl)
|
||||
.bottom_left_with_margins_on(self.ids.map_bg, 0.0, 0.0)
|
||||
.down_from(self.ids.map_frame_l, 0.0)
|
||||
.w_h(412.0, 488.0)
|
||||
.set(self.ids.map_frame_bl, ui_widgets);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user