C# Класс Sphere_Editor.EditorComponents.MapEditorControl

Наследование: System.Windows.Forms.UserControl
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
Autoset AutosetEditor
Entities List
EntityStatusLabel System.Windows.Forms.ToolStripStatusLabel
Layers List
TileStatusLabel System.Windows.Forms.ToolStripStatusLabel
Tileset TilesetControl
zone_brush System.Drawing.Brush
zone_pen System.Drawing.Pen

Открытые методы

Метод Описание
AddLayer ( string name ) : Layer

Adds a blank layer to the map

AddLayer ( BinaryReader stream ) : void

Adds a Layer from a stream object. In this case a Binary Reader.

DoAllLayerAdjustment ( int startIndex, short count ) : void

Handles adjustment of tile insertion and deletion.

LoadMap ( string filename ) : void
MapEditorControl ( ) : System
RedoAction ( ) : void

Restores the next stored layer and ests the current undo position.

RemoveLayer ( short index ) : void

Removes a layer from the map.

ResizeAllLayers ( short width, short height ) : void
SaveMap ( string filename ) : bool
SetLayerTile ( int x, int y ) : void
SetSize ( int width, int height ) : void

Sets the size of the drawing portion of the map:

SetStampMap ( short indicies, int map_w, int map_h ) : void
SetTileSize ( short width, short height ) : void
SetTileSize ( short width, short height, bool rescale ) : void
SetZoomLevel ( int num ) : void

Set's the zoom of the map.

UndoAction ( ) : void

Draws the previously stored layer set and sets the current undo position.

UpdateAllLayers ( ) : void

Forces all layers to "redraw" and draws them to screen.

UpdateControl ( ) : void

Positions the object in the middle of its container. Also toggles scrollbars where apropriate.

UpdateScrollbars ( ) : void

Защищенные методы

Метод Описание
OnScroll ( ScrollEventArgs se ) : void
ScrollToControl ( Control activeControl ) : Point

Приватные методы

Метод Описание
CheckFloodPoint ( Stack points, int x, int y, int old_index ) : void
CloneAllLayers ( ) : List

Returns a shallow clone of the layers.

CopyEntityItem_Click ( object sender, EventArgs e ) : void
DeleteEntityItem_Click ( object sender, EventArgs e ) : void
DoAutoStamp ( int cx, int cy ) : void
DoTool ( ) : void
DrawEntities ( Graphics g ) : void
DrawTileLine ( int x0, int y0, int x1, int y1 ) : void
DrawTileSelector ( Graphics g, Pen pen, int mid_x, int mid_y ) : void
DrawTool ( Graphics g ) : void
EditEntityItem_Click ( object sender, EventArgs e ) : void
FloodTiles ( int x, int y ) : void

Implemented using a virtual stack, rather than by recursion.

GetEntityAt ( int x, int y ) : System.Entity
InvalidateSelectorArea ( ) : void
LayerSubItemClick ( object sender, EventArgs e ) : void
MapContextStrip_Opened ( object sender, EventArgs e ) : void
MapEditorControl_Enter ( object sender, EventArgs e ) : void
MapEditorControl_KeyDown ( object sender, KeyEventArgs e ) : void
MapEditorControl_KeyUp ( object sender, KeyEventArgs e ) : void
MapEditorControl_Leave ( object sender, EventArgs e ) : void
MapEditorControl_MouseDown ( object sender, MouseEventArgs e ) : void
MapEditorControl_MouseLeave ( object sender, EventArgs e ) : void
MapEditorControl_MouseMove ( object sender, MouseEventArgs e ) : void
MapEditorControl_MouseUp ( object sender, MouseEventArgs e ) : void
MapEditorControl_Paint ( object sender, PaintEventArgs e ) : void
PasteEntityItem_Click ( object sender, EventArgs e ) : void
PersonItem_Click ( object sender, EventArgs e ) : void
ResetHistory ( ) : void

Cheap reset of the undo chain. Sorry, I'm lazy to not make something More beneficial. Something that restores destroyed layers.

SelectTileItem_Click ( object sender, EventArgs e ) : void
StampMap ( ) : void
StartLocationItem_Click ( object sender, EventArgs e ) : void
TriggerItem_Click ( object sender, EventArgs e ) : void
UpdateControlSize ( ) : void
UpdateCurrentLayer ( ) : void

"Redraws" the current layer image, but does not draw it to screen.

myzone_Deleted ( object sender, EventArgs e ) : void

Описание методов

AddLayer() публичный Метод

Adds a blank layer to the map
public AddLayer ( string name ) : Layer
name string The name of the layer
Результат Layer

AddLayer() публичный Метод

Adds a Layer from a stream object. In this case a Binary Reader.
public AddLayer ( BinaryReader stream ) : void
stream System.IO.BinaryReader The stream in which to extrapolate the layer data from
Результат void

DoAllLayerAdjustment() публичный Метод

Handles adjustment of tile insertion and deletion.
public DoAllLayerAdjustment ( int startIndex, short count ) : void
startIndex int The index to begin modifying.
count short The amount to modify by, either + or -.
Результат void

LoadMap() публичный Метод

public LoadMap ( string filename ) : void
filename string
Результат void

MapEditorControl() публичный Метод

public MapEditorControl ( ) : System
Результат System

OnScroll() защищенный Метод

protected OnScroll ( ScrollEventArgs se ) : void
se System.Windows.Forms.ScrollEventArgs
Результат void

RedoAction() публичный Метод

Restores the next stored layer and ests the current undo position.
public RedoAction ( ) : void
Результат void

RemoveLayer() публичный Метод

Removes a layer from the map.
public RemoveLayer ( short index ) : void
index short Index number of layer to remove.
Результат void

ResizeAllLayers() публичный Метод

public ResizeAllLayers ( short width, short height ) : void
width short
height short
Результат void

SaveMap() публичный Метод

public SaveMap ( string filename ) : bool
filename string
Результат bool

ScrollToControl() защищенный Метод

protected ScrollToControl ( Control activeControl ) : Point
activeControl System.Windows.Forms.Control
Результат Point

SetLayerTile() публичный Метод

public SetLayerTile ( int x, int y ) : void
x int
y int
Результат void

SetSize() публичный Метод

Sets the size of the drawing portion of the map:
public SetSize ( int width, int height ) : void
width int width in tiles
height int height in tiles
Результат void

SetStampMap() публичный Метод

public SetStampMap ( short indicies, int map_w, int map_h ) : void
indicies short
map_w int
map_h int
Результат void

SetTileSize() публичный Метод

public SetTileSize ( short width, short height ) : void
width short
height short
Результат void

SetTileSize() публичный Метод

public SetTileSize ( short width, short height, bool rescale ) : void
width short
height short
rescale bool
Результат void

SetZoomLevel() публичный Метод

Set's the zoom of the map.
public SetZoomLevel ( int num ) : void
num int The level of zoom.
Результат void

UndoAction() публичный Метод

Draws the previously stored layer set and sets the current undo position.
public UndoAction ( ) : void
Результат void

UpdateAllLayers() публичный Метод

Forces all layers to "redraw" and draws them to screen.
public UpdateAllLayers ( ) : void
Результат void

UpdateControl() публичный Метод

Positions the object in the middle of its container. Also toggles scrollbars where apropriate.
public UpdateControl ( ) : void
Результат void

UpdateScrollbars() публичный Метод

public UpdateScrollbars ( ) : void
Результат void

Описание свойств

Autoset публичное свойство

public AutosetEditor Autoset
Результат AutosetEditor

Entities публичное свойство

public List Entities
Результат List

EntityStatusLabel публичное свойство

public ToolStripStatusLabel,System.Windows.Forms EntityStatusLabel
Результат System.Windows.Forms.ToolStripStatusLabel

Layers публичное свойство

public List Layers
Результат List

TileStatusLabel публичное свойство

public ToolStripStatusLabel,System.Windows.Forms TileStatusLabel
Результат System.Windows.Forms.ToolStripStatusLabel

Tileset публичное свойство

public TilesetControl,Sphere_Editor.EditorComponents Tileset
Результат TilesetControl

zone_brush публичное статическое свойство

public static Brush,System.Drawing zone_brush
Результат System.Drawing.Brush

zone_pen публичное статическое свойство

public static Pen,System.Drawing zone_pen
Результат System.Drawing.Pen