Added constructors to STheme* for copying.

This commit is contained in:
Florian Küpper committed 2014-09-10 11:17:36 +02:00
1 parent cea276090d
commit 9cca49745a
13 files changed
+246 -25

No files matched your search

+29 -1
View File
@@ -40,6 +40,16 @@ namespace VocaluxeLib.Menu
public string TextureTileSelectedName;
[XmlElement("Tiles")]
public SThemeNameSelectionTiles Tiles;
public SThemeNameSelection(SThemeNameSelection theme)
{
Name = theme.Name;
Rect = new SRectF(theme.Rect);
TextureEmptyTileName = theme.TextureEmptyTileName;
ColorEmptyTile = new SThemeColor(theme.ColorEmptyTile);
TextureTileSelectedName = theme.TextureTileSelectedName;
Tiles = new SThemeNameSelectionTiles(theme.Tiles);
}
}
public struct SThemeNameSelectionTiles
@@ -54,6 +64,15 @@ namespace VocaluxeLib.Menu
public int NumH;
[XmlElement("Name")]
public SThemeNameSelectionName Name;
public SThemeNameSelectionTiles(SThemeNameSelectionTiles theme)
{
W = theme.W;
H = theme.H;
NumW = theme.NumW;
NumH = theme.NumH;
Name = new SThemeNameSelectionName(theme.Name);
}
}
public struct SThemeNameSelectionName
@@ -68,6 +87,15 @@ namespace VocaluxeLib.Menu
public EStyle Style;
[XmlElement("Color")]
public SThemeColor Color;
public SThemeNameSelectionName(SThemeNameSelectionName theme)
{
Space = theme.Space;
Height = theme.Height;
Font = theme.Font;
Style = theme.Style;
Color = new SThemeColor(theme.Color);
}
}
public class CNameSelection : IMenuElement
@@ -609,7 +637,7 @@ namespace VocaluxeLib.Menu
public SThemeNameSelection GetTheme()
{
return _Theme;
return new SThemeNameSelection(_Theme);
}
#region ThemeEdit