Fix up some level editor dialog behavior

This commit is contained in:
elasota
2020-02-26 12:17:04 -05:00
parent d617795591
commit cc17911776
23 changed files with 224 additions and 201 deletions

View File

@@ -435,18 +435,17 @@ void SetDialogItemValue (Dialog *theDialog, short item, short theState)
void ToggleDialogItemValue (Dialog *theDialog, short item)
{
Rect itemRect;
ControlHandle itemHandle;
int16_t itemType, theState;
const PortabilityLayer::DialogItem &itemRef = theDialog->GetItems()[item - 1];
int16_t theState;
theState = itemRef.GetWidget()->GetState();
PortabilityLayer::Widget *widget = theDialog->GetItems()[item - 1].GetWidget();
theState = widget->GetState();
if (theState == 0)
theState = 1;
else
theState = 0;
SetControlValue(itemHandle, theState);
widget->SetState(theState);
widget->DrawControl(theDialog->GetWindow()->GetDrawSurface());
}
//-------------------------------------------------------------- SetDialogNumToStr