aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods/testtools/textures
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2020-05-26 00:17:52 +0200
committerGitHub <noreply@github.com>2020-05-26 00:17:52 +0200
commit083b285f4319c470f307f0b52f03a2fb68facd38 (patch)
treebdd02540ad58756a38606f03a995ab837a176709 /games/devtest/mods/testtools/textures
parentb546e8938d41aa9e3101fb9d4d5b02924ed73b60 (diff)
downloadminetest-083b285f4319c470f307f0b52f03a2fb68facd38.tar.gz
minetest-083b285f4319c470f307f0b52f03a2fb68facd38.tar.bz2
minetest-083b285f4319c470f307f0b52f03a2fb68facd38.zip
Rename “Minimal development test” to “Development Test” (#9928)
Diffstat (limited to 'games/devtest/mods/testtools/textures')
-rw-r--r--games/devtest/mods/testtools/textures/testtools_entity_rotator.pngbin0 -> 151 bytes
-rw-r--r--games/devtest/mods/testtools/textures/testtools_entity_scaler.pngbin0 -> 182 bytes
-rw-r--r--games/devtest/mods/testtools/textures/testtools_entity_spawner.pngbin0 -> 189 bytes
-rw-r--r--games/devtest/mods/testtools/textures/testtools_falling_node_tool.pngbin0 -> 140 bytes
-rw-r--r--games/devtest/mods/testtools/textures/testtools_node_setter.pngbin0 -> 146 bytes
-rw-r--r--games/devtest/mods/testtools/textures/testtools_object_attacher.pngbin0 -> 173 bytes
-rw-r--r--games/devtest/mods/testtools/textures/testtools_object_editor.pngbin0 -> 180 bytes
-rw-r--r--games/devtest/mods/testtools/textures/testtools_object_mover.pngbin0 -> 175 bytes
-rw-r--r--games/devtest/mods/testtools/textures/testtools_param2tool.pngbin0 -> 127 bytes
-rw-r--r--games/devtest/mods/testtools/textures/testtools_remover.pngbin0 -> 129 bytes
10 files changed, 0 insertions, 0 deletions
diff --git a/games/devtest/mods/testtools/textures/testtools_entity_rotator.png b/games/devtest/mods/testtools/textures/testtools_entity_rotator.png
new file mode 100644
index 000000000..17ebb2d35
--- /dev/null
+++ b/games/devtest/mods/testtools/textures/testtools_entity_rotator.png
Binary files differ
diff --git a/games/devtest/mods/testtools/textures/testtools_entity_scaler.png b/games/devtest/mods/testtools/textures/testtools_entity_scaler.png
new file mode 100644
index 000000000..4909c25b0
--- /dev/null
+++ b/games/devtest/mods/testtools/textures/testtools_entity_scaler.png
Binary files differ
diff --git a/games/devtest/mods/testtools/textures/testtools_entity_spawner.png b/games/devtest/mods/testtools/textures/testtools_entity_spawner.png
new file mode 100644
index 000000000..6199e0145
--- /dev/null
+++ b/games/devtest/mods/testtools/textures/testtools_entity_spawner.png
Binary files differ
diff --git a/games/devtest/mods/testtools/textures/testtools_falling_node_tool.png b/games/devtest/mods/testtools/textures/testtools_falling_node_tool.png
new file mode 100644
index 000000000..30099a7ef
--- /dev/null
+++ b/games/devtest/mods/testtools/textures/testtools_falling_node_tool.png
Binary files differ
diff --git a/games/devtest/mods/testtools/textures/testtools_node_setter.png b/games/devtest/mods/testtools/textures/testtools_node_setter.png
new file mode 100644
index 000000000..8599438de
--- /dev/null
+++ b/games/devtest/mods/testtools/textures/testtools_node_setter.png
Binary files differ
diff --git a/games/devtest/mods/testtools/textures/testtools_object_attacher.png b/games/devtest/mods/testtools/textures/testtools_object_attacher.png
new file mode 100644
index 000000000..4d9bf6fd1
--- /dev/null
+++ b/games/devtest/mods/testtools/textures/testtools_object_attacher.png
Binary files differ
diff --git a/games/devtest/mods/testtools/textures/testtools_object_editor.png b/games/devtest/mods/testtools/textures/testtools_object_editor.png
new file mode 100644
index 000000000..d1ce9cecd
--- /dev/null
+++ b/games/devtest/mods/testtools/textures/testtools_object_editor.png
Binary files differ
diff --git a/games/devtest/mods/testtools/textures/testtools_object_mover.png b/games/devtest/mods/testtools/textures/testtools_object_mover.png
new file mode 100644
index 000000000..8b14e9fb2
--- /dev/null
+++ b/games/devtest/mods/testtools/textures/testtools_object_mover.png
Binary files differ
diff --git a/games/devtest/mods/testtools/textures/testtools_param2tool.png b/games/devtest/mods/testtools/textures/testtools_param2tool.png
new file mode 100644
index 000000000..dbc663575
--- /dev/null
+++ b/games/devtest/mods/testtools/textures/testtools_param2tool.png
Binary files differ
diff --git a/games/devtest/mods/testtools/textures/testtools_remover.png b/games/devtest/mods/testtools/textures/testtools_remover.png
new file mode 100644
index 000000000..73f14cd54
--- /dev/null
+++ b/games/devtest/mods/testtools/textures/testtools_remover.png
Binary files differ
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476
/*
Minetest
Copyright (C) 2019 rubenwardy

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "client/tile.h" // ITextureSource
#include "client/fontengine.h"
#include "debug.h"
#include "irrlichttypes_extrabloated.h"
#include "util/string.h"
#include <algorithm>
#include <array>
#include <vector>

#pragma once

class StyleSpec
{
public:
	enum Property
	{
		TEXTCOLOR,
		BGCOLOR,
		BGCOLOR_HOVERED, // Note: Deprecated property
		BGCOLOR_PRESSED, // Note: Deprecated property
		NOCLIP,
		BORDER,
		BGIMG,
		BGIMG_HOVERED, // Note: Deprecated property
		BGIMG_MIDDLE,
		BGIMG_PRESSED, // Note: Deprecated property
		FGIMG,
		FGIMG_HOVERED, // Note: Deprecated property
		FGIMG_PRESSED, // Note: Deprecated property
		ALPHA,
		CONTENT_OFFSET,
		PADDING,
		FONT,
		FONT_SIZE,
		COLORS,
		BORDERCOLORS,
		BORDERWIDTHS,
		SOUND,
		SPACING,
		SIZE,
		NUM_PROPERTIES,
		NONE
	};
	enum State
	{
		STATE_DEFAULT = 0,
		STATE_HOVERED = 1 << 0,
		STATE_PRESSED = 1 << 1,
		NUM_STATES = 1 << 2,
		STATE_INVALID = 1 << 3,
	};

private:
	std::array<bool, NUM_PROPERTIES> property_set{};
	std::array<std::string, NUM_PROPERTIES> properties;
	State state_map = STATE_DEFAULT;

public:
	static Property GetPropertyByName(const std::string &name)
	{
		if (name == "textcolor") {
			return TEXTCOLOR;
		} else if (name == "bgcolor") {
			return BGCOLOR;
		} else if (name == "bgcolor_hovered") {
			return BGCOLOR_HOVERED;
		} else if (name == "bgcolor_pressed") {
			return BGCOLOR_PRESSED;
		} else if (name == "noclip") {
			return NOCLIP;
		} else if (name == "border") {
			return BORDER;
		} else if (name == "bgimg") {
			return BGIMG;
		} else if (name == "bgimg_hovered") {
			return BGIMG_HOVERED;
		} else if (name == "bgimg_middle") {
			return BGIMG_MIDDLE;
		} else if (name == "bgimg_pressed") {
			return BGIMG_PRESSED;
		} else if (name == "fgimg") {
			return FGIMG;
		} else if (name == "fgimg_hovered") {
			return FGIMG_HOVERED;
		} else if (name == "fgimg_pressed") {
			return FGIMG_PRESSED;
		} else if (name == "alpha") {
			return ALPHA;
		} else if (name == "content_offset") {
			return CONTENT_OFFSET;
		} else if (name == "padding") {
			return PADDING;
		} else if (name == "font") {
			return FONT;
		} else if (name == "font_size") {
			return FONT_SIZE;
		} else if (name == "colors") {
			return COLORS;
		} else if (name == "bordercolors") {
			return BORDERCOLORS;