- Ja guarda l'habitació
This commit is contained in:
@@ -191,10 +191,10 @@ const bool btn_check(const int x, const int y, const char* label, uint16_t &flag
|
||||
return false;
|
||||
}
|
||||
|
||||
const bool btn_opt(const char* label, const int x, const int y, uint8_t &var, std::vector<uint8_t> values, std::vector<std::string> labels)
|
||||
const bool btn_opt(const char* label, const int x, const int y, uint8_t &var, std::vector<uint8_t> values, std::vector<std::string> labels, const int w=32)
|
||||
{
|
||||
//draw::print(label, x, y+3, 15, 0);
|
||||
ui::label(label, x, y, 32, 11);
|
||||
ui::label(label, x, y, w, 11);
|
||||
int result = 0;
|
||||
std::size_t pos = 0;
|
||||
while (pos<values.size())
|
||||
@@ -203,7 +203,7 @@ const bool btn_opt(const char* label, const int x, const int y, uint8_t &var, st
|
||||
pos++;
|
||||
}
|
||||
|
||||
result = ui::combo(labels[pos].c_str(), x+31, y, 65, 11);
|
||||
result = ui::combo(labels[pos].c_str(), x+31, y, 96-w, 11);
|
||||
if (result)
|
||||
{
|
||||
pos++; if (pos==values.size()) pos=0;
|
||||
@@ -449,8 +449,9 @@ switch (section)
|
||||
|
||||
ui::label("TEXTURES", 2, line, 96, 11, GRAY); line+=10;
|
||||
|
||||
ui::label("COLOR", 2, line, 64, 11);
|
||||
changed |= btn_small(64, line, room::editor::refColor(), 5, 11);
|
||||
changed |= btn_opt("COLOR", 2, line, room::editor::refColor(), {5, 6, 7, 8, 9, 10, 11}, {"BLUE", "RED", "PURPLE", "GREEN", "CYAN", "YELLOW", "WHITE"});
|
||||
//ui::label("COLOR", 2, line, 64, 11);
|
||||
//changed |= btn_small(64, line, room::editor::refColor(), 5, 11);
|
||||
line += 10;
|
||||
ui::label("FLOOR", 2, line, 64, 11);
|
||||
changed |= btn_small(64, line, room::editor::refFloorTex(), 0, 5);
|
||||
|
||||
Reference in New Issue
Block a user