1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-10-18 06:30:41 +00:00

texture:: raw_texture_opacity parameter

This commit is contained in:
Zeno Rogue 2024-10-06 22:23:10 +02:00
parent bcb1732433
commit f8f4770c60
2 changed files with 10 additions and 1 deletions

View File

@ -1524,6 +1524,10 @@ EX void initConfig() {
#if CAP_TEXTURE #if CAP_TEXTURE
param_b(texture::texture_aura, "texture-aura", false); 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 #endif
param_f(vid.smart_range_detail, "smart-range-detail", 8) param_f(vid.smart_range_detail, "smart-range-detail", 8)

View File

@ -686,12 +686,14 @@ bool newmove = false;
vector<glhr::textured_vertex> rtver(4); vector<glhr::textured_vertex> rtver(4);
EX int raw_texture_opacity = 32;
void texture_config::drawRawTexture() { void texture_config::drawRawTexture() {
glflush(); glflush();
current_display->next_shader_flags = GF_TEXTURE; current_display->next_shader_flags = GF_TEXTURE;
dynamicval<eModel> m(pmodel, mdPixel); dynamicval<eModel> m(pmodel, mdPixel);
current_display->set_all(0, 0); current_display->set_all(0, 0);
glhr::color2(0xFFFFFF20); glhr::color2(0xFFFFFF00 + raw_texture_opacity);
glBindTexture(GL_TEXTURE_2D, config.data.textureid); glBindTexture(GL_TEXTURE_2D, config.data.textureid);
for(int i=0; i<4; i++) { for(int i=0; i<4; i++) {
int cx[4] = {2, -2, -2, 2}; int cx[4] = {2, -2, -2, 2};
@ -1377,6 +1379,9 @@ EX void showMenu() {
dialog::add_action([] { dialog::openColorDialog(config.slave_color, NULL); }); dialog::add_action([] { dialog::openColorDialog(config.slave_color, NULL); });
dialog::addBreak(50); dialog::addBreak(50);
if(texture::config.tstate == texture::tsAdjusting)
add_edit(raw_texture_opacity);
#if CAP_SHOT #if CAP_SHOT
dialog::addItem(XLAT("save the raw texture"), 'S'); dialog::addItem(XLAT("save the raw texture"), 'S');