The stadium and its surroundings as two pages with a card model on one plate
The ground is drawn after the design: eight stands as deep as they have places, the equipment, the fourteen objects around it, trees, cars and people on one base plate. The stage works out itself which part lies under the pointer, the wheel zooms and dragging moves the view. The part's card, the figures and the building firm's offer follow the notes of the other pages. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
17c6d0a1d3
commit
c60b0e9b2c
14 files changed
+1025
-1178
No files matched your search
+14
-8
@@ -39,7 +39,7 @@
|
||||
#include "modern/ui/settings_presentation.hpp"
|
||||
#include "modern/ui/ui_preferences.hpp"
|
||||
#include "modern/ui/desktop.hpp"
|
||||
#include "modern/ui/stadium_model.hpp"
|
||||
#include "modern/ui/stadium_scene.hpp"
|
||||
#include "modern/ui/demo_widgets.hpp"
|
||||
#include "modern/ui/demo_files.hpp"
|
||||
#include "modern/ui/gui_assets.hpp"
|
||||
@@ -507,11 +507,18 @@ class App final : public Rml::EventListener {
|
||||
// the stadium's card model: what the camera looks at ("" the whole ground, "stadium", or a
|
||||
// part such as "block:3"), and its flight from one focus to the next
|
||||
std::string stadium_focus_;
|
||||
stadium3d::Camera stadium_camera_, stadium_camera_from_, stadium_camera_to_;
|
||||
bool stadium_flying_ = false;
|
||||
uint64_t stadium_flight_start_ = 0;
|
||||
// how each view of the model is looked at: zoom and the place of the picture's corner
|
||||
std::map<std::string, std::array<double, 3>> stadium_cams_;
|
||||
Json stadium_drag_; // the pointer while the view is dragged
|
||||
bool stadium_dragged_ = false; // the next click only ends a drag
|
||||
std::string stadium_tip_, stadium_hover_; // what the pointer is on
|
||||
std::array<double, 2> stadium_tip_at_{}; // where its name is shown, in units of the page
|
||||
std::vector<stadium_scene::Hot> stadium_hots_; // the parts of the view that is shown
|
||||
std::array<double, 3> stadium_cam(bool outer);
|
||||
std::string stadium_cam_style(const std::array<double, 3> &cam);
|
||||
bool stadium_stage_event(Rml::Event &);
|
||||
std::string render_stadium_data();
|
||||
bool stadium_focus_action(const std::string &, Rml::Element *);
|
||||
void stadium_camera_tick();
|
||||
uint64_t stadium_revision_ = 0;
|
||||
std::shared_ptr<const Catalog> stadium_world_;
|
||||
const DataSource *stadium_source_ = nullptr;
|
||||
@@ -797,7 +804,7 @@ class App final : public Rml::EventListener {
|
||||
statistics_view_ = Json::object(); statistics_trophy_ = Json::object();
|
||||
statistics_scrolls_ = Json::object();
|
||||
reset_news();
|
||||
stadium_view_ = Json::object(); stadium_revision_ = 0; stadium_focus_.clear(); stadium_flying_ = false;
|
||||
stadium_view_ = Json::object(); stadium_revision_ = 0; stadium_focus_.clear(); stadium_drag_ = Json();
|
||||
stadium_world_.reset(); stadium_source_ = nullptr;
|
||||
advertising_selected_ = -1; advertising_offer_ = 0; advertising_revision_ = 0; advertising_world_.reset();
|
||||
toto_column_ = 0; toto_dialog_.clear();
|
||||
@@ -1326,7 +1333,6 @@ class App final : public Rml::EventListener {
|
||||
void frame() {
|
||||
engine_create_poll();
|
||||
engine_files_poll();
|
||||
stadium_camera_tick();
|
||||
if (engine_mode_) { engine_frame(); return; }
|
||||
front_poll();
|
||||
flush_selects();
|
||||
@@ -1589,7 +1595,7 @@ public:
|
||||
doc_->AddEventListener(event, &select_capture_, true);
|
||||
for (const char *event :
|
||||
{"click", "dblclick", "change", "input", "keydown", "blur", "mousedown",
|
||||
"mouseup", "mousemove", "contextmenu", "focus"})
|
||||
"mouseup", "mousemove", "contextmenu", "focus", "mousescroll"})
|
||||
doc_->AddEventListener(event, this, Rml::String(event) == "keydown" ||
|
||||
Rml::String(event) == "blur" || Rml::String(event) == "focus");
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user