From f8f4770c60aca19d791788fca1d6c97568b69390 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 6 Oct 2024 22:23:10 +0200 Subject: [PATCH] texture:: raw_texture_opacity parameter --- config.cpp | 4 ++++ textures.cpp | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/config.cpp b/config.cpp index 24e37174..727b78b5 100644 --- a/config.cpp +++ b/config.cpp @@ -1524,6 +1524,10 @@ EX void initConfig() { #if CAP_TEXTURE param_b(texture::texture_aura, "texture-aura", false); + + param_i(texture::raw_texture_opacity, "raw_texture_opacity", 32) + ->editable(0, 255, 16, "raw texture opacity", "", 'R') + ->set_sets([] { dialog::bound_low(0); dialog::bound_up(255); }); #endif param_f(vid.smart_range_detail, "smart-range-detail", 8) diff --git a/textures.cpp b/textures.cpp index 0584a58c..fa7f7bb7 100644 --- a/textures.cpp +++ b/textures.cpp @@ -686,12 +686,14 @@ bool newmove = false; vector rtver(4); +EX int raw_texture_opacity = 32; + void texture_config::drawRawTexture() { glflush(); current_display->next_shader_flags = GF_TEXTURE; dynamicval m(pmodel, mdPixel); current_display->set_all(0, 0); - glhr::color2(0xFFFFFF20); + glhr::color2(0xFFFFFF00 + raw_texture_opacity); glBindTexture(GL_TEXTURE_2D, config.data.textureid); for(int i=0; i<4; i++) { int cx[4] = {2, -2, -2, 2}; @@ -1377,6 +1379,9 @@ EX void showMenu() { dialog::add_action([] { dialog::openColorDialog(config.slave_color, NULL); }); dialog::addBreak(50); + + if(texture::config.tstate == texture::tsAdjusting) + add_edit(raw_texture_opacity); #if CAP_SHOT dialog::addItem(XLAT("save the raw texture"), 'S');