Skip to content

Commit

Permalink
noggit: ui: texturing_tool: add pressure and hardness keybinds for th…
Browse files Browse the repository at this point in the history
…e swap brush
  • Loading branch information
Adspartan committed Nov 22, 2024
1 parent 905d2a7 commit 33c1518
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/noggit/ui/Help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,11 @@ namespace noggit
swapper_label->setStyleSheet(header_style);
texture_layout->addRow(swapper_label);

generate_hotkey_row({ font_noggit::shift, font_noggit::lmb }, "\a+\a - Swap texture", texture_layout);
generate_hotkey_row({ font_noggit::alt, font_noggit::lmb_drag }, "\a+\a - Change radius", texture_layout);
generate_hotkey_row({ font_noggit::t }, "\a - Toggle brush swapper", texture_layout);
generate_hotkey_row({ font_noggit::shift, font_noggit::lmb }, "\a+\a - Swap texture", texture_layout);
generate_hotkey_row({ font_noggit::alt, font_noggit::lmb_drag }, "\a+\a - Change radius", texture_layout);
generate_hotkey_row({ font_noggit::alt, font_noggit::rmb_drag }, "\a+\a - Change hardness", texture_layout);
generate_hotkey_row({ font_noggit::space, font_noggit::lmb_drag }, "\a+\a - Change pressure", texture_layout);
generate_hotkey_row({ font_noggit::t }, "\a - Toggle brush swapper", texture_layout);

auto anim_label = new QLabel("Anim:");
anim_label->setStyleSheet(header_style);
Expand Down
8 changes: 8 additions & 0 deletions src/noggit/ui/texturing_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@ namespace noggit
{
_hardness.change(change);
}
else if (_texturing_mode == texturing_mode::swap)
{
_texture_switcher->change_hardness(change);
}
}

void texturing_tool::change_pressure(float change)
Expand All @@ -310,6 +314,10 @@ namespace noggit
{
_pressure.change(change);
}
else if (_texturing_mode == texturing_mode::swap)
{
_texture_switcher->change_pressure(change);
}
}

void texturing_tool::change_brush_level(float change)
Expand Down

0 comments on commit 33c1518

Please sign in to comment.