Merge pull request #73 from erict-powersoft/master
Add zerotime attribute to competition info
This commit is contained in:
commit
d06f4cbd7b
3023
code/English_spellcheck.txt
Normal file
3023
code/English_spellcheck.txt
Normal file
File diff suppressed because it is too large
Load Diff
2800
code/English_translated.txt
Normal file
2800
code/English_translated.txt
Normal file
File diff suppressed because it is too large
Load Diff
@ -12,7 +12,7 @@
|
||||
<b>Example:</b>
|
||||
<pre>
|
||||
*MOPComplete>
|
||||
*competition date="2015-09-06" organizer="Orienteringsklubben Linné" homepage="http://www.oklinne.nu">Stafett-DM, Uppland*/competition>
|
||||
*competition date="2015-09-06" organizer="Orienteringsklubben Linné" homepage="http://www.oklinne.nu" zerotime="216000">Stafett-DM, Uppland*/competition>
|
||||
*/MOPComplete>
|
||||
</pre>
|
||||
|
||||
|
||||
@ -131,6 +131,11 @@ bool InfoCompetition::synchronize(oEvent &oe, bool onlyCmp, const set<int> &incl
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (oe.getZeroTimeNum() != zerotime) {
|
||||
zerotime = oe.getZeroTimeNum();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (changed)
|
||||
needCommit(*this);
|
||||
|
||||
@ -452,6 +457,7 @@ void InfoCompetition::serialize(xmlbuffer &xml, bool diffOnly) const {
|
||||
prop.push_back(make_pair("date", date));
|
||||
prop.push_back(make_pair("organizer", organizer));
|
||||
prop.push_back(make_pair("homepage", homepage));
|
||||
prop.emplace_back("zerotime", itow(zerotime));
|
||||
xml.write("competition", prop, name);
|
||||
}
|
||||
|
||||
|
||||
@ -221,6 +221,7 @@ private:
|
||||
wstring date;
|
||||
wstring organizer;
|
||||
wstring homepage;
|
||||
int zerotime;
|
||||
protected:
|
||||
bool forceComplete;
|
||||
|
||||
|
||||
@ -788,6 +788,17 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
int xs = gEvent->getPropertyInt("xsize", max(850, min<int>(int(rc.right)-yp, (rc.right*9)/10)));
|
||||
int ys = gEvent->getPropertyInt("ysize", max(650, min<int>(int(rc.bottom)-yp-40, (rc.bottom*8)/10)));
|
||||
|
||||
if ((xp + xs > rc.right)
|
||||
|| xp < rc.left
|
||||
|| yp + ys > rc.bottom
|
||||
|| yp < rc.top)
|
||||
{
|
||||
// out of bounds, just use default position and size
|
||||
xp = 50;
|
||||
yp = 20;
|
||||
xs = max(850, min<int>(int(rc.right) - yp, (rc.right * 9) / 10));
|
||||
ys = max(650, min<int>(int(rc.bottom) - yp - 40, (rc.bottom * 8) / 10));
|
||||
}
|
||||
gEvent->setProperty("ypos", yp + 16);
|
||||
gEvent->setProperty("xpos", xp + 32);
|
||||
gEvent->saveProperties(settings); // For other instance starting while running
|
||||
|
||||
1
code/untranslated.txt
Normal file
1
code/untranslated.txt
Normal file
@ -0,0 +1 @@
|
||||
Patrol result = Patrol result
|
||||
Loading…
Reference in New Issue
Block a user