Worklog for Zakk
MS Paint Clone
Return to Worklogs
| ||
| I've finally moved to BlitzMax, so most of my BB code will have to be discarded. -------------------- <XtiaeN>: i wear my rollerblades while i hack games, for quick getaways |
| ||
|
The goal with this project is to more-or-less reproduce most of the
functions of MS Paint with a similiar interface and a few added tools
and such. So far I've just reproduced the basic window layout and the
menu structure. Thanks to Leadwerks for answering my question about menu
seperators before I could ask it :) http://www.blitzbasic.com/Community/posts.php?topic=29528 (I'm picky about the details) Global window=CreateWindow("My Paint",0,0,GraphicsWidth(),GraphicsHeight(),0,15)
MaximizeWindow window
Global menu=WindowMenu(window)
Global file=CreateMenu("File",1,menu)
CreateMenu "New",11,file
CreateMenu "Open...",12,file
CreateMenu "Save",13,file
CreateMenu "Save As...",14,file
CreateMenu "",0,file
CreateMenu "Exit",15,file
Global edit=CreateMenu("Edit",2,menu)
CreateMenu "Undo",21,edit
CreateMenu "Redo",22,edit
CreateMenu "",0,file
CreateMenu "Cut",23,edit
CreateMenu "Copy",24,edit
CreateMenu "Paste",25,edit
CreateMenu "Clear Selection",26,edit
CreateMenu "Invert Selection",27,edit
CreateMenu "Select All",28,edit
Global view=CreateMenu("View",3,menu)
Global zoom=CreateMenu("Zoom",31,view)
Global custom=CreateMenu("Custom",311,zoom)
Dim zoomlevel(7)
zoomlevel(0)=CreateMenu("12.5%",3111,custom)
For n=0 To 5
num=Int(25*(2^n))
zoomlevel(n+1)=CreateMenu(num+"%",3112+n,custom)
Next
CheckMenu zoomlevel(3)
CreateMenu "",0,zoom
CreateMenu "Show Grid",312,zoom
Global image=CreateMenu("Image",4,menu)
CreateMenu "Flip/Rotate...",41,image
CreateMenu "Resize/Skew...",42,image
CreateMenu "Crop",43,image
CreateMenu "Invert Colors",44,image
CreateMenu "Attributes...",45,image
CreateMenu "Clear Image",46,image
CreateMenu "Draw Opaque",47,image
Global colors=CreateMenu("Colors",5,menu)
CreateMenu "Edit Colors...",51,colors
UpdateWindowMenu window
Global workspace=CreatePanel(56,49,1310,626,window,1)
SetPanelColor workspace,192,192,192
Repeat
id=WaitEvent()
Select id
Case $401
Case $101
Case $803
Quit()
End Select
Forever
Function Quit()
FreeGadget window
End
End Function
-------------------- <XtiaeN>: i wear my rollerblades while i hack games, for quick getaways |