1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2025-01-07 19:46:53 +00:00

Use CS+ menu assets

This commit is contained in:
dawnDus 2022-02-10 18:23:14 -05:00
parent fe3e60ecbf
commit 2e3245c654
No known key found for this signature in database
GPG key ID: 972AABDE81848F21
2 changed files with 14 additions and 1 deletions

View file

@ -1614,6 +1614,18 @@ impl EngineConstants {
self.tex_sizes.insert("Npc/NpcRegu".to_owned(), (320, 410));
self.tex_sizes.insert("ui".to_owned(), (128, 32));
self.title.logo_rect = Rect { left: 0, top: 0, right: 214, bottom: 50 };
self.title.menu_left_top = Rect { left: 0, top: 0, right: 4, bottom: 4 };
self.title.menu_right_top = Rect { left: 12, top: 0, right: 16, bottom: 4 };
self.title.menu_left_bottom = Rect { left: 0, top: 12, right: 4, bottom: 16 };
self.title.menu_right_bottom = Rect { left: 12, top: 12, right: 16, bottom: 16 };
self.title.menu_top = Rect { left: 4, top: 0, right: 8, bottom: 4 };
self.title.menu_middle = Rect { left: 8, top: 8, right: 12, bottom: 12 };
self.title.menu_bottom = Rect { left: 4, top: 12, right: 8, bottom: 16 };
self.title.menu_left = Rect { left: 0, top: 4, right: 4, bottom: 12 };
self.title.menu_right = Rect { left: 12, top: 4, right: 16, bottom: 12 };
self.font_path = "csfont.fnt".to_owned();
self.font_scale = 0.5;
self.soundtracks.insert("Remastered".to_owned(), "/base/Ogg11/".to_owned());

View file

@ -110,7 +110,8 @@ impl Menu {
}
pub fn draw(&self, state: &mut SharedGameState, ctx: &mut Context) -> GameResult {
let batch = state.texture_set.get_or_load_batch(ctx, &state.constants, "TextBox")?;
let ui_texture = if state.constants.is_cs_plus { "ui" } else { "TextBox" };
let batch = state.texture_set.get_or_load_batch(ctx, &state.constants, ui_texture)?;
let mut rect;
let mut rect2;