Add TileTool::WorldEditorEnabledByDefault

This commit is contained in:
2025-03-19 02:41:30 -04:00
parent e912645a24
commit b2e4732b14
2 changed files with 8 additions and 1 deletions

View File

@@ -28,8 +28,11 @@ namespace CaveGame::Client {
X
};
class TileTool : public JUI::Window
{
static const bool WorldEditorEnabledByDefault = false;
public:
Event<float> BrushSizeChanged;
Event<float> BrushPercentChanged;

View File

@@ -51,6 +51,7 @@ CaveGame::Client::TileTool::TileTool(JUI::Widget *parent) : JUI::Window(parent)
BrushSizeChanged(newval);
};
brush_size_slider->CurrentValue(0.5f);
brush_size_slider->SetClicked(false);
brush_percent_slider = new Slider(right_row_layout);
@@ -65,7 +66,7 @@ CaveGame::Client::TileTool::TileTool(JUI::Widget *parent) : JUI::Window(parent)
BrushPercentChanged(newval);
};
brush_percent_slider->CurrentValue(1.f);
brush_percent_slider->SetClicked(false);
auto* tile_sim_checkbox = new Checkbox(right_row_layout);
@@ -107,6 +108,9 @@ CaveGame::Client::TileTool::TileTool(JUI::Widget *parent) : JUI::Window(parent)
BrushPercentChanged += [this] (float value) {
brush_density = value;
};
Enable(WorldEditorEnabledByDefault);
}
void CaveGame::Client::TileTool::BrushRadius(float size) {