Add font png to pkgbuild
This commit is contained in:
parent
be7a746931
commit
8a7c4ab44d
2 changed files with 6 additions and 7 deletions
|
@ -26,4 +26,7 @@ package() {
|
||||||
|
|
||||||
# copy layer discovery info file
|
# copy layer discovery info file
|
||||||
install -Dm644 ${_pkgbase}/rFactorOverlay.json "${pkgdir}"/usr/share/vulkan/implicit_layer.d/rFactorOverlay.json
|
install -Dm644 ${_pkgbase}/rFactorOverlay.json "${pkgdir}"/usr/share/vulkan/implicit_layer.d/rFactorOverlay.json
|
||||||
|
|
||||||
|
# copy font png
|
||||||
|
install -Dm644 ${_pkgbase}/font.png "${pkgdir}"/usr/share/vulkan_rf2_layer/font.png
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,9 +46,7 @@ impl UiSelectorConfig {
|
||||||
#[derive(Deserialize, Serialize)]
|
#[derive(Deserialize, Serialize)]
|
||||||
pub struct OverlayConfig {
|
pub struct OverlayConfig {
|
||||||
pub ui_config: UiSelectorConfig,
|
pub ui_config: UiSelectorConfig,
|
||||||
|
|
||||||
pub radar_config: RadarConfig,
|
pub radar_config: RadarConfig,
|
||||||
pub font_path: String,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl OverlayConfig {
|
impl OverlayConfig {
|
||||||
|
@ -56,7 +54,6 @@ impl OverlayConfig {
|
||||||
Self {
|
Self {
|
||||||
ui_config: UiSelectorConfig::new(),
|
ui_config: UiSelectorConfig::new(),
|
||||||
radar_config: RadarConfig::new(),
|
radar_config: RadarConfig::new(),
|
||||||
font_path: String::new(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,8 +90,6 @@ impl Overlay {
|
||||||
|
|
||||||
pub fn set_config(&mut self, config: OverlayConfig) {
|
pub fn set_config(&mut self, config: OverlayConfig) {
|
||||||
self.config = config;
|
self.config = config;
|
||||||
|
|
||||||
self.config.font_path = "/opt/sata_ssd/Workspace/vk_layer_rs/font.png".to_string();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_instance(&mut self, instance: Arc<Instance>) {
|
pub fn set_instance(&mut self, instance: Arc<Instance>) {
|
||||||
|
@ -144,9 +139,10 @@ impl Overlay {
|
||||||
|
|
||||||
// only font is used
|
// only font is used
|
||||||
let mut create_info = GuiHandlerCreateInfo::default();
|
let mut create_info = GuiHandlerCreateInfo::default();
|
||||||
// create_info.font_path = AssetPath::from(self.config.font_path.clone());
|
|
||||||
create_info.font_path = AssetPath::from("/opt/sata_ssd/Workspace/vk_layer_rs/font.png");
|
create_info.font_path = AssetPath::from("/usr/share/vulkan_rf2_layer/font.png");
|
||||||
create_info.font_path.assume_prefix_free();
|
create_info.font_path.assume_prefix_free();
|
||||||
|
|
||||||
// required to not crash
|
// required to not crash
|
||||||
create_info.resource_directory = AssetPath::from("");
|
create_info.resource_directory = AssetPath::from("");
|
||||||
create_info.resource_directory.assume_prefix_free();
|
create_info.resource_directory.assume_prefix_free();
|
||||||
|
|
Loading…
Reference in a new issue