- [FIX] Ja eix correctament del editor
- [NEW] Més gràfics - [NEW] Ara es pot modificar el valor dels camps escribint el numero
This commit is contained in:
@@ -16,8 +16,6 @@ namespace modules
|
||||
std::vector<std::string> gifs;
|
||||
int treeview_scroll = 0;
|
||||
|
||||
int *current_field = nullptr;
|
||||
|
||||
void init()
|
||||
{
|
||||
actor::clear(true);
|
||||
@@ -63,18 +61,11 @@ namespace modules
|
||||
const bool btn_small(const int x, const int y, int &var, int min, int max)
|
||||
{
|
||||
char buffer[100];
|
||||
if (current_field == &var) {
|
||||
ui::selected(false);
|
||||
} else {
|
||||
ui::selected(true);
|
||||
}
|
||||
const char *result=ui::spin(SDL_itoa(var, buffer, 10), x, y, 17, 11);
|
||||
ui::selected(false);
|
||||
if (result)
|
||||
{
|
||||
const int value = SDL_atoi(result);
|
||||
var=SDL_max(min, SDL_min(max, value));
|
||||
current_field = &var;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -338,7 +329,7 @@ namespace modules
|
||||
|
||||
|
||||
|
||||
|
||||
ui::start();
|
||||
|
||||
actor::actor_t *act = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user