Skip to content

Instantly share code, notes, and snippets.

@jacobparis
Created November 1, 2017 01:31
Show Gist options
  • Save jacobparis/61c4b3ce4e53a7403b4fe81010a7fb03 to your computer and use it in GitHub Desktop.
Save jacobparis/61c4b3ce4e53a7403b4fe81010a7fb03 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8" ?>
<vbox>
<tabview width="100%" height="100%" styleName="panel">
</tabview>
</vbox>
.button-row {
text-align: right;
color: #FFFFFF;
height: 40px;
width: 228px;
}
.button-row.purchased {
color: #CCCCCC;
}
.dialog .dialog-contents {
width: 100%;
background-color: #81887f;
}
.tabview, .tabview-contents {
width: 100px;
background-color: #91887f;
}
.scrollview {
width: 260px;
height: 100%;
background-color: #a1887f;
}
.scrollview-contents {
width: 240px;
background-color: #b1887f;
}
image {
width: 32px;
height: 32px;
}
// Triggered on click
public function showNotifications() {
var options = new DialogOptions();
options.title = "Notifications";
var dialog = ComponentMacros.buildComponent("assets/ui/events.xml");
dialog.height = 400;
var tabView = dialog.findComponent("tabview", null, null, "css");
var eventTab:ScrollView = new ScrollView();
eventTab.text = "Events";
// Populate eventTab
tabView.addComponent(eventTab);
// Same procedure for second tab
Screen.instance.showDialog(dialog, options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment