Add New Resolution To Gideros Player

From Gideros Wiki
Revision as of 15:13, 16 September 2014 by Ar2rsawseen (Talk | contribs)

Jump to: navigation, search

In the mainwindow.ui, player folder: https://github.com/gideros/gideros/blob/master/player/mainwindow.ui

Add a new addaction and action:<addaction name="action750x1334"/>

<action name="action750x1334">
<property name="checkable">
 <bool>true</bool>
</property>
<property name="text">
 <string>750x1334 (iPhone 6)</string>
</property>
</action>


---

In the mainwindow.cpp: https://github.com/gideros/gideros/blob/master/player/mainwindow.cpp

Constructor, these snippets:

connect(ui.action750x1334, SIGNAL(triggered()), this, SLOT(actionResolution()));
 resolutionGroup_->addAction(ui.action750x1334);

case 750:
 ui.action750x1334->setChecked(true);
 break;


In closeEvent:

else if (resolutionGroup_->checkedAction() == ui.action750x1334)
 settings.setValue("resolution", 750);


In hardwareWidth:

else if (resolutionGroup_->checkedAction() == ui.action750x1334)
 return 750;


And in the hardwareHeight:

else if (resolutionGroup_->checkedAction() == ui.action750x1334)
 return 1334;