mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 05:21:49 +00:00
Add GUI scale setting and volume contrast setting
GUI scale (#737): - add display.gui-scale setting (0 - auto, 1..4 - fixed integer scale) - auto mode picks the largest scale keeping at least 640x480 UI units - apply scale in GUI (root size, camera, cursor, tooltips, scissors) - HUD layout and ModelViewer use scaled coordinates - add GUI Scale trackbar to display settings Volume contrast (#399): - add audio.volume-contrast setting (100% - unchanged sounds, 0% - loud sounds are lowered to the level of quiet ones) - loudness (RMS) of a sound is calculated once and cached - add trackbar to audio settings and reset page
This commit is contained in:
parent
dacebf94bc
commit
708c276787
14 changed files with 158 additions and 17 deletions
|
|
@ -24,6 +24,7 @@ class DrawContext {
|
|||
BlendMode blendMode = BlendMode::normal;
|
||||
int scissorsCount = 0;
|
||||
float lineWidth = 1.0f;
|
||||
float uiScale = 1.0f;
|
||||
std::array<const Bindable*, advanced_pipeline::TARGETS_COUNT> textures {};
|
||||
public:
|
||||
DrawContext(
|
||||
|
|
@ -46,5 +47,9 @@ public:
|
|||
void setBlendMode(BlendMode mode);
|
||||
void setScissors(const glm::vec4& area);
|
||||
void setLineWidth(float width);
|
||||
|
||||
/// @brief Set scale of UI coordinates (UI units -> window pixels).
|
||||
/// Affects setScissors only
|
||||
void setUiScale(float scale);
|
||||
void useTexture(int target, const Bindable* texture);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue