Skip to content

Commit

Permalink
Add first paint brush toolbox button
Browse files Browse the repository at this point in the history
Lots left to do before this button actually does anything, but I gotta
start somewhere
  • Loading branch information
tannerhelland committed Sep 24, 2015
1 parent 1cbbb5d commit f1a820e
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 56 deletions.
138 changes: 82 additions & 56 deletions Forms/Toolbar_ToolSelect.frm
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Begin VB.Form toolbar_Toolbox
Left = 120
Top = 30
Width = 2175
_extentx = 450
_extenty = 503
caption = "file"
_ExtentX = 450
_ExtentY = 503
Caption = "file"
End
Begin PhotoDemon.pdButtonToolbox cmdTools
Height = 600
Expand All @@ -42,8 +42,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 1
Top = 2880
Width = 720
_extentx = 1085
_extenty = 1085
_ExtentX = 1085
_ExtentY = 1085
End
Begin PhotoDemon.pdButtonToolbox cmdTools
Height = 600
Expand All @@ -52,8 +52,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 2
Top = 2880
Width = 720
_extentx = 1270
_extenty = 1058
_ExtentX = 1270
_ExtentY = 1058
End
Begin PhotoDemon.pdButtonToolbox cmdTools
Height = 600
Expand All @@ -62,8 +62,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 3
Top = 2880
Width = 720
_extentx = 1270
_extenty = 1058
_ExtentX = 1270
_ExtentY = 1058
End
Begin PhotoDemon.pdButtonToolbox cmdTools
Height = 600
Expand All @@ -72,8 +72,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 4
Top = 3840
Width = 720
_extentx = 1270
_extenty = 1058
_ExtentX = 1270
_ExtentY = 1058
End
Begin PhotoDemon.pdButtonToolbox cmdTools
Height = 600
Expand All @@ -82,8 +82,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 5
Top = 3840
Width = 720
_extentx = 1270
_extenty = 1058
_ExtentX = 1270
_ExtentY = 1058
End
Begin PhotoDemon.pdButtonToolbox cmdTools
Height = 600
Expand All @@ -92,8 +92,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 6
Top = 3840
Width = 720
_extentx = 1270
_extenty = 1058
_ExtentX = 1270
_ExtentY = 1058
End
Begin PhotoDemon.pdButtonToolbox cmdTools
Height = 600
Expand All @@ -102,8 +102,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 7
Top = 4440
Width = 720
_extentx = 1270
_extenty = 1058
_ExtentX = 1270
_ExtentY = 1058
End
Begin PhotoDemon.pdButtonToolbox cmdTools
Height = 600
Expand All @@ -112,8 +112,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 8
Top = 4440
Width = 720
_extentx = 1270
_extenty = 1058
_ExtentX = 1270
_ExtentY = 1058
End
Begin PhotoDemon.pdButtonToolbox cmdTools
Height = 600
Expand All @@ -122,38 +122,38 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 9
Top = 4440
Width = 720
_extentx = 1270
_extenty = 1058
_ExtentX = 1270
_ExtentY = 1058
End
Begin PhotoDemon.pdLabel lblCategories
Height = 240
Index = 1
Left = 120
Top = 1620
Width = 2175
_extentx = 3836
_extenty = 503
caption = "undo"
_ExtentX = 3836
_ExtentY = 503
Caption = "undo"
End
Begin PhotoDemon.pdLabel lblCategories
Height = 240
Index = 2
Left = 120
Top = 2580
Width = 2175
_extentx = 3836
_extenty = 503
caption = "non-destructive"
_ExtentX = 3836
_ExtentY = 503
Caption = "non-destructive"
End
Begin PhotoDemon.pdLabel lblCategories
Height = 240
Index = 3
Left = 120
Top = 3540
Width = 2175
_extentx = 3836
_extenty = 503
caption = "selection"
_ExtentX = 3836
_ExtentY = 503
Caption = "selection"
End
Begin PhotoDemon.pdButtonToolbox cmdFile
Height = 600
Expand All @@ -162,8 +162,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 10
Top = 300
Width = 720
_extentx = 1085
_extenty = 1085
_ExtentX = 1085
_ExtentY = 1085
End
Begin PhotoDemon.pdButtonToolbox cmdFile
Height = 600
Expand All @@ -172,8 +172,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 11
Top = 300
Width = 720
_extentx = 1085
_extenty = 1085
_ExtentX = 1085
_ExtentY = 1085
End
Begin PhotoDemon.pdButtonToolbox cmdFile
Height = 600
Expand All @@ -182,8 +182,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 12
Top = 300
Width = 720
_extentx = 1085
_extenty = 1085
_ExtentX = 1085
_ExtentY = 1085
End
Begin PhotoDemon.pdButtonToolbox cmdFile
Height = 600
Expand All @@ -192,8 +192,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 13
Top = 960
Width = 720
_extentx = 1085
_extenty = 1085
_ExtentX = 1085
_ExtentY = 1085
End
Begin PhotoDemon.pdButtonToolbox cmdFile
Height = 600
Expand All @@ -202,8 +202,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 14
Top = 960
Width = 720
_extentx = 1085
_extenty = 1085
_ExtentX = 1085
_ExtentY = 1085
End
Begin PhotoDemon.pdButtonToolbox cmdFile
Height = 600
Expand All @@ -212,8 +212,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 15
Top = 960
Width = 720
_extentx = 1085
_extenty = 1085
_ExtentX = 1085
_ExtentY = 1085
End
Begin PhotoDemon.pdButtonToolbox cmdFile
Height = 600
Expand All @@ -222,8 +222,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 16
Top = 1920
Width = 720
_extentx = 1085
_extenty = 1085
_ExtentX = 1085
_ExtentY = 1085
End
Begin PhotoDemon.pdButtonToolbox cmdFile
Height = 600
Expand All @@ -232,8 +232,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 17
Top = 1920
Width = 720
_extentx = 1085
_extenty = 1085
_ExtentX = 1085
_ExtentY = 1085
End
Begin PhotoDemon.pdButtonToolbox cmdFile
Height = 600
Expand All @@ -242,18 +242,18 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 18
Top = 1920
Width = 720
_extentx = 1085
_extenty = 1085
_ExtentX = 1085
_ExtentY = 1085
End
Begin PhotoDemon.pdLabel lblCategories
Height = 240
Index = 4
Left = 120
Top = 5100
Width = 2175
_extentx = 3836
_extenty = 503
caption = "text"
_ExtentX = 3836
_ExtentY = 503
Caption = "text"
End
Begin PhotoDemon.pdButtonToolbox cmdTools
Height = 600
Expand All @@ -262,8 +262,8 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 19
Top = 5400
Width = 720
_extentx = 1270
_extenty = 1058
_ExtentX = 1270
_ExtentY = 1058
End
Begin PhotoDemon.pdButtonToolbox cmdTools
Height = 600
Expand All @@ -272,8 +272,28 @@ Begin VB.Form toolbar_Toolbox
TabIndex = 20
Top = 5400
Width = 720
_extentx = 1270
_extenty = 1058
_ExtentX = 1270
_ExtentY = 1058
End
Begin PhotoDemon.pdLabel lblCategories
Height = 240
Index = 5
Left = 120
Top = 6120
Width = 2175
_ExtentX = 3836
_ExtentY = 503
Caption = "paint"
End
Begin PhotoDemon.pdButtonToolbox cmdTools
Height = 600
Index = 11
Left = 120
TabIndex = 21
Top = 6480
Width = 720
_ExtentX = 1270
_ExtentY = 1058
End
Begin VB.Line lnRightSeparator
X1 = 136
Expand All @@ -300,7 +320,7 @@ Begin VB.Form toolbar_Toolbox
Height = 600
Left = 120
TabIndex = 0
Top = 6360
Top = 7200
UseMnemonic = 0 'False
Visible = 0 'False
Width = 2160
Expand Down Expand Up @@ -505,6 +525,8 @@ Private Sub Form_Load()
cmdTools(VECTOR_TEXT).AssignImage "TV_TEXT", , , 50
cmdTools(VECTOR_FANCYTEXT).AssignImage "TV_FANCYTEXT", , , 50

cmdTools(PAINT_BASICBRUSH).AssignImage "PNT_BASICBRUSH"

'Initialize a mouse handler
Set cMouseEvents = New pdInputMouse
cMouseEvents.addInputTracker Me.hWnd, True, True, , True
Expand Down Expand Up @@ -615,6 +637,10 @@ Private Sub ReflowToolboxLayout()
'Vector group
PositionToolLabel lblCategories(4), cmdTools(SELECT_WAND), hOffset, vOffset
ReflowButtonSet True, VECTOR_TEXT, VECTOR_FANCYTEXT, hOffset, vOffset

'Paint group
PositionToolLabel lblCategories(5), cmdTools(VECTOR_FANCYTEXT), hOffset, vOffset
ReflowButtonSet True, PAINT_BASICBRUSH, PAINT_BASICBRUSH, hOffset, vOffset

'Macro recording message
If vOffset < cmdTools(cmdTools.UBound).Top + cmdTools(cmdTools.UBound).Height Then
Expand Down
2 changes: 2 additions & 0 deletions Modules/VBP_PublicEnumsTypes.bas
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ Public Enum PDTools
SELECT_WAND = 8
VECTOR_TEXT = 9
VECTOR_FANCYTEXT = 10
PAINT_BASICBRUSH = 11
End Enum

#If False Then
Const NAV_DRAG = 0, NAV_MOVE = 1, QUICK_FIX_LIGHTING = 2
Const SELECT_RECT = 3, SELECT_CIRC = 4, SELECT_LINE = 5
Const SELECT_POLYGON = 6, SELECT_LASSO = 7, SELECT_WAND = 8
Const VECTOR_TEXT = 9, VECTOR_FANCYTEXT = 10
Const PAINT_BASICBRUSH = 11
#End If

'Currently supported file tools; these numbers correspond to the index of the tool's command button on the main form.
Expand Down
Binary file modified Resources/Assets/PD_icons.RES
Binary file not shown.
3 changes: 3 additions & 0 deletions Resources/Assets/PD_icons.rc
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,9 @@ T_SELWAND CUSTOM MOVEABLE LOADONCALL toolbox_select_wand_24.png
TV_TEXT CUSTOM MOVEABLE LOADONCALL toolbox_vector_text_24.png
TV_FANCYTEXT CUSTOM MOVEABLE LOADONCALL toolbox_vector_fancy_text_24.png

//Paint tool area toolbox icons
PNT_BASICBRUSH CUSTOM MOVEABLE LOADONCALL toolbox_paint_basicbrush_24.png

//Tool options area icons
TO_APPLY CUSTOM MOVEABLE LOADONCALL apply_changes.png
TEXT_BOLD CUSTOM MOVEABLE LOADONCALL text_bold_24.png
Expand Down
Binary file added Resources/Assets/toolbox_paint_basicbrush_24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Resources/PD_icons.RES
Binary file not shown.

0 comments on commit f1a820e

Please sign in to comment.