Threads and tasks
This commit is contained in:
@@ -546,8 +546,10 @@ struct GUIListener : public Ogre::RenderTargetListener {
|
||||
if (list.dynamicNodes.size() > 0) {
|
||||
int j;
|
||||
Ogre::Vector3 queryPos;
|
||||
std::vector<size_t> points = list.points;
|
||||
std::vector<float> distances = list.distances;
|
||||
std::vector<size_t> points =
|
||||
list.getUIData().points;
|
||||
std::vector<float> distances =
|
||||
list.getUIData().distances;
|
||||
|
||||
Ogre::SceneNode *cameraNode =
|
||||
ECS::get<Camera>().mCameraNode;
|
||||
@@ -555,7 +557,7 @@ struct GUIListener : public Ogre::RenderTargetListener {
|
||||
cameraNode->_getDerivedPosition();
|
||||
float minDistance = 25.0f;
|
||||
int i;
|
||||
list.selected = -1;
|
||||
list.setUISelected(-1);
|
||||
for (i = 0; i < points.size(); i++) {
|
||||
size_t p = points[i];
|
||||
float distance = distances[i];
|
||||
@@ -589,9 +591,9 @@ struct GUIListener : public Ogre::RenderTargetListener {
|
||||
if (hit)
|
||||
continue;
|
||||
|
||||
if (list.selected == -1) {
|
||||
if (list.getUIData().selected == -1) {
|
||||
if (distance < actDistance)
|
||||
list.selected = p;
|
||||
list.setUISelected(p);
|
||||
}
|
||||
ImDrawList *drawList =
|
||||
ImGui::GetBackgroundDrawList();
|
||||
@@ -600,7 +602,7 @@ struct GUIListener : public Ogre::RenderTargetListener {
|
||||
float circleRadius = 8.0f;
|
||||
ImColor circleColor(
|
||||
ImVec4(0.3f, 0.3f, 0.3f, 1.0f));
|
||||
if (p == list.selected) {
|
||||
if (p == list.getUIData().selected) {
|
||||
circleRadius = 16.0f;
|
||||
circleColor = ImColor(
|
||||
ImVec4(0, 0, 1, 1));
|
||||
|
||||
Reference in New Issue
Block a user