#include <C4ToolsDlg.h>
Classes | |
class | State |
Public Member Functions | |
C4ToolsDlg () | |
~C4ToolsDlg () | |
void | Default () |
void | Clear () |
bool | PopTextures () |
bool | PopMaterial () |
bool | ChangeGrade (int32_t iChange) |
void | NeedPreviewUpdate () |
bool | Open () |
bool | SetGrade (int32_t iGrade) |
bool | SetTool (int32_t iTool, bool fTemp) |
bool | ToggleTool () |
bool | SetLandscapeMode (LandscapeMode iMode, bool flat_chunk_shapes, bool fThroughControl=false) |
bool | SetIFT (bool fIFT) |
bool | ToggleIFT () |
bool | SelectTexture (const char *szTexture, bool by_console_gui=false) |
bool | SelectMaterial (const char *szMaterial, bool by_console_gui=false) |
bool | SelectBackTexture (const char *szTexture, bool by_console_gui=false) |
bool | SelectBackMaterial (const char *szMaterial, bool by_console_gui=false) |
void | SetAlternateTool () |
void | ResetAlternateTool () |
bool | IsGradedTool () const |
void | UpdateLandscapeModeCtrls () |
void | SetTexture (const char *szTexture) |
void | SetMaterial (const char *szMaterial) |
void | SetBackTexture (const char *szTexture) |
void | SetBackMaterial (const char *szMaterial) |
Public Attributes | |
bool | Active |
int32_t | Tool |
int32_t | SelectedTool |
int32_t | Grade |
bool | ModeIFT |
char | Material [C4M_MaxName+1] |
char | Texture [C4M_MaxName+1] |
bool | ModeBack |
char | BackMaterial [C4M_MaxName+1] |
char | BackTexture [C4M_MaxName+1] |
Protected Member Functions | |
void | AssertValidTexture () |
void | AssertValidBackTexture () |
void | LoadBitmaps () |
void | EnableControls () |
void | UpdateIFTControls () |
void | InitGradeCtrl () |
void | InitMaterialCtrls () |
void | UpdateToolCtrls () |
void | UpdateTextures () |
void | SetColorPattern (const char *szMaterial, const char *szTexture) |
Friends | |
class | C4ConsoleGUI |
Definition at line 42 of file C4ToolsDlg.h.
C4ToolsDlg::C4ToolsDlg | ( | ) |
C4ToolsDlg::~C4ToolsDlg | ( | ) |
|
protected |
Definition at line 236 of file C4ToolsDlg.cpp.
References BackMaterial, BackTexture, C4TLS_MatSky, C4TextureMap::GetIndex(), C4Landscape::GetMode(), C4TextureMap::GetTexture(), Landscape, ModeBack, SelectBackTexture(), SEqual(), Static, and TextureMap.
Referenced by SetBackMaterial().
|
protected |
Definition at line 216 of file C4ToolsDlg.cpp.
References C4TLS_MatSky, C4TextureMap::GetIndex(), C4Landscape::GetMode(), C4TextureMap::GetTexture(), Landscape, Material, SelectTexture(), SEqual(), Static, Texture, and TextureMap.
Referenced by SetMaterial().
bool C4ToolsDlg::ChangeGrade | ( | int32_t | iChange | ) |
Definition at line 173 of file C4ToolsDlg.cpp.
References C4TLS_GradeMax, C4TLS_GradeMin, Clamp(), Grade, InitGradeCtrl(), and NeedPreviewUpdate().
Referenced by C4Game::InitKeyboard().
void C4ToolsDlg::Clear | ( | ) |
Definition at line 41 of file C4ConsoleGUICommon.h.
References Clear(), Console, and C4ConsoleGUI::ToolsDlgClose().
Referenced by Clear(), and C4Console::Clear().
void C4ToolsDlg::Default | ( | ) |
Definition at line 48 of file C4ConsoleGUICommon.h.
References Active, BackMaterial, BackTexture, C4TLS_Brush, C4TLS_GradeDefault, C4ToolsDlg::State::Default(), Grade, Material, ModeBack, ModeIFT, SCopy(), SelectedTool, Texture, and Tool.
Referenced by C4Console::Default().
|
protected |
Definition at line 700 of file C4Console.cpp.
Referenced by Open(), SetBackMaterial(), SetLandscapeMode(), and SetMaterial().
|
protected |
Definition at line 701 of file C4Console.cpp.
Referenced by ChangeGrade(), and Open().
|
protected |
Definition at line 52 of file C4ToolsDlg.cpp.
References Console, C4ConsoleGUI::ToolsDlgInitMaterialCtrls(), and UpdateTextures().
Referenced by Open().
|
inline |
Definition at line 81 of file C4ToolsDlg.h.
References C4TLS_Brush, C4TLS_Fill, C4TLS_Line, and Tool.
Referenced by C4EditCursor::Draw().
|
protected |
void C4ToolsDlg::NeedPreviewUpdate | ( | ) |
Definition at line 702 of file C4Console.cpp.
Referenced by ChangeGrade(), SetGrade(), SetIFT(), SetMaterial(), SetTexture(), and SetTool().
bool C4ToolsDlg::Open | ( | ) |
Definition at line 28 of file C4ToolsDlg.cpp.
References Active, Console, EnableControls(), InitGradeCtrl(), InitMaterialCtrls(), C4ConsoleGUI::ToolsDlgOpen(), UpdateIFTControls(), UpdateLandscapeModeCtrls(), and UpdateToolCtrls().
Referenced by C4EditCursor::OpenPropTools().
bool C4ToolsDlg::PopMaterial | ( | ) |
Definition at line 703 of file C4Console.cpp.
Referenced by C4Game::InitKeyboard().
bool C4ToolsDlg::PopTextures | ( | ) |
Definition at line 704 of file C4Console.cpp.
Referenced by C4Game::InitKeyboard().
void C4ToolsDlg::ResetAlternateTool | ( | ) |
Definition at line 290 of file C4ToolsDlg.cpp.
References SelectedTool, and SetTool().
Referenced by C4EditCursor::AltUp().
bool C4ToolsDlg::SelectBackMaterial | ( | const char * | szMaterial, |
bool | by_console_gui = false |
||
) |
Definition at line 277 of file C4ToolsDlg.cpp.
References Console, SetBackMaterial(), and C4ConsoleGUI::ToolsDlgSelectBackMaterial().
Referenced by C4EditCursor::ApplyToolPicker(), SetMaterial(), and SetTexture().
bool C4ToolsDlg::SelectBackTexture | ( | const char * | szTexture, |
bool | by_console_gui = false |
||
) |
Definition at line 270 of file C4ToolsDlg.cpp.
References Console, SetBackTexture(), and C4ConsoleGUI::ToolsDlgSelectBackTexture().
Referenced by C4EditCursor::ApplyToolPicker(), AssertValidBackTexture(), and SetTexture().
bool C4ToolsDlg::SelectMaterial | ( | const char * | szMaterial, |
bool | by_console_gui = false |
||
) |
Definition at line 263 of file C4ToolsDlg.cpp.
References Console, SetMaterial(), and C4ConsoleGUI::ToolsDlgSelectMaterial().
Referenced by C4EditCursor::ApplyToolPicker().
bool C4ToolsDlg::SelectTexture | ( | const char * | szTexture, |
bool | by_console_gui = false |
||
) |
Definition at line 256 of file C4ToolsDlg.cpp.
References Console, SetTexture(), and C4ConsoleGUI::ToolsDlgSelectTexture().
Referenced by C4EditCursor::ApplyToolPicker(), and AssertValidTexture().
void C4ToolsDlg::SetAlternateTool | ( | ) |
Definition at line 284 of file C4ToolsDlg.cpp.
References C4TLS_Picker, and SetTool().
Referenced by C4EditCursor::AltDown().
void C4ToolsDlg::SetBackMaterial | ( | const char * | szMaterial | ) |
Definition at line 106 of file C4ToolsDlg.cpp.
References AssertValidBackTexture(), BackMaterial, C4M_MaxName, EnableControls(), C4Landscape::GetMode(), Landscape, ModeBack, SCopy(), Static, and UpdateTextures().
Referenced by SelectBackMaterial().
void C4ToolsDlg::SetBackTexture | ( | const char * | szTexture | ) |
Definition at line 116 of file C4ToolsDlg.cpp.
References BackTexture, C4M_MaxName, Console, C4TextureMap::GetTexture(), ModeBack, SCopy(), TextureMap, and C4ConsoleGUI::ToolsDlgSelectBackTexture().
Referenced by SelectBackTexture().
|
protected |
Definition at line 162 of file C4ToolsDlg.cpp.
bool C4ToolsDlg::SetGrade | ( | int32_t | iGrade | ) |
Definition at line 166 of file C4ToolsDlg.cpp.
References C4TLS_GradeMax, C4TLS_GradeMin, Clamp(), Grade, and NeedPreviewUpdate().
bool C4ToolsDlg::SetIFT | ( | bool | fIFT | ) |
Definition at line 131 of file C4ToolsDlg.cpp.
References BackMaterial, BackTexture, C4M_MaxName, C4TLS_MatSky, C4TextureMap::DefaultBkgMatTex(), C4TextureMap::GetEntry(), C4TextureMap::GetIndexMatTex(), C4TexMapEntry::GetMaterialName(), C4TexMapEntry::GetTextureName(), Material, ModeBack, ModeIFT, NeedPreviewUpdate(), SCopy(), TextureMap, and UpdateIFTControls().
Referenced by C4EditCursor::ApplyToolPicker(), and ToggleIFT().
bool C4ToolsDlg::SetLandscapeMode | ( | LandscapeMode | iMode, |
bool | flat_chunk_shapes, | ||
bool | fThroughControl = false |
||
) |
Definition at line 181 of file C4ToolsDlg.cpp.
References C4Game::C4S, C4TLS_Brush, C4TLS_Fill, CDT_Decide, CID_EMDrawTool, Console, Control, C4GameControl::DoInput(), EMDT_SetMode, EnableControls(), Exact, C4SLandscape::FlatChunkShapes, Game, C4Landscape::GetMode(), Landscape, C4Scenario::Landscape, LoadResStr(), C4Landscape::MapToLandscape(), C4Console::Message(), SelectedTool, C4Landscape::SetMode(), SetTool(), Static, UpdateLandscapeModeCtrls(), and UpdateTextures().
void C4ToolsDlg::SetMaterial | ( | const char * | szMaterial | ) |
Definition at line 60 of file C4ToolsDlg.cpp.
References AssertValidTexture(), C4M_MaxName, C4TLS_MatSky, EnableControls(), C4Landscape::GetMode(), Landscape, Material, ModeBack, NeedPreviewUpdate(), SCopy(), SelectBackMaterial(), SEqual(), Static, and UpdateTextures().
Referenced by SelectMaterial().
void C4ToolsDlg::SetTexture | ( | const char * | szTexture | ) |
Definition at line 71 of file C4ToolsDlg.cpp.
References BackMaterial, C4M_MaxName, C4TLS_MatSky, Console, C4MaterialCore::Density, DensitySemiSolid(), C4MaterialMap::Get(), C4TextureMap::GetTexture(), C4MaterialMap::Map, Material, MaterialMap, MNone, NeedPreviewUpdate(), SCopy(), SelectBackMaterial(), SelectBackTexture(), SEqual(), Texture, TextureMap, and C4ConsoleGUI::ToolsDlgSelectTexture().
Referenced by SelectTexture().
bool C4ToolsDlg::SetTool | ( | int32_t | iTool, |
bool | fTemp | ||
) |
Definition at line 43 of file C4ToolsDlg.cpp.
References NeedPreviewUpdate(), SelectedTool, Tool, and UpdateToolCtrls().
Referenced by ResetAlternateTool(), SetAlternateTool(), SetLandscapeMode(), and ToggleTool().
|
inline |
Definition at line 74 of file C4ToolsDlg.h.
References ModeIFT, and SetIFT().
Referenced by C4Game::InitKeyboard().
|
inline |
Definition at line 71 of file C4ToolsDlg.h.
References SetTool(), and Tool.
Referenced by C4Game::InitKeyboard().
|
protected |
Definition at line 705 of file C4Console.cpp.
Referenced by Open(), and SetIFT().
void C4ToolsDlg::UpdateLandscapeModeCtrls | ( | ) |
Definition at line 706 of file C4Console.cpp.
Referenced by Open(), and SetLandscapeMode().
|
protected |
Definition at line 707 of file C4Console.cpp.
Referenced by InitMaterialCtrls(), SetBackMaterial(), SetLandscapeMode(), and SetMaterial().
|
protected |
Definition at line 708 of file C4Console.cpp.
Referenced by Open(), and SetTool().
|
friend |
Definition at line 44 of file C4ToolsDlg.h.
bool C4ToolsDlg::Active |
Definition at line 52 of file C4ToolsDlg.h.
char C4ToolsDlg::BackMaterial[C4M_MaxName+1] |
Definition at line 59 of file C4ToolsDlg.h.
Referenced by C4EditCursor::ApplyToolBrush(), C4EditCursor::ApplyToolLine(), C4EditCursor::ApplyToolRect(), AssertValidBackTexture(), Default(), SetBackMaterial(), SetIFT(), and SetTexture().
char C4ToolsDlg::BackTexture[C4M_MaxName+1] |
Definition at line 60 of file C4ToolsDlg.h.
Referenced by C4EditCursor::ApplyToolBrush(), C4EditCursor::ApplyToolLine(), C4EditCursor::ApplyToolRect(), AssertValidBackTexture(), Default(), SetBackTexture(), and SetIFT().
int32_t C4ToolsDlg::Grade |
Definition at line 54 of file C4ToolsDlg.h.
Referenced by C4EditCursor::ApplyToolBrush(), C4EditCursor::ApplyToolFill(), C4EditCursor::ApplyToolLine(), C4EditCursor::ApplyToolRect(), ChangeGrade(), Default(), C4EditCursor::Draw(), and SetGrade().
char C4ToolsDlg::Material[C4M_MaxName+1] |
Definition at line 56 of file C4ToolsDlg.h.
Referenced by C4EditCursor::ApplyToolBrush(), C4EditCursor::ApplyToolFill(), C4EditCursor::ApplyToolLine(), C4EditCursor::ApplyToolRect(), AssertValidTexture(), Default(), SetIFT(), SetMaterial(), SetTexture(), and C4EditCursor::ToolFailure().
bool C4ToolsDlg::ModeBack |
Definition at line 58 of file C4ToolsDlg.h.
Referenced by C4EditCursor::ApplyToolPicker(), AssertValidBackTexture(), C4ToolsDlg::State::Default(), Default(), SetBackMaterial(), SetBackTexture(), SetIFT(), and SetMaterial().
bool C4ToolsDlg::ModeIFT |
Definition at line 55 of file C4ToolsDlg.h.
Referenced by Default(), SetIFT(), and ToggleIFT().
int32_t C4ToolsDlg::SelectedTool |
Definition at line 53 of file C4ToolsDlg.h.
Referenced by Default(), ResetAlternateTool(), SetLandscapeMode(), and SetTool().
char C4ToolsDlg::Texture[C4M_MaxName+1] |
Definition at line 57 of file C4ToolsDlg.h.
Referenced by C4EditCursor::ApplyToolBrush(), C4EditCursor::ApplyToolLine(), C4EditCursor::ApplyToolRect(), AssertValidTexture(), Default(), SetTexture(), and C4EditCursor::ToolFailure().
int32_t C4ToolsDlg::Tool |
Definition at line 53 of file C4ToolsDlg.h.
Referenced by Default(), C4EditCursor::Execute(), IsGradedTool(), C4EditCursor::LeftButtonDown(), C4EditCursor::LeftButtonUp(), C4EditCursor::Move(), SetTool(), and ToggleTool().