Skip to content

Commit

Permalink
Merge pull request octgn#1361 from brine/test
Browse files Browse the repository at this point in the history
DefaultCardSize API missing from .1 and .2
  • Loading branch information
kellyelton committed Jan 21, 2015
2 parents c4cc140 + 4c9ff1e commit c48fee4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
20 changes: 3 additions & 17 deletions octgnFX/Octgn/Scripting/Versions/3.1.0.1.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,9 @@ def highlight(self): return _api.CardGetHighlight(self._id)
def highlight(self, value): _api.CardSetHighlight(self._id, value)
@property
def position(self): return _api.CardPosition(self._id)
@property
def size(self): return _api.CardSize(self._id)
def height(self): return _api.CardSize(self._id).Height
def width(self): return _api.CardSize(self._id).Width
def size(self): return _api.CardSize(self._id).Name
@property
def markers(self):
if self._markers == None: self._markers = Markers(self)
Expand Down Expand Up @@ -263,21 +264,6 @@ def anchor(self):
@anchor.setter
def anchor(self, anchored):
_api.CardSetAnchored(self._id,anchored)
_width = None
_height = None
@staticmethod
def _fetchSize():
size = _api.DefaultCardSize()
Card._width = size.Item1
Card._height = size.Item2
@staticmethod
def width():
if Card._width == None: Card._fetchSize()
return Card._width
@staticmethod
def height():
if Card._height == None: Card._fetchSize()
return Card._height
def delete(self):
_api.CardDelete(self._id)

Expand Down
5 changes: 0 additions & 5 deletions octgnFX/Octgn/Scripting/Versions/Script_3_1_0_1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,6 @@ public string[] CardProperties()
return Program.GameEngine.Definition.CustomProperties.Select(x => x.Name).ToArray();
}

public Tuple<int, int> CardSize()
{
return Tuple.Create(Program.GameEngine.Definition.CardSize.Width, Program.GameEngine.Definition.CardSize.Height);
}

public void CardSwitchTo(int id, string alternate)
{
var c = Card.Find(id);
Expand Down
2 changes: 1 addition & 1 deletion octgnFX/Octgn/Scripting/Versions/Script_3_1_0_2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ public string[] CardProperties()
return Program.GameEngine.Definition.CustomProperties.Select(x => x.Name).ToArray();
}

public Tuple<int, int> CardSize()
public Tuple<int, int> DefaultCardSize()
{
return Tuple.Create(Program.GameEngine.Definition.CardSize.Width, Program.GameEngine.Definition.CardSize.Height);
}
Expand Down

0 comments on commit c48fee4

Please sign in to comment.