From 73a82342dbedbecefea773171ac19b08abfd4959 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 26 Sep 2010 16:26:12 +0900 Subject: [PATCH] Get the inspector button mostly working thanks to Deek's help. --- tools/Forge/Bundles/MapEdit/InspectorControl.h | 4 ++-- tools/Forge/Bundles/MapEdit/InspectorControl.m | 15 ++++----------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/tools/Forge/Bundles/MapEdit/InspectorControl.h b/tools/Forge/Bundles/MapEdit/InspectorControl.h index ec35931ad..81b3f3580 100644 --- a/tools/Forge/Bundles/MapEdit/InspectorControl.h +++ b/tools/Forge/Bundles/MapEdit/InspectorControl.h @@ -66,8 +66,8 @@ extern id inspcontrol_i; id itemHelp_i; // docs } --changeInspector:sender; --changeInspectorTo:(insp_e) which; +- (void) changeInspector:sender; +- (void) changeInspectorTo:(insp_e) which; -(insp_e) getCurrentInspector; @end diff --git a/tools/Forge/Bundles/MapEdit/InspectorControl.m b/tools/Forge/Bundles/MapEdit/InspectorControl.m index 2df335ff9..ff8ead987 100644 --- a/tools/Forge/Bundles/MapEdit/InspectorControl.m +++ b/tools/Forge/Bundles/MapEdit/InspectorControl.m @@ -87,20 +87,15 @@ id inspcontrol_i; // Sent by the PopUpList in the Inspector // Each cell in the PopUpList must have the correct tag // --changeInspector:sender +- (void) changeInspector:sender { - id cell; - - cell =[sender selectedCell]; - Sys_Printf ("%p %d\n", cell, (int)[cell tag]); - [self changeInspectorTo:[cell tag]]; - return self; + [self changeInspectorTo:[sender selectedTag]]; } // // Change to specific Inspector // --changeInspectorTo:(insp_e) which +- (void) changeInspectorTo:(insp_e) which { id newView; NSRect r; @@ -108,7 +103,7 @@ id inspcontrol_i; NSRect f; if (which == currentInspectorType) - return self; + return; currentInspectorType = which; newView =[contentList objectAtIndex:which]; @@ -131,8 +126,6 @@ id inspcontrol_i; NSRectFill (f); [inspectorSubview_i unlockFocus]; [inspectorView_i display]; - - return self; } -(insp_e) getCurrentInspector