DOWNLOAD LINK : http://uniquekey.xyz/download-setup/
QANGA – Now Available in Early Access!
Please Note: QANGA is an Early Access game, actively being developed by a small independent team. By choosing to purchase QANGA now, you are directly supporting its development and contributing to the on...
DOWNLOAD LINK : http://uniquekey.xyz/download-setup/
QANGA – Now Available in Early Access!
Please Note: QANGA is an Early Access game, actively being developed by a small independent team. By choosing to purchase QANGA now, you are directly supporting its development and contributing to the ongoing improvement of the game. Expect to encounter bugs and see some features still in progress. Your support and feedback are crucial in helping us create the ultimate QANGA experience we have envisioned.
Explore the Fully Playable Solar System!
Dive into the universe of QANGA, a vast space sandbox where you can explore the entire solar system with no loading screens. Fly freely between planets and land seamlessly. Mars, Venus, the Moon, Jupiter and its moons, Saturn and its rings of asteroids, numerous orbital stations, and much more. Every planet and moon is an open playground, ready to be explored and exploited as you see fit.
In QANGA, space is both your playground and battlefield. You can craft your own adventure solo or with friends, create your own game servers to build communities, and experiment with alternative gameplay modes.
A World of Possibilities: Combat, Trade, Building, Survival, and Exploration
In QANGA, you play as a human citizen who has been cryogenically frozen and synchronized with a cyborg, exploring the far reaches of space and Earth to collect items, complete missions, and thrive. Your journey begins at the Refuel Tower of ICLab Industrie, but the vastness of the cosmos calls out to you.
* Scavenging and Trading: Explore diverse environments to find rare and valuable items. Sell them to upgrade your gear, buy better weapons, vehicles, and other essential items.
* Contracts and Missions: Take on various contracts to retrieve packages, eliminate enemies like the Sanglines, discover hidden zones, or destroy rogue cyborgs. Each mission brings you closer to your objectives, with various rewards.
* Survival and Combat: Fight enemies in hostile environments, whether in space or on Earth. The Sanglines, creatures born from Earth’s climate upheavals, are your sworn enemies. Develop your survival skills and face the dangers of space and Earth.
* Base Building: Players can build their bases anywhere in the universe on all planetary surfaces and, eventually, on sufficiently large asteroids. Create strategic outposts, secure shelters, or industrial complexes to support your exploration and combat in the QANGA universe.
Developing%Graphical%User%Interfaces%
! Java%Graphics%Toolkits%
o AWT%
• NaGve%widgets%
• Only%common%subset%of%plaKorm%widgets%available!%
o Swing%
• Manually%drawn%widgets%
• Superset%of%plaKorm%widgets%
• Extensible%
o JavaFX%
• Available%with%Java%7%(but%not%added%by%default!)%
• Completely%rethinked%UI%model%
2%
Problems%with%User%Interfaces%
! “Does%not%look%like%Word”%problem%
o Reusing%plaKorm%lookYandYfeel%
o InternaGonalizaGon%se[ngs%
o Java%goal:%look%everywhere%the%same%
! AWT%
o very%low%level%
! Swing%%
o memory%usage%and%performance%issues%at%start%
o Since%Java%6%more%than%appropriate%
! Java%FX%
o SGll%not%widely%used%
3%
SWT%–%Standard%Widget%Toolkit%
! Developed%by%IBM%
o Swing%was%not%appropriate%
o When%starGng%the%Eclipse%project%
• Based%on%Smalltalk%naGve%widget%accessing%experiments%
o Goals%
• Use%naGve%widgets%everywhere%possible%
• Looks%like%a%naGve%applicaGon%
4%
SWT%–%Standard%Widget%Toolkit%
! Reusing%plaKorm%widgets%
o Fast%
o PlaKorm%lookYandYfeel%
• Every%plaKorm%service%available%
– OLE,%dragYnYdrop,%…%
o Needs%porGng!%
• Appears%differently%
5%
Source%of%pictures:%
h:p://eclipse.org/swt%
SWT%Event%Loop%
! Explicit%event%loop%
o The%applicaGon%needs%to%include%it!%
• CollecGng%incoming%events%
• and%processing%it%
o Loop%terminaGon%
• ApplicaGon%terminates%
o Very%similar%to%Win32%API%
9%
SWT%Event%Loop%
public static void main(String [] args) {!
"" Display display = new Display();!
"" final Shell shell = new Shell(display);!
"" shell.setSize(400, 400);!
"" shell.open();!
!
"" while (!shell.isDisposed()) {!
""" if (!display.readAndDispatch() )!
"""" display.sleep();!
"" }!
"" display.dispose();!
"}%
10%
Event%Handling%
! Event:%something%the%applicaGon%needs%to%react%
o User%events%
• Mouse%move%
• Key%presses%
• …%
o System%
• Time%passes%
• …%
11%
Event%Handling%
! Assigning%Event%Listeners%
o Generic%event%listeners%for%every%widget%
• Event%informaGon%available%as%style%bits%(see%later)%
o Typed%listeners%when%applicable%
• Keyboard%
• Mouse%
• MulGtouch%
• …%
! Both%Listener%and%Adapters%available%
12%
SWT%widgets%
! RelaGvely%small%widget%hierarchy%
o E.g.%as%opposed%to%Swing%
o A%class%describes%mulGple%widgets%
• SelecGon%happens%via%style%bits%
! AssociaGng%model%objects%possible%
o getData()/setData()%methods%
o Very%useful%for%generic%UI%processing%code%and%data%
bindings%
13%
Style%bits%
! AddiGonal%informaGon%
• E.g.%Bu:onY>CheckBox%%
! Constructor%parameter%
o It%is%not%possible%to%change%later%
o The%available%styles%depend%on%specific%widgets%
! ImplementaGon%
o Works%with%Java%1.4%Y>%no%‘enum’%available%
o Using%int%constants%from%the%SWT%class%
• MulGple%style%bits%can%be%selected%via%bitwise%or:%
– SWT.SEPARATOR|SWT.HORIZONTAL%
14%
SWT%widgets%
! Manual%instanGaGon%
o No%factory%
o Strict%containment%hierarchy%
! Manual%cleanup%
o Garbage%collecGon%is%not%enough!%
• NaGve%widgets!%
o Method%dispose()%needs%to%be%called%manually%
15%
Dispose%rules%
16%
Dispose%rules%
1. Base%rule:%%
o If#you#create#it,#you#dispose#it!#
2. Reverse%rule:%
o Do#only#dispose#it#if#you#create#it!#
3. ExcepGon:%
o Widgets%hierarchies%are%disposed%by%disposing%the%
topYlevel%element%
17%
Dispose%rules%
1. Base%rule:%%
o If#you#create#it,#you#dispose#it!#
2. Reverse%rule:%
o Do#only#dispose#it#if#you#create#it!#
3. ExcepGon:%
o Widgets%hierarchies%are%disposed%by%disposing%the%
topYlevel%element%
18%
Dispose%rules%
1. Base%rule:%%
o If#you#create#it,#you#dispose#it!#
2. Reverse%rule:%
o Do#only#dispose#it#if#you#create#it!#
3. ExcepGon:%
o Widgets%hierarchies%are%disposed%by%disposing%the%
topYlevel%element%
19%
Common%widgets%
! Bu:on%
o Push,%radio,%combo%bu:ons%
! Label%
o ReadYonly%text%display%field%(w%or%w/o%icons)%
! Text%
o Writeable%text%fields%(single%line,%mulGline)%
! StyledText%
o Custom%drawn%mulGline%text%field%(e.g.%Eclipse%editors)%
20%
Common%widgets%
! Composite%
o Stores%other%widgets%
o Allows%se[ng%layouts%
! Canvas%
o Manual%drawing%
! Menu,%Toolbar%
! List,%Tree,%Table%
o Specific%widgets%for%displaying%large%amounts%of%data%
o Avoids%creaGng%a%huge%number%of%bu:ons,%etc.%
21%
Dialog%windows%
! Types%
o MessageBoxY%displaying%messages%
o ColorDialog%–%color%choosing%
o DirectoryDialog%–%directory%structure%
o FileDialog%–%file%selecGon/save%
o FontDialog%–%font%selecGng%
o PrintDialog%–%prinGng%
o These%are%not%widgets!%
! Reuses%operaGng%system%dialogs%
o Specific%dialog%se[ngs%available%
• Pl.%SWT.SHEET%
25%
Dialog%windows%
! Types%
o MessageBoxY%displaying%messages%
o ColorDialog%–%color%choosing%
o DirectoryDialog%–%directory%structure%
o FileDialog%–%file%selecGon/save%
o FontDialog%–%font%selecGng%
o PrintDialog%–%prinGng%
o These%are%not%widgets!%
! Reuses%operaGng%system%dialogs%
o Specific%dialog%se[ngs%available%
• Pl.%SWT.SHEET%
26%
Widget%Containment%Hierarchy%
! Strict%containment%hierarchy%
o Every%widget%has%a%single%parent%
o ExcepGon:%Shell%(window)%
! Composite%widget%
o Contains%other%widgets%
o Layout%can%be%created%
32%
Layout%
! SeparaGon%of%arrangement%and%content%
o Decides%posiGoning%
o RelaGve%to%container%
o KöveG%a%konténer%méretének%változását%
! Abstract%Base%class:%Layout%
o Do%not%call%it%manually%
33%
Layout%Hints%
! Every%widget%might%give%some%posiGoning%
informaGon%
o Use%#setLayoutData%
o Different%data%for%different%layouts%
• Inconsistent%se[ng%results%in%runGme%error%
34%
Layouts%in%SWT%
! BuiltYin%layouts%available%
o FillLayout%
o RowLayout%
o GridLayout%
o FormLayout%
o StackLayout%
! Default%layout%
o Set%up%coordinates%and%size%for%each%widget!%
35%
Layouts%in%SWT%
! BuiltYin%layouts%available%
o FillLayout%
o RowLayout%
o GridLayout%
o FormLayout%
o StackLayout%
! Default%layout%
o Set%up%coordinates%and%size%for%each%widget!%
36%
If%no%layout%is%defined%and%
no%size/posiGoning%is%set%
up,%the%widget%will%not%
appear!%
FillLayout%
! Fill%all%space%
o Places%all%elements%next%to%each%other%
o Horizontal%or%verGcal%
o PrimiGve%layout%
• Ignores%suggested%size%of%widgets!%
! May%be%useful%for%
nested%composites%
RowLayout%
! Similar%to%FillLayout%
o Arranges%elements%into%rows%or%columns%
o Considers%widget%size%
! Hint%object:%RowData%(LayoutData)%:%height,%width%
o Sets%the%preferred%size%of%the%widget%
GridLayout%
! Grid%arrangement%
o Fixed%number%of%columns%
! Important%properGes%
o horizontalSpacing%
o makeColumnsEqualWidth%
o marginHeight%
o marginWidth%
o numColumns%
o verGcalSpacing%
FormLayout%
! Complex%layout%
! Layout%data%stores%a:achments%
o RelaGve%posiGoning%for%
a%selected%side%
o DefiniGon%
• y=ax+b%%
• y:%height,%x:%width%
• a:%relaGve%posiGoning,%b:%ofset%
FormLayout%
! Complex%layout%
! Layout%data%stores%a:achments%
o RelaGve%posiGoning%for%
a%selected%side%
o DefiniGon%
• y=ax+b%%
• y:%height,%x:%width%
• a:%relaGve%posiGoning,%b:%ofset%
Absolute%
posiGon%wrt%
container%
FormLayout%
! Complex%layout%
! Layout%data%stores%a:achments%
o RelaGve%posiGoning%for%
a%selected%side%
o DefiniGon%
• y=ax+b%%
• y:%height,%x:%width%
• a:%relaGve%posiGoning,%b:%ofset%
Right%and%
down%wrt%the%
2nd%widget%
StackLayout%
! Each%element%has%the%same%size%and%posiGon%
! Only%the%top%control%will%be%visible%
o StackLayout.topControl
o A|er%se[ng,%layout()%needs%to%be%called%for%UI%
update%
! Margin%se:able%
o marginHeight%
o marginWidth
Layout%
Layout%
! Many%layouts%available%
! Custom%layouts%possible%
o Create%new%layout%implementaGon%
o E.g.%responsive%layout%from%
h:p://www.codeaffine.com/2014/02/24/responsiveY
uisYwithYeclipseYandYswt/%%
! Not%required%to%use%
o Widget#setBound(x,y,w,h)%
• ContainerYrelaGve%posiGoning%
• Size%
Layout%
! Many%layouts%available%
! Custom%layouts%possible%
o Create%new%layout%implementaGon%
o E.g.%responsive%layout%from%
h:p://www.codeaffine.com/2014/02/24/responsiveY
uisYwithYeclipseYandYswt/%%
! Not%required%to%use%
o Widget#setBound(x,y,w,h)%
• ContainerYrelaGve%posiGoning%
• Size%
Layout%
! Many%layouts%available%
! Custom%layouts%possible%
o Create%new%layout%implementaGon%
o E.g.%responsive%layout%from%
h:p://www.codeaffine.com/2014/02/24/responsiveY
uisYwithYeclipseYandYswt/%%
! Not%required%to%use%
o Widget#setBound(x,y,w,h)%
• ContainerYrelaGve%posiGoning%
• Size%
Layout%
! Many%layouts%available%
! Custom%layouts%possible%
o Create%new%layout%implementaGon%
o E.g.%responsive%layout%from%
h:p://www.codeaffine.com/2014/02/24/responsiveY
uisYwithYeclipseYandYswt/%%
! Not%required%to%use%
o Widget#setBound(x,y,w,h)%
• ContainerYrelaGve%posiGoning%
• Size%
Layout%
! Many%layouts%available%
! Custom%layouts%possible%
o Create%new%layout%implementaGon%
o E.g.%responsive%layout%from%
h:p://www.codeaffine.com/2014/02/24/responsiveY
uisYwithYeclipseYandYswt/%%
! Not%required%to%use%
o Widget#setBound(x,y,w,h)%
• ContainerYrelaGve%posiGoning%
• Size%
Sample%applicaGon%
private void createSShell() {!
"sShell = new Shell();!
"sShell.setText("Shell");!
"sShell.setLayout(new GridLayout());!
"sShell.setSize(new Point(90,127));!
"label1 = new Label(sShell, SWT.NONE);!
"label1.setText("Some Text");!
"label2 = new Label(sShell, SWT.SEPARATOR |
SWT.HORIZONTAL);!
"label2.setText("Label");!
"checkBox = new Button(sShell, SWT.CHECK);!
"checkBox.setText("check");!
"button = new Button(sShell, SWT.NONE);!
"button.setText("PushMe");!
}%
50%
Sample%applicaGon%
private void createSShell() {!
"sShell = new Shell();!
"sShell.setText("Shell");!
"sShell.setLayout(new GridLayout());!
"sShell.setSize(new Point(90,127));!
"label1 = new Label(sShell, SWT.NONE);!
"label1.setText("Some Text");!
"label2 = new Label(sShell, SWT.SEPARATOR |
SWT.HORIZONTAL);!
"label2.setText("Label");!
"checkBox = new Button(sShell, SWT.CHECK);!
"checkBox.setText("check");!
"button = new Button(sShell, SWT.NONE);!
"button.setText("PushMe");!
}%
51%
Se[ng%Layout%
Sample%applicaGon%
private void createSShell() {!
"sShell = new Shell();!
"sShell.setText("Shell");!
"sShell.setLayout(new GridLayout());!
"sShell.setSize(new Point(90,127));!
"label1 = new Label(sShell, SWT.NONE);!
"label1.setText("Some Text");!
"label2 = new Label(sShell, SWT.SEPARATOR |
SWT.HORIZONTAL);!
"label2.setText("Label");!
"checkBox = new Button(sShell, SWT.CHECK);!
"checkBox.setText("check");!
"button = new Button(sShell, SWT.NONE);!
"button.setText("PushMe");!
}%
52%
Read%only%label%
Sample%applicaGon%
private void createSShell() {!
"sShell = new Shell();!
"sShell.setText("Shell");!
"sShell.setLayout(new GridLayout());!
"sShell.setSize(new Point(90,127));!
"label1 = new Label(sShell, SWT.NONE);!
"label1.setText("Some Text");!
"label2 = new Label(sShell, SWT.SEPARATOR |
SWT.HORIZONTAL);!
"label2.setText("Label");!
"checkBox = new Button(sShell, SWT.CHECK);!
"checkBox.setText("check");!
"button = new Button(sShell, SWT.NONE);!
"button.setText("PushMe");!
}%
53%
%‘SEPARATOR’%
stylebit%
Sample%applicaGon%
private void createSShell() {!
"sShell = new Shell();!
"sShell.setText("Shell");!
"sShell.setLayout(new GridLayout());!
"sShell.setSize(new Point(90,127));!
"label1 = new Label(sShell, SWT.NONE);!
"label1.setText("Some Text");!
"label2 = new Label(sShell, SWT.SEPARATOR |
SWT.HORIZONTAL);!
"label2.setText("Label");!
"checkBox = new Button(sShell, SWT.CHECK);!
"checkBox.setText("check");!
"button = new Button(sShell, SWT.NONE);!
"button.setText("PushMe");!
}%
54%
Checkbox%%uses%
‘CHECK’%style%
bit%
Sample%applicaGon%
private void createSShell() {!
"sShell = new Shell();!
"sShell.setText("Shell");!
"sShell.setLayout(new GridLayout());!
"sShell.setSize(new Point(90,127));!
"label1 = new Label(sShell, SWT.NONE);!
"label1.setText("Some Text");!
"label2 = new Label(sShell, SWT.SEPARATOR |
SWT.HORIZONTAL);!
"label2.setText("Label");!
"checkBox = new Button(sShell, SWT.CHECK);!
"checkBox.setText("check");!
"button = new Button(sShell, SWT.NONE);!
"button.setText("PushMe");!
}%
55%
Simple%bu:on%
Sample%applicaGon%
private void createSShell() {!
"sShell = new Shell();!
"sShell.setText("Shell");!
"sShell.setLayout(new GridLayout());!
"sShell.setSize(new Point(90,127));!
"label1 = new Label(sShell, SWT.NONE);!
"label1.setText("Some Text");!
"label2 = new Label(sShell, SWT.SEPARATOR |
SWT.HORIZONTAL);!
"label2.setText("Label");!
"checkBox = new Button(sShell, SWT.CHECK);!
"checkBox.setText("check");!
"button = new Button(sShell, SWT.NONE);!
"button.setText("PushMe");!
}%
56%
Developing)User)Interface)
57%
Designing%user%interfaces%
! Required%features%
o Direct%code%ediGng%
o Layout%support%
o Both%source%and%UI%ediGng%
! MulGple%tools%available%
o Eclipse%WindowBuilder%is%one%of%the%best%
WindowBuilder%
! History%
o InstanGaGons%Y>%Google%Y>%Eclipse%
o Roundtrip%engineering%
o SWT,%JFace,%Forms%API%
o Eclipse%Workbench%
o BUT:%memory%requirements%
• Pro%Gp:%do%not%use%WindowBuilder%as%default%Java%editor%
o BUT:%Smaller%bugs,%missing%features%
59%
WindowBuilder%
60%
PiKall%1.%
! Use%automaGc%layouGng%if%possible%
o Avoids%alignment%errors%
61%
Source:%h:p://uxma:ers.com/mt/archives/2009/02/reviewingYuserYinterfaces.php%
Easy%to%create%!=%Easy%to%use%
62%
Summary)
63%
SWT%Y%Summary%
! NaGve%graphical%user%interface%framework%
o Fast%
o Simple%
! Different%form%elements%
o Complex)forms)
o Dialogs%
o Menus%
o Drawing%
o PrinGng%
o …%
64%
Further%reading%
! Understanding%Layout%in%SWT%
o h:p://www.eclipse.org/arGcles/arGcle.php?
file=ArGcleYUnderstandingYLayouts/index.html%
o Describes%Layouts%
! User%Interface%Guidelines%–%Eclipsepedia%
o h:p://wiki.eclipse.org/User_Interface_Guidelines%
! SWT%Snippets:%%
o h:p://www.eclipse.org/swt/snippets/%
o Grouped%samples%for%coding%SWT%
65%