Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
GUI_AngelScriptExamples.h
Go to the documentation of this file.
1/*
2 This source file is part of Rigs of Rods
3 Copyright 2021 tritonas00
4 For more information, see http://www.rigsofrods.org/
5 Rigs of Rods is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License version 3, as
7 published by the Free Software Foundation.
8 Rigs of Rods is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
14*/
15
17
18#pragma once
19
20#include "Application.h"
21#include "GUI_ConsoleView.h"
22
23
24namespace RoR {
25
27{
28public:
29 void Draw();
30private:
31 void DrawRowSlider(const char* nameStr, std::string codeStr, const char* descStr, float min, float max, float &var_ref);
32 void DrawRowText(const char* nameStr, std::string codeStr, const char* descStr);
33 void DrawRowCheckbox(const char* nameStr, std::string codeStr, const char* descStr, bool &var_ref, const char* label);
34 void DrawRowInt(const char* nameStr, std::string codeStr, const char* descStr, int &var_ref);
35 void DrawRowIntCheckbox(const char* nameStr, std::string codeStr, const char* descStr, int &var_ref, bool &on, const char* label);
36 void DrawRowIntNode(const char* nameStr, std::string codeStr, const char* descStr, int &var_ref, int &node_x, int &node_y, int &node_z);
37
38 void ExecuteString(std::string const& code);
39
40 float scale = 1.f;
41 float mass = 1000.f;
42 bool reset = false;
43 bool locked = false;
44 int light = 1;
45 int blink = 1;
46 int node = 1;
47 bool visible = false;
48 int custom_light = 1;
49};
50
51} // namespace RoR
Central state/object manager and communications hub.
Generic console rendering.
void DrawRowSlider(const char *nameStr, std::string codeStr, const char *descStr, float min, float max, float &var_ref)
void DrawRowInt(const char *nameStr, std::string codeStr, const char *descStr, int &var_ref)
void ExecuteString(std::string const &code)
Runs code using 'as' console command.
void DrawRowIntNode(const char *nameStr, std::string codeStr, const char *descStr, int &var_ref, int &node_x, int &node_y, int &node_z)
void DrawRowText(const char *nameStr, std::string codeStr, const char *descStr)
void DrawRowCheckbox(const char *nameStr, std::string codeStr, const char *descStr, bool &var_ref, const char *label)
void DrawRowIntCheckbox(const char *nameStr, std::string codeStr, const char *descStr, int &var_ref, bool &on, const char *label)