RigsofRods
Soft-body Physics Simulation
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 
24 namespace RoR {
25 
27 {
28 public:
29  void Draw();
30 private:
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
RoR::AngelScriptExamples::DrawRowText
void DrawRowText(const char *nameStr, std::string codeStr, const char *descStr)
Definition: GUI_AngelScriptExamples.cpp:74
RoR::AngelScriptExamples::ExecuteString
void ExecuteString(std::string const &code)
Runs code using 'as' console command.
Definition: GUI_AngelScriptExamples.cpp:153
RoR::AngelScriptExamples::DrawRowCheckbox
void DrawRowCheckbox(const char *nameStr, std::string codeStr, const char *descStr, bool &var_ref, const char *label)
Definition: GUI_AngelScriptExamples.cpp:87
GUI_ConsoleView.h
Generic console rendering.
RoR::AngelScriptExamples::DrawRowIntNode
void DrawRowIntNode(const char *nameStr, std::string codeStr, const char *descStr, int &var_ref, int &node_x, int &node_y, int &node_z)
Definition: GUI_AngelScriptExamples.cpp:117
RoR::AngelScriptExamples::light
int light
Definition: GUI_AngelScriptExamples.h:44
RoR::AngelScriptExamples::scale
float scale
Definition: GUI_AngelScriptExamples.h:40
RoR::AngelScriptExamples::visible
bool visible
Definition: GUI_AngelScriptExamples.h:47
RoR::AngelScriptExamples::DrawRowInt
void DrawRowInt(const char *nameStr, std::string codeStr, const char *descStr, int &var_ref)
Definition: GUI_AngelScriptExamples.cpp:100
RoR::AngelScriptExamples::blink
int blink
Definition: GUI_AngelScriptExamples.h:45
RoR::AngelScriptExamples::reset
bool reset
Definition: GUI_AngelScriptExamples.h:42
RoR::AngelScriptExamples::Draw
void Draw()
Definition: GUI_AngelScriptExamples.cpp:22
Application.h
Central state/object manager and communications hub.
RoR::AngelScriptExamples::mass
float mass
Definition: GUI_AngelScriptExamples.h:41
RoR::AngelScriptExamples::custom_light
int custom_light
Definition: GUI_AngelScriptExamples.h:48
RoR::AngelScriptExamples::locked
bool locked
Definition: GUI_AngelScriptExamples.h:43
RoR::AngelScriptExamples::DrawRowIntCheckbox
void DrawRowIntCheckbox(const char *nameStr, std::string codeStr, const char *descStr, int &var_ref, bool &on, const char *label)
Definition: GUI_AngelScriptExamples.cpp:134
RoR::AngelScriptExamples
Definition: GUI_AngelScriptExamples.h:26
RoR::AngelScriptExamples::node
int node
Definition: GUI_AngelScriptExamples.h:46
RoR::AngelScriptExamples::DrawRowSlider
void DrawRowSlider(const char *nameStr, std::string codeStr, const char *descStr, float min, float max, float &var_ref)
Definition: GUI_AngelScriptExamples.cpp:57
RoR
Definition: AppContext.h:36