-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
82 changed files
with
582 additions
and
690 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<openBVE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<RoutePatches> | ||
<!-- Jasło - Mierzwice route --> | ||
<Patch> | ||
<Hash>7802444DAA75DD1B109FE04032FC52FE069F0B25CD54B24CFB2F6651A481F8E3</Hash> | ||
<FileName>VIRTUAL2.rw</FileName> | ||
<AccurateObjectDisposal>true</AccurateObjectDisposal> | ||
<ReducedColorTransparency>true</ReducedColorTransparency> | ||
</Patch> | ||
<!-- Koduchy - Mumole route --> | ||
<Patch> | ||
<Hash>A706EB6A6C7E4394FFD876666FE48365E36AC7156C24F883BF51E4457F1296D0</Hash> | ||
<FileName>POC_os.rw</FileName> | ||
<AccurateObjectDisposal>true</AccurateObjectDisposal> | ||
<ReducedColorTransparency>true</ReducedColorTransparency> | ||
</Patch> | ||
<Patch> | ||
<Hash>ED3AADB683C0FE44CBC7AFD46F20F057909E2E73FF4C10E68D2ECA7B354AAC7C</Hash> | ||
<FileName>POC_osp.rw</FileName> | ||
<AccurateObjectDisposal>true</AccurateObjectDisposal> | ||
<ReducedColorTransparency>true</ReducedColorTransparency> | ||
</Patch> | ||
<!-- Leszno-Krotoszyn --> | ||
<Patch> | ||
<Hash>1C600BA5074BF9C8B3E1BD045E544C123C919EAA82E676E04EBFBDAE971B0A03</Hash> | ||
<FileName>Leszno-Krotoszyn.csv</FileName> | ||
<AccurateObjectDisposal>true</AccurateObjectDisposal> | ||
<ReducedColorTransparency>true</ReducedColorTransparency> | ||
</Patch> | ||
</RoutePatches> | ||
</openBVE> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using LibRender2.Text; | ||
using OpenBveApi.Colors; | ||
using OpenBveApi.Graphics; | ||
|
||
namespace LibRender2.Primitives | ||
{ | ||
public class Button : GLControl | ||
{ | ||
/// <summary>The text displayed on the button</summary> | ||
public string Text; | ||
/// <summary>The highlight color of the button</summary> | ||
public Color128 HighlightColor; | ||
/// <summary>The color of the text on the button</summary> | ||
public Color128 TextColor; | ||
/// <summary>The font for the button</summary> | ||
public OpenGlFont Font; | ||
|
||
public Button(BaseRenderer renderer) : base(renderer) | ||
{ | ||
} | ||
|
||
public override void Draw() | ||
{ | ||
Renderer.Rectangle.Draw(Texture, Location, Size, BackgroundColor); | ||
if (CurrentlySelected) | ||
{ | ||
Renderer.Rectangle.Draw(Texture, Location + 4, Size - 2, HighlightColor); | ||
} | ||
Renderer.OpenGlString.Draw(Font, Text, Location, TextAlignment.CenterLeft, TextColor); | ||
} | ||
|
||
public override void MouseMove(int x, int y) | ||
{ | ||
if (x > Location.X && x < Location.X + Size.X && y > Location.Y && y < Location.Y + Size.Y) | ||
{ | ||
CurrentlySelected = true; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using OpenBveApi.Colors; | ||
using OpenBveApi.Math; | ||
using OpenBveApi.Textures; | ||
|
||
namespace LibRender2.Primitives | ||
{ | ||
/// <summary>An abstract OpenGL based control</summary> | ||
public abstract class GLControl | ||
{ | ||
/// <summary>Holds a reference to the base renderer</summary> | ||
internal readonly BaseRenderer Renderer; | ||
/// <summary>The background color for the control</summary> | ||
public Color128 BackgroundColor; | ||
/// <summary>The texture for the control</summary> | ||
public Texture Texture; | ||
/// <summary>The stored location for the control</summary> | ||
public Vector2 Location; | ||
/// <summary>The stored size for the control</summary> | ||
public Vector2 Size; | ||
/// <summary>Whether the control is currently selected by the mouse</summary> | ||
public bool CurrentlySelected; | ||
|
||
protected GLControl(BaseRenderer renderer) | ||
{ | ||
Renderer = renderer; | ||
} | ||
|
||
/// <summary>Draws the control</summary> | ||
public abstract void Draw(); | ||
|
||
/// <summary>Passes a mouse move event to the control</summary> | ||
/// <param name="x">The absolute screen X co-ordinate</param> | ||
/// <param name="y">The absolute screen Y co-ordinate</param> | ||
public virtual void MouseMove(int x, int y) | ||
{ | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.