FS2_Open
Open source remastering of the Freespace 2 engine
dlgobjecteditor.cpp
Go to the documentation of this file.
1 /*
2  * Created by Ian "Goober5000" Warfield and "z64555" for the FreeSpace2 Source
3  * Code Project.
4  *
5  * You may not sell or otherwise commercially exploit the source or things you
6  * create based on the source.
7  */
9 #include "frmfred2.h"
10 #include "base/wxfred_base.h"
11 
12 #include <wx/wx.h>
13 
14 // Public Members
15 dlgObjectEditor::dlgObjectEditor( wxWindow* parent, wxWindowID id )
16  : fredBase::dlgObjectEditor(parent, id)
17 {
18 }
19 
20 // Protected Members:
21  // Handlers for dlgObjectEditor events.
22 void dlgObjectEditor::OnClose( wxCloseEvent& event )
23 {
24  // Tell the parent window (frmFRED2) that we closed before destroying this window
25  ((frmFRED2*) GetParent())->OnChildClosed( this );
26  Destroy();
27 }
28 
29 void dlgObjectEditor::OnPointTo( wxCommandEvent& event )
30 {
31  if( event.IsChecked() == true )
32  {
33  // Enable Orientation Controls
34  optObject->Enable();
35  cbObject->Enable();
36 
37  optLocation->Enable();
38  lblLocationX->Enable();
39  spnLocationX->Enable();
40  lblLocationY->Enable();
41  spnLocationY->Enable();
42  lblLocationZ->Enable();
43  spnLocationZ->Enable();
44  }
45  else
46  {
47  // Disable Orientation Controls
48  optObject->Disable();
49  cbObject->Disable();
50 
51  optLocation->Disable();
52  lblLocationX->Disable();
53  spnLocationX->Disable();
54  lblLocationY->Disable();
55  spnLocationY->Disable();
56  lblLocationZ->Disable();
57  spnLocationZ->Disable();
58  }
59 }
60 
61 void dlgObjectEditor::OnOK( wxCommandEvent& event )
62 {
63  // TODO: Apply Changes
64  Close();
65 }
66 
67 void dlgObjectEditor::OnCancel( wxCommandEvent& event)
68 {
69  // TODO: Restore previous state of objects
70  Close();
71 }
void OnPointTo(wxCommandEvent &event)
wxStaticText * lblLocationX
Definition: wxfred_base.h:647
void OnCancel(wxCommandEvent &event)
wxStaticText * lblLocationZ
Definition: wxfred_base.h:651
wxRadioButton * optLocation
Definition: wxfred_base.h:646
void OnOK(wxCommandEvent &event)
wxRadioButton * optObject
Definition: wxfred_base.h:644
wxStaticText * lblLocationY
Definition: wxfred_base.h:649
struct _cl_event * event
Definition: Glext.h:7296
void OnClose(wxCloseEvent &event)