RigsofRods
Soft-body Physics Simulation
|
#include <GUI_TopMenubar.h>
Public Member Functions | |
TopMenubar () | |
~TopMenubar () | |
void | Draw (float dt) |
bool | ShouldDisplay (ImVec2 window_pos) |
bool | IsVisible () |
void | FetchExternAiPresetsOnBackground () |
Initiate threaded (down)load of 'extern' waypoints from GitHub repo. More... | |
void | LoadBundledAiPresets (TerrainPtr terrain) |
Loads JSON files from [AI Presets] section in .terrn2 file format. More... | |
void | RefreshAiPresets () |
Refresh the list of presets, used for display. Needs to be called when terrain is loaded. More... | |
void | RefreshTuningMenu () |
Data Fields | |
const float | MENU_Y_OFFSET = 40.f |
const float | PANEL_HOVERBOX_HEIGHT = 50.f |
const ImVec4 | GRAY_HINT_TEXT = ImVec4(0.62f, 0.62f, 0.61f, 1.f) |
const ImVec4 | WHITE_TEXT = ImVec4(0.9f, 0.9f, 0.9f, 1.f) |
const ImVec4 | GREEN_TEXT = ImVec4(0.0f, 0.9f, 0.0f, 1.f) |
const ImVec4 | ORANGE_TEXT = ImVec4(0.9f, 0.6f, 0.0f, 1.f) |
const ImVec4 | RED_TEXT = ImVec4(1.00f, 0.00f, 0.00f, 1.f) |
const ImVec2 | MENU_HOVERBOX_PADDING = ImVec2(25.f, 10.f) |
const int | TUNING_SUBJECTID_USE_NAME = -2 |
std::vector< ai_events > | ai_waypoints |
int | ai_num = 1 |
int | ai_speed = 50 |
int | ai_times = 1 |
int | ai_altitude = 1000 |
int | ai_distance = 20 |
int | ai_position_scheme = 0 |
Ogre::String | ai_fname = "95bbUID-agoras.truck" |
Ogre::String | ai_dname = "Bus RVI Agora S" |
Ogre::String | ai_sectionconfig = "" |
std::string | ai_skin = "" |
bool | ai_select = false |
bool | ai_rec = false |
int | ai_mode = 0 |
bool | ai_menu = false |
bool | ai_select2 = false |
Ogre::String | ai_fname2 = "95bbUID-agoras.truck" |
Ogre::String | ai_dname2 = "Bus RVI Agora S" |
Ogre::String | ai_sectionconfig2 = "" |
std::string | ai_skin2 = "" |
int | ai_num_prev = 1 |
int | ai_speed_prev = 50 |
int | ai_position_scheme_prev = 0 |
int | ai_times_prev = 1 |
int | ai_mode_prev = 0 |
rapidjson::Document | ai_presets_all |
The full list of presets, used for display. Needs to be refreshed when terrain is loaded. More... | |
rapidjson::Document | ai_presets_extern |
Externally provided presets (GitHub repo or local 'savegames/waypoints.json' file). More... | |
bool | ai_presets_extern_fetching = false |
True if the (down)load of 'extern' waypoints is in progress. More... | |
std::string | ai_presets_extern_error |
Error message from the (down)load of 'extern' waypoints. More... | |
rapidjson::Document | ai_presets_bundled |
Presets bundled with the terrain, see [AI Presets] section in .terrn2 file format. More... | |
ActorPtr | tuning_actor |
Detecting actor change to update cached values. More... | |
std::vector< CacheEntryPtr > | tuning_addonparts |
Addonparts eligible for current actor, both matched by GUID and force-installed by user via [browse all] button. More... | |
std::vector< bool > | tuning_addonparts_conflict_w_used |
1:1 with tuning_addonparts ; True means the eligible (not used) addonpart conflicts with an used addonpart. More... | |
AddonPartConflictVec | tuning_conflicts |
Conflicts between eligible addonparts tweaking the same element. More... | |
CacheQuery | tuning_saves |
Tuneups saved by user, with category ID RoR::CID_AddonpartUser More... | |
Str< 200 > | tuning_savebox_buf |
Buffer for tuneup name to be saved. More... | |
bool | tuning_savebox_visible = false |
User pressed 'save active' to open savebox. More... | |
bool | tuning_savebox_overwrite = false |
Status of "Overwrite?" checkbox. More... | |
const ImVec4 | TUNING_HOLDTOCONFIRM_COLOR = ImVec4(0.25f, 0.15f, 0.2f, 0.5f) |
const float | TUNING_HOLDTOCONFIRM_TIMELIMIT = 1.5f |
Delete button must be held for several sec to confirm. More... | |
float | tuning_rwidget_cursorx_min = 0.f |
Avoid drawing right-side widgets ('Delete' button or 'Protected' chk) over saved tuneup names. More... | |
CacheEntryPtr | tuning_hovered_addonpart |
Private Member Functions | |
bool | IsMenuEnabled (TopMenu which) |
void | DrawActorListSinglePlayer () |
void | DrawMpUserToActorList (RoRnet::UserInfo &user) |
void | DrawSpecialStateBox (float top_offset) |
void | DrawTuningBoxedSubjectIdInline (int subject_id) |
void | DrawTuningProtectedChkRightAligned (const int subject_id, bool is_protected, ModifyProjectRequestType request_type_set, ModifyProjectRequestType request_type_reset, const std::string &subject="") |
void | DrawTuningForceRemoveControls (const int subject_id, const std::string &name, const bool is_unwanted, const bool is_force_removed, ModifyProjectRequestType request_type_set, ModifyProjectRequestType request_type_reset) |
Private Attributes | |
ImVec2 | m_open_menu_hoverbox_min |
ImVec2 | m_open_menu_hoverbox_max |
TopMenu | m_open_menu = TopMenu::TOPMENU_NONE |
ImVec2 | m_state_box_hoverbox_min |
ImVec2 | m_state_box_hoverbox_max |
StateBox | m_state_box = StateBox::STATEBOX_NONE |
bool | m_confirm_remove_all = false |
float | m_daytime = 0.f |
float | m_waves_height |
bool | m_quickload = false |
std::string | m_quicksave_name |
std::vector< std::string > | m_savegame_names |
Definition at line 46 of file GUI_TopMenubar.h.
|
strong |
Enumerator | |
---|---|
STATEBOX_NONE | |
STATEBOX_REPLAY | |
STATEBOX_RACE | |
STATEBOX_LIVE_REPAIR | |
STATEBOX_QUICK_REPAIR |
Definition at line 60 of file GUI_TopMenubar.h.
|
strong |
Enumerator | |
---|---|
TOPMENU_NONE | |
TOPMENU_SIM | |
TOPMENU_ACTORS | |
TOPMENU_SAVEGAMES | |
TOPMENU_SETTINGS | |
TOPMENU_TOOLS | |
TOPMENU_AI | |
TOPMENU_TUNING |
Definition at line 59 of file GUI_TopMenubar.h.
TopMenubar::TopMenubar | ( | ) |
Definition at line 139 of file GUI_TopMenubar.cpp.
TopMenubar::~TopMenubar | ( | ) |
Definition at line 148 of file GUI_TopMenubar.cpp.
void TopMenubar::Draw | ( | float | dt | ) |
|
private |
Definition at line 2058 of file GUI_TopMenubar.cpp.
|
private |
Definition at line 1988 of file GUI_TopMenubar.cpp.
|
private |
Definition at line 2126 of file GUI_TopMenubar.cpp.
|
private |
|
private |
Definition at line 2579 of file GUI_TopMenubar.cpp.
|
private |
Definition at line 2528 of file GUI_TopMenubar.cpp.
void TopMenubar::FetchExternAiPresetsOnBackground | ( | ) |
Initiate threaded (down)load of 'extern' waypoints from GitHub repo.
Definition at line 2403 of file GUI_TopMenubar.cpp.
|
private |
Definition at line 2637 of file GUI_TopMenubar.cpp.
|
inline |
Definition at line 68 of file GUI_TopMenubar.h.
void TopMenubar::LoadBundledAiPresets | ( | TerrainPtr | terrain | ) |
Loads JSON files from [AI Presets]
section in .terrn2 file format.
Definition at line 2364 of file GUI_TopMenubar.cpp.
void TopMenubar::RefreshAiPresets | ( | ) |
Refresh the list of presets, used for display. Needs to be called when terrain is loaded.
Definition at line 2412 of file GUI_TopMenubar.cpp.
void TopMenubar::RefreshTuningMenu | ( | ) |
Definition at line 2433 of file GUI_TopMenubar.cpp.
bool TopMenubar::ShouldDisplay | ( | ImVec2 | window_pos | ) |
Definition at line 1939 of file GUI_TopMenubar.cpp.
int RoR::GUI::TopMenubar::ai_altitude = 1000 |
Definition at line 75 of file GUI_TopMenubar.h.
int RoR::GUI::TopMenubar::ai_distance = 20 |
Definition at line 76 of file GUI_TopMenubar.h.
Ogre::String RoR::GUI::TopMenubar::ai_dname = "Bus RVI Agora S" |
Definition at line 79 of file GUI_TopMenubar.h.
Ogre::String RoR::GUI::TopMenubar::ai_dname2 = "Bus RVI Agora S" |
Definition at line 90 of file GUI_TopMenubar.h.
Ogre::String RoR::GUI::TopMenubar::ai_fname = "95bbUID-agoras.truck" |
Definition at line 78 of file GUI_TopMenubar.h.
Ogre::String RoR::GUI::TopMenubar::ai_fname2 = "95bbUID-agoras.truck" |
Definition at line 89 of file GUI_TopMenubar.h.
bool RoR::GUI::TopMenubar::ai_menu = false |
Definition at line 85 of file GUI_TopMenubar.h.
int RoR::GUI::TopMenubar::ai_mode = 0 |
Definition at line 84 of file GUI_TopMenubar.h.
int RoR::GUI::TopMenubar::ai_mode_prev = 0 |
Definition at line 98 of file GUI_TopMenubar.h.
int RoR::GUI::TopMenubar::ai_num = 1 |
Definition at line 72 of file GUI_TopMenubar.h.
int RoR::GUI::TopMenubar::ai_num_prev = 1 |
Definition at line 94 of file GUI_TopMenubar.h.
int RoR::GUI::TopMenubar::ai_position_scheme = 0 |
Definition at line 77 of file GUI_TopMenubar.h.
int RoR::GUI::TopMenubar::ai_position_scheme_prev = 0 |
Definition at line 96 of file GUI_TopMenubar.h.
rapidjson::Document RoR::GUI::TopMenubar::ai_presets_all |
The full list of presets, used for display. Needs to be refreshed when terrain is loaded.
Definition at line 104 of file GUI_TopMenubar.h.
rapidjson::Document RoR::GUI::TopMenubar::ai_presets_bundled |
Presets bundled with the terrain, see [AI Presets]
section in .terrn2 file format.
Definition at line 108 of file GUI_TopMenubar.h.
rapidjson::Document RoR::GUI::TopMenubar::ai_presets_extern |
Externally provided presets (GitHub repo or local 'savegames/waypoints.json' file).
Definition at line 105 of file GUI_TopMenubar.h.
std::string RoR::GUI::TopMenubar::ai_presets_extern_error |
Error message from the (down)load of 'extern' waypoints.
Definition at line 107 of file GUI_TopMenubar.h.
bool RoR::GUI::TopMenubar::ai_presets_extern_fetching = false |
True if the (down)load of 'extern' waypoints is in progress.
Definition at line 106 of file GUI_TopMenubar.h.
bool RoR::GUI::TopMenubar::ai_rec = false |
Definition at line 83 of file GUI_TopMenubar.h.
Ogre::String RoR::GUI::TopMenubar::ai_sectionconfig = "" |
Definition at line 80 of file GUI_TopMenubar.h.
Ogre::String RoR::GUI::TopMenubar::ai_sectionconfig2 = "" |
Definition at line 91 of file GUI_TopMenubar.h.
bool RoR::GUI::TopMenubar::ai_select = false |
Definition at line 82 of file GUI_TopMenubar.h.
bool RoR::GUI::TopMenubar::ai_select2 = false |
Definition at line 88 of file GUI_TopMenubar.h.
std::string RoR::GUI::TopMenubar::ai_skin = "" |
Definition at line 81 of file GUI_TopMenubar.h.
std::string RoR::GUI::TopMenubar::ai_skin2 = "" |
Definition at line 92 of file GUI_TopMenubar.h.
int RoR::GUI::TopMenubar::ai_speed = 50 |
Definition at line 73 of file GUI_TopMenubar.h.
int RoR::GUI::TopMenubar::ai_speed_prev = 50 |
Definition at line 95 of file GUI_TopMenubar.h.
int RoR::GUI::TopMenubar::ai_times = 1 |
Definition at line 74 of file GUI_TopMenubar.h.
int RoR::GUI::TopMenubar::ai_times_prev = 1 |
Definition at line 97 of file GUI_TopMenubar.h.
std::vector<ai_events> RoR::GUI::TopMenubar::ai_waypoints |
Definition at line 68 of file GUI_TopMenubar.h.
const ImVec4 RoR::GUI::TopMenubar::GRAY_HINT_TEXT = ImVec4(0.62f, 0.62f, 0.61f, 1.f) |
Definition at line 51 of file GUI_TopMenubar.h.
const ImVec4 RoR::GUI::TopMenubar::GREEN_TEXT = ImVec4(0.0f, 0.9f, 0.0f, 1.f) |
Definition at line 53 of file GUI_TopMenubar.h.
|
private |
Definition at line 145 of file GUI_TopMenubar.h.
|
private |
Definition at line 147 of file GUI_TopMenubar.h.
|
private |
Definition at line 139 of file GUI_TopMenubar.h.
|
private |
Definition at line 138 of file GUI_TopMenubar.h.
|
private |
Definition at line 137 of file GUI_TopMenubar.h.
|
private |
Definition at line 149 of file GUI_TopMenubar.h.
|
private |
Definition at line 150 of file GUI_TopMenubar.h.
|
private |
Definition at line 151 of file GUI_TopMenubar.h.
|
private |
Definition at line 143 of file GUI_TopMenubar.h.
|
private |
Definition at line 142 of file GUI_TopMenubar.h.
|
private |
Definition at line 141 of file GUI_TopMenubar.h.
|
private |
Definition at line 148 of file GUI_TopMenubar.h.
const ImVec2 RoR::GUI::TopMenubar::MENU_HOVERBOX_PADDING = ImVec2(25.f, 10.f) |
Definition at line 56 of file GUI_TopMenubar.h.
const float RoR::GUI::TopMenubar::MENU_Y_OFFSET = 40.f |
Definition at line 49 of file GUI_TopMenubar.h.
const ImVec4 RoR::GUI::TopMenubar::ORANGE_TEXT = ImVec4(0.9f, 0.6f, 0.0f, 1.f) |
Definition at line 54 of file GUI_TopMenubar.h.
const float RoR::GUI::TopMenubar::PANEL_HOVERBOX_HEIGHT = 50.f |
Definition at line 50 of file GUI_TopMenubar.h.
const ImVec4 RoR::GUI::TopMenubar::RED_TEXT = ImVec4(1.00f, 0.00f, 0.00f, 1.f) |
Definition at line 55 of file GUI_TopMenubar.h.
ActorPtr RoR::GUI::TopMenubar::tuning_actor |
Detecting actor change to update cached values.
Definition at line 111 of file GUI_TopMenubar.h.
std::vector<CacheEntryPtr> RoR::GUI::TopMenubar::tuning_addonparts |
Addonparts eligible for current actor, both matched by GUID and force-installed by user via [browse all] button.
Definition at line 112 of file GUI_TopMenubar.h.
std::vector<bool> RoR::GUI::TopMenubar::tuning_addonparts_conflict_w_used |
1:1 with tuning_addonparts
; True means the eligible (not used) addonpart conflicts with an used addonpart.
Definition at line 113 of file GUI_TopMenubar.h.
AddonPartConflictVec RoR::GUI::TopMenubar::tuning_conflicts |
Conflicts between eligible addonparts tweaking the same element.
Definition at line 114 of file GUI_TopMenubar.h.
const ImVec4 RoR::GUI::TopMenubar::TUNING_HOLDTOCONFIRM_COLOR = ImVec4(0.25f, 0.15f, 0.2f, 0.5f) |
Definition at line 119 of file GUI_TopMenubar.h.
const float RoR::GUI::TopMenubar::TUNING_HOLDTOCONFIRM_TIMELIMIT = 1.5f |
Delete button must be held for several sec to confirm.
Definition at line 120 of file GUI_TopMenubar.h.
CacheEntryPtr RoR::GUI::TopMenubar::tuning_hovered_addonpart |
Definition at line 122 of file GUI_TopMenubar.h.
float RoR::GUI::TopMenubar::tuning_rwidget_cursorx_min = 0.f |
Avoid drawing right-side widgets ('Delete' button or 'Protected' chk) over saved tuneup names.
Definition at line 121 of file GUI_TopMenubar.h.
Str<200> RoR::GUI::TopMenubar::tuning_savebox_buf |
Buffer for tuneup name to be saved.
Definition at line 116 of file GUI_TopMenubar.h.
bool RoR::GUI::TopMenubar::tuning_savebox_overwrite = false |
Status of "Overwrite?" checkbox.
Definition at line 118 of file GUI_TopMenubar.h.
bool RoR::GUI::TopMenubar::tuning_savebox_visible = false |
User pressed 'save active' to open savebox.
Definition at line 117 of file GUI_TopMenubar.h.
CacheQuery RoR::GUI::TopMenubar::tuning_saves |
Tuneups saved by user, with category ID RoR::CID_AddonpartUser
Definition at line 115 of file GUI_TopMenubar.h.
const int RoR::GUI::TopMenubar::TUNING_SUBJECTID_USE_NAME = -2 |
Definition at line 57 of file GUI_TopMenubar.h.
const ImVec4 RoR::GUI::TopMenubar::WHITE_TEXT = ImVec4(0.9f, 0.9f, 0.9f, 1.f) |
Definition at line 52 of file GUI_TopMenubar.h.