Something went wrong. Try again.
[Mirror] Libreopolis is a cross-platform city simulation game fully compatible with SimCity 2000. gitlab.com/conasg/libreopolis
Something went wrong. Try again.
12345678910111213141516171819202122232425262728#include "sc2k/ui/structure_hover.hpp"#include <cstdio>
using namespace sc2k;
#include "test_harness.hpp"
int main() { ui::ObjectHoverState hover; const render::ObjectSelection tower{60, 63};
CHECK(hover.update_from_pointer(tower)); CHECK(hover.selection() == tower);
// A simulation tick rebuilds the rotated scene while the pointer remains stationary. The last // pointer result must stay latched until fresh input replaces it. hover.scene_reprojected(); CHECK(hover.selection() == tower);
CHECK(!hover.update_from_pointer(tower)); CHECK(hover.clear_for_pointer_block()); CHECK(!hover.selection()); CHECK(!hover.clear_for_pointer_block());
if (failures == 0) std::puts("structure_hover: lifecycle checks passed"); return failures == 0 ? 0 : 1;}