From 90d813fc5ab58f5ae793d857fb5bc691e2bd04ec Mon Sep 17 00:00:00 2001 From: Sven Eberhardt Date: Sat, 6 Aug 2016 21:42:21 -0400 Subject: [PATCH] Fix OnMouseOver / OnMouseOut parameter warnings The callbacks from PlayerControl aren't used anywhere right now and there's only two unrelated internal functions in the GUI list menu with the same name. So the parameter checker emits a warning here. Solve it by renaming the internal functions. --- .../HUD.ocd/MenuStyles.ocd/Default.ocd/Script.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/planet/Objects.ocd/HUD.ocd/MenuStyles.ocd/Default.ocd/Script.c b/planet/Objects.ocd/HUD.ocd/MenuStyles.ocd/Default.ocd/Script.c index 8bedcb698..7ce759b20 100644 --- a/planet/Objects.ocd/HUD.ocd/MenuStyles.ocd/Default.ocd/Script.c +++ b/planet/Objects.ocd/HUD.ocd/MenuStyles.ocd/Default.ocd/Script.c @@ -45,8 +45,8 @@ func Construction() this.container.list_submenu.Right = "50%"; // Hook into MouseIn/Out of the list menu to be able to show a description. - this.container.list_submenu->SetMouseOverCallback(this, "OnMouseOver"); - this.container.list_submenu->SetMouseOutCallback(this, "OnMouseOut"); + this.container.list_submenu->SetMouseOverCallback(this, "OnMouseOverListMenu"); + this.container.list_submenu->SetMouseOutCallback(this, "OnMouseOutListMenu"); } /* Updates the description box on the right side on mouse-over. */ @@ -105,14 +105,14 @@ func SetMouseOutCallback(proplist target, callback) on_mouse_out_callback = [target, callback]; } -func OnMouseOver(parameter, int user_ID, int player) +func OnMouseOverListMenu(parameter, int user_ID, int player) { if (on_mouse_over_callback) on_mouse_over_callback[0]->Call(on_mouse_over_callback[1], parameter, user_ID, player); UpdateDescription(parameter); } -func OnMouseOut(parameter, int user_ID, int player) +func OnMouseOutListMenu(parameter, int user_ID, int player) { if (on_mouse_out_callback) on_mouse_out_callback[0]->Call(on_mouse_out_callback[1], parameter, user_ID, player);