Tree-like objective node structure (#7152)

* overall structure

* overall layout

* field interpreter

* less bloated UI

* scroll pan't

* strip off the 'Marker' suffix

* e

* all (hopefully all...) interpreters finished.

* onset

* two, four

* i don't understand how icon mappings work.

* separate remover and indexer

* some cleanups

* untested mobile support

* contrib

* ok anuke

* fix conflicts 2

* hidden
This commit is contained in:
GlennFolker
2022-07-15 21:41:18 +07:00
committed by GitHub
parent 3b1c8baca9
commit 695c19d0b0
26 changed files with 1733 additions and 810 deletions

View File

@@ -775,13 +775,21 @@ public class HudFragment{
builder.setLength(0);
//objectives override mission?
if(state.rules.objectives.size > 0){
var first = state.rules.objectives.first();
String text = first.text();
if(text != null){
builder.append(text);
return builder;
if(state.rules.objectives.any()){
boolean first = true;
for(var obj : state.rules.objectives){
if(!obj.qualified()) continue;
String text = obj.text();
if(text != null){
if(!first) builder.append('\n');
builder.append(text);
first = false;
}
}
return builder;
}
//mission overrides everything
@@ -832,13 +840,24 @@ public class HudFragment{
table.row();
table.clicked(() -> {
if(state.rules.objectives.size > 0){
var first = state.rules.objectives.first();
var details = first.details();
if(details != null){
//TODO this could be much better.
ui.showInfo(details);
if(state.rules.objectives.any()){
StringBuilder text = new StringBuilder();
boolean first = true;
for(var obj : state.rules.objectives){
if(!obj.qualified()) continue;
String details = obj.details();
if(details != null){
if(!first) text.append('\n');
text.append(details);
first = false;
}
}
//TODO this, as said before, could be much better.
ui.showInfo(text.toString());
}
});