forked from unimatrix/web
Add opt-in organisation, Exchange and House fullscreen styles
This commit is contained in:
parent
e8452c887f
commit
5f58251ee3
1 changed files with 303 additions and 90 deletions
|
|
@ -276,12 +276,14 @@ public final class DuneGUI extends JavaPlugin implements Listener,CommandExecuto
|
|||
Screen screen=screen(p,"Choose your House",0xE300+(chosen==null?0:Arrays.asList(IDS).indexOf(chosen)+1));
|
||||
for(int i=0;i<IDS.length;i++){String id=IDS[i];int centre=CENTRES[i];boolean selected=id.equals(chosen);
|
||||
var item=icon(p,houseName(data,id),selected?"Your current House":"Declare allegiance to this House","drgui_transparent",Material.PAPER);menuArt(item,"house_"+id);
|
||||
for(int row=i<3?-1:0;row<=1;row++)for(int col=-1;col<=1;col++){int slot=centre+row*9+col;screen.inventory.setItem(slot,item.clone());screen.actions.put(slot,()->declareHouse(p,data,id,true));}
|
||||
Runnable allegiance=()->declareHouse(p,data,id,true);
|
||||
for(int row=i<3?-1:0;row<=1;row++)for(int col=-1;col<=1;col++){int slot=centre+row*9+col;screen.inventory.setItem(slot,item.clone());screen.actions.put(slot,allegiance);}
|
||||
}
|
||||
button(screen,p,45,"Close","Return to the lobby",Material.ARROW,p::closeInventory);
|
||||
button(screen,p,49,sidebar.enabled(p)?"Hide scoreboard":"Show scoreboard","Toggle your personal briefing",Material.LEVER,()->{toggleSidebar(p);select(p,data,chosen);});
|
||||
for(int slot:new int[]{48,50})screen.actions.put(slot,screen.actions.get(49));
|
||||
screen.actions.put(46,screen.actions.get(45));
|
||||
if(NativeMenus.show(this,p,"development.fullscreen-house-viewers","Choose your House","",screen.inventory,screen.actions,screen.gate,DecisionsViewTransport.Style.HOUSE,null))return;
|
||||
if(MCGUIMenus.show(p,"Choose your House","",screen.inventory,screen.actions,screen.gate))return;
|
||||
p.openInventory(screen.inventory);expire(screen);
|
||||
}
|
||||
|
|
@ -307,6 +309,7 @@ public final class DuneGUI extends JavaPlugin implements Listener,CommandExecuto
|
|||
button(screen,p,45,"Your House",houseName(data,house),Material.ARROW,()->select(p,data,house));
|
||||
button(screen,p,49,sidebar.enabled(p)?"Hide scoreboard":"Show scoreboard","Toggle your personal briefing",Material.LEVER,()->{toggleSidebar(p);mentat(p,data);});for(int slot:new int[]{48,50})screen.actions.put(slot,screen.actions.get(49));
|
||||
for(int slot:new int[]{37,39})screen.actions.put(slot,screen.actions.get(38));for(int slot:new int[]{41,43})screen.actions.put(slot,screen.actions.get(42));screen.actions.put(46,screen.actions.get(45));
|
||||
if(NativeMenus.show(this,p,"development.fullscreen-house-viewers","Your Mentat · "+name,"",screen.inventory,screen.actions,screen.gate,DecisionsViewTransport.Style.HOUSE,null))return;
|
||||
if(MCGUIMenus.show(p,"Your Mentat · "+name,"",screen.inventory,screen.actions,screen.gate))return;
|
||||
p.openInventory(screen.inventory);expire(screen);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff