mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-03 13:10:23 +01:00
feat(editor): icons over the 3d view: the tools of the field of work along its left edge (the edit modes of the surroundings, the track tools, the road tools with the lanes, the terrain tools with the orthophoto), the modes of the gizmo at its top, the axes of the world as the camera sees them in its top right corner, a click on one looking along it, with the top view under them; the icons drawn by editor/icons/editor_icons.py into a png which CMake writes out as an array built into the executable; the gizmo modes and the top view left out of the toolbar; Polish translation
This commit is contained in:
61
editor/editorIcons.hpp
Normal file
61
editor/editorIcons.hpp
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
This Source Code Form is subject to the
|
||||
terms of the Mozilla Public License, v.
|
||||
2.0. If a copy of the MPL was not
|
||||
distributed with this file, You can
|
||||
obtain one at
|
||||
http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "imgui/imgui.h"
|
||||
|
||||
// icons of the scenery editor. they're drawn by editor/icons/editor_icons.py into editor_icons.png, which CMake writes out
|
||||
// as the bytes of an array built into the executable, so they're there without any file of the simulator
|
||||
namespace editor_icons
|
||||
{
|
||||
|
||||
// in the order of the cells of editor_icons.png
|
||||
enum class icon
|
||||
{
|
||||
select,
|
||||
insert,
|
||||
brush,
|
||||
area_fill,
|
||||
copy_to_bank,
|
||||
translate,
|
||||
rotate,
|
||||
scale,
|
||||
local_space,
|
||||
ortho,
|
||||
perspective,
|
||||
sculpt,
|
||||
smooth,
|
||||
chunks,
|
||||
orthophoto,
|
||||
road,
|
||||
place,
|
||||
lanes,
|
||||
lay_track,
|
||||
turnout,
|
||||
straight,
|
||||
curve,
|
||||
signal,
|
||||
objects,
|
||||
vehicle,
|
||||
profile,
|
||||
speed,
|
||||
joints,
|
||||
infra,
|
||||
gauge,
|
||||
turntable,
|
||||
count
|
||||
};
|
||||
|
||||
// pixels of the side of an icon, at the scale of the user interface
|
||||
float size();
|
||||
// draws the icon in the colour given, centred on the point. returns: false if the renderer can't show images
|
||||
bool draw(ImDrawList *List, icon const Icon, ImVec2 const &Center, ImU32 const Color);
|
||||
|
||||
} // namespace editor_icons
|
||||
Reference in New Issue
Block a user