1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-20 00:46:34 +00:00

Use our own Menu Title button (#498)

This commit is contained in:
jugeeya 2023-02-24 22:07:35 -08:00 committed by GitHub
parent f268137bc4
commit e0fec0039e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 15 deletions

Binary file not shown.

View file

@ -343,23 +343,10 @@ pub unsafe fn draw(root_pane: &mut Pane) {
// Update menu display // Update menu display
// Grabbing lock as read-only, essentially // Grabbing lock as read-only, essentially
let app = &*crate::common::menu::QUICK_MENU_APP.data_ptr(); let app = &*crate::common::menu::QUICK_MENU_APP.data_ptr();
if let Some(quit_button) = root_pane.find_pane_by_name_recursive("TrModTitle") {
if let Some(quit_button) = root_pane.find_pane_by_name_recursive("btn_finish") {
// Normally at (-804, 640)
// Comes down to (-804, 514)
if QUICK_MENU_ACTIVE {
quit_button.pos_y = 514.0;
}
for quit_txt_s in &["set_txt_00", "set_txt_01"] { for quit_txt_s in &["set_txt_00", "set_txt_01"] {
if let Some(quit_txt) = quit_button.find_pane_by_name_recursive(quit_txt_s) { if let Some(quit_txt) = quit_button.find_pane_by_name_recursive(quit_txt_s) {
quit_txt.as_textbox().set_text_string(if QUICK_MENU_ACTIVE { quit_txt.as_textbox().set_text_string("Modpack Menu");
"Modpack Menu"
} else {
// Awkward. We should get the o.g. translation for non-english games
// Or create our own textbox here so we don't step on their toes.
"Quit Training"
});
} }
} }
} }