diff --git a/install/ui/texturetoolmanipulationpanel.fbp b/install/ui/texturetoolmanipulationpanel.fbp index 4e4b12cd74..bef126d9d6 100644 --- a/install/ui/texturetoolmanipulationpanel.fbp +++ b/install/ui/texturetoolmanipulationpanel.fbp @@ -30,7 +30,7 @@ 0 wxAUI_MGR_DEFAULT - + wxSYS_COLOUR_APPWORKSPACE 1 1 @@ -55,7 +55,7 @@ wxVERTICAL none - 12 + 8 wxALL|wxEXPAND 0 @@ -200,16 +200,16 @@ 3 wxALIGN_CENTER|wxBOTTOM|wxTOP 1 - + bSizer21 wxHORIZONTAL none - + 0 wxALIGN_CENTER|wxBOTTOM 0 - + 1 1 1 @@ -277,11 +277,11 @@ - + 6 wxLEFT 0 - + 1 1 1 @@ -425,6 +425,752 @@ + + 0 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + 48,48,48 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + wxID_ANY + + 0 + -1,1 + + 0 + + 1 + m_panel1 + 1 + + + protected + 1 + + Resizable + 1 + -1,1 + ; ; forward_declare + 0 + + + + + + + + 8 + wxALL|wxEXPAND + 0 + + + bSizer22 + wxVERTICAL + none + + 6 + wxALIGN_CENTER|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Scale + 0 + + 0 + + + 0 + + 1 + ScaleLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 6 + wxALIGN_CENTER|wxBOTTOM + 0 + + + bSizer211 + wxHORIZONTAL + none + + 0 + wxALIGN_CENTER|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From Art Provider; darkradiant:arrow_left_blue.png; + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + MyButton + + 0 + + 0 + + + 0 + + 1 + ScaleHorizSmallerButton + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 6 + wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From Art Provider; darkradiant:arrow_right_blue.png; + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + MyButton + + 0 + + 0 + + + 0 + + 1 + ScaleHorizLargerButton + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 6 + wxEXPAND|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + 40,-1 + + + 0 + + 1 + m_textCtrl1 + 1 + + + protected + 1 + + Resizable + 1 + 40,-1 + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + % + 0 + + 0 + + + 0 + + 1 + m_staticText4 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + 6 + wxALIGN_CENTER|wxBOTTOM + 1 + + + bSizer2111 + wxHORIZONTAL + none + + 0 + wxALIGN_CENTER|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From Art Provider; darkradiant:arrow_left_blue.png; + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + MyButton + + 0 + + 0 + + + 0 + + 1 + ScaleVertSmallerButton + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 6 + wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From Art Provider; darkradiant:arrow_right_blue.png; + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + MyButton + + 0 + + 0 + + + 0 + + 1 + ScaleVertLargerButton + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 6 + wxEXPAND|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + 40,-1 + + + 0 + + 1 + m_textCtrl11 + 1 + + + protected + 1 + + Resizable + 1 + 40,-1 + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + % + 0 + + 0 + + + 0 + + 1 + m_staticText41 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + + + 0 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + 48,48,48 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + wxID_ANY + + 0 + -1,1 + + 0 + + 1 + m_panel11 + 1 + + + protected + 1 + + Resizable + 1 + -1,1 + ; ; forward_declare + 0 + + + + + + diff --git a/install/ui/texturetoolmanipulationpanel.xrc b/install/ui/texturetoolmanipulationpanel.xrc index c1dfadd2fe..f6fdac072b 100644 --- a/install/ui/texturetoolmanipulationpanel.xrc +++ b/install/ui/texturetoolmanipulationpanel.xrc @@ -2,12 +2,13 @@ + #ababab wxVERTICAL wxALL|wxEXPAND - 12 + 8 wxVERTICAL @@ -65,6 +66,131 @@ + + + wxEXPAND | wxALL + 0 + + -1,1 + #303030 + 0 + + + + + wxALL|wxEXPAND + 8 + + wxVERTICAL + + + wxALIGN_CENTER|wxBOTTOM + 6 + + + -1 + + + + + wxALIGN_CENTER|wxBOTTOM + 6 + + wxHORIZONTAL + + + wxALIGN_CENTER|wxBOTTOM + 0 + + undefined.png + 0 + + + + + wxLEFT + 6 + + undefined.png + 0 + + + + + wxEXPAND|wxLEFT + 6 + + 40,-1 + + + + + + wxALIGN_CENTER_VERTICAL|wxLEFT + 3 + + + -1 + + + + + + + wxALIGN_CENTER|wxBOTTOM + 6 + + wxHORIZONTAL + + + wxALIGN_CENTER|wxBOTTOM + 0 + + undefined.png + 0 + + + + + wxLEFT + 6 + + undefined.png + 0 + + + + + wxEXPAND|wxLEFT + 6 + + 40,-1 + + + + + + wxALIGN_CENTER_VERTICAL|wxLEFT + 3 + + + -1 + + + + + + + + + wxEXPAND + 0 + + -1,1 + #303030 + 0 + + diff --git a/radiant/textool/TexTool.cpp b/radiant/textool/TexTool.cpp index 1bf0c31840..9c45139085 100644 --- a/radiant/textool/TexTool.cpp +++ b/radiant/textool/TexTool.cpp @@ -129,6 +129,12 @@ wxWindow* TexTool::createManipulationPanel() findNamedObject(panel, "ShiftRightButton")->Bind(wxEVT_BUTTON, [this] (wxCommandEvent&) { onShiftSelected("right"); }); makeLabelBold(panel, "ShiftLabel"); + makeLabelBold(panel, "ScaleLabel"); + + findNamedObject(panel, "ScaleHorizSmallerButton")->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { onScaleSelected("up"); }); + findNamedObject(panel, "ScaleHorizLargerButton")->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { onScaleSelected("down"); }); + findNamedObject(panel, "ScaleVertSmallerButton")->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { onScaleSelected("up"); }); + findNamedObject(panel, "ScaleVertLargerButton")->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { onScaleSelected("down"); }); return panel; } @@ -954,6 +960,11 @@ void TexTool::onShiftSelected(const std::string& direction) GlobalCommandSystem().executeCommand("TexToolShiftSelected", direction); } +void TexTool::onScaleSelected(const std::string& direction) +{ + // TODO GlobalCommandSystem().executeCommand("TexToolShiftSelected", direction); +} + void TexTool::updateManipulationPanel() { diff --git a/radiant/textool/TexTool.h b/radiant/textool/TexTool.h index 5ebaea9703..a206a56ce4 100644 --- a/radiant/textool/TexTool.h +++ b/radiant/textool/TexTool.h @@ -136,6 +136,7 @@ class TexTool : void onMouseScroll(wxMouseEvent& ev); void onShiftSelected(const std::string& direction); + void onScaleSelected(const std::string& direction); // UndoSystem event handler void onUndoRedoOperation();