new icon and set on windows, new layout for brush preset
This commit is contained in:
BIN
PanoPainter.rc
Normal file
BIN
PanoPainter.rc
Normal file
Binary file not shown.
@@ -75,6 +75,17 @@
|
|||||||
</node>
|
</node>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
||||||
|
<!--brush-presets panel-->
|
||||||
|
<layout id="tpl-panel-brush-preset">
|
||||||
|
<node width="220" margin="0 0 10 0">
|
||||||
|
<border height="30" color=".5" align="center" justify="center">
|
||||||
|
<text text="Brush Presets" font-face="arial" font-size="11" color="1 1 1 1"/>
|
||||||
|
</border>
|
||||||
|
<border id="brushes" color=".4" pad="5" dir="row" wrap="1" flood-events="1">
|
||||||
|
</border>
|
||||||
|
</node>
|
||||||
|
</layout>
|
||||||
|
|
||||||
<!--brushes panel-->
|
<!--brushes panel-->
|
||||||
<layout id="tpl-panel-brushes">
|
<layout id="tpl-panel-brushes">
|
||||||
<node width="220" margin="0 0 10 0">
|
<node width="220" margin="0 0 10 0">
|
||||||
@@ -506,6 +517,7 @@
|
|||||||
<button-custom id="btn-stroke" width="50" height="50" margin="0 0 5 0" thickness="1" border-color=".1" pad="2">
|
<button-custom id="btn-stroke" width="50" height="50" margin="0 0 5 0" thickness="1" border-color=".1" pad="2">
|
||||||
<image path="data/ui/stroke.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
<image path="data/ui/stroke.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||||
</button-custom>
|
</button-custom>
|
||||||
|
<button id="btn-brush-preset" width="50" height="50" margin="0 0 5 0" text="Preset" thickness="1" border-color=".1" pad="2"/>
|
||||||
<button-custom id="btn-brush" width="50" height="50" margin="0 0 5 0" thickness="1" border-color=".1" pad="2">
|
<button-custom id="btn-brush" width="50" height="50" margin="0 0 5 0" thickness="1" border-color=".1" pad="2">
|
||||||
<image path="data/ui/brushes.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
<image path="data/ui/brushes.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||||
</button-custom>
|
</button-custom>
|
||||||
|
|||||||
@@ -101,6 +101,10 @@
|
|||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
</Link>
|
</Link>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Command>
|
||||||
|
</Command>
|
||||||
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -114,6 +118,10 @@
|
|||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
</Link>
|
</Link>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Command>
|
||||||
|
</Command>
|
||||||
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -132,6 +140,10 @@
|
|||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
</Link>
|
</Link>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Command>
|
||||||
|
</Command>
|
||||||
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -145,11 +157,15 @@
|
|||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
</Link>
|
</Link>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Command>
|
||||||
|
</Command>
|
||||||
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="engine\action.cpp" />
|
<ClCompile Include="engine\action.cpp" />
|
||||||
@@ -301,6 +317,9 @@
|
|||||||
<ClInclude Include="libs\yoga\yoga\YGNodeList.h" />
|
<ClInclude Include="libs\yoga\yoga\YGNodeList.h" />
|
||||||
<ClInclude Include="libs\yoga\yoga\Yoga.h" />
|
<ClInclude Include="libs\yoga\yoga\Yoga.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ResourceCompile Include="PanoPainter.rc" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
|
|||||||
@@ -372,4 +372,9 @@
|
|||||||
<Filter>Header Files\ui</Filter>
|
<Filter>Header Files\ui</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ResourceCompile Include="PanoPainter.rc">
|
||||||
|
<Filter>Resource Files</Filter>
|
||||||
|
</ResourceCompile>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -6,8 +6,7 @@
|
|||||||
#include "image.h"
|
#include "image.h"
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
|
#include "../resource.h"
|
||||||
#ifdef _WIN32
|
|
||||||
|
|
||||||
#pragma comment (lib, "opengl32.lib")
|
#pragma comment (lib, "opengl32.lib")
|
||||||
#pragma comment (lib, "glew32.lib")
|
#pragma comment (lib, "glew32.lib")
|
||||||
@@ -158,7 +157,7 @@ static void SetupExceptionHandler()
|
|||||||
//
|
//
|
||||||
// PCTSTR pszLogFileName = BT_GetLogFileName(g_iLogHandle);
|
// PCTSTR pszLogFileName = BT_GetLogFileName(g_iLogHandle);
|
||||||
TCHAR wpath[1024];
|
TCHAR wpath[1024];
|
||||||
GetFullPathNameW(L"log.txt", 1024, wpath, nullptr);
|
GetFullPathNameW(L"panopainter-log.txt", 1024, wpath, nullptr);
|
||||||
BT_AddLogFile(wpath);
|
BT_AddLogFile(wpath);
|
||||||
|
|
||||||
BT_SetPreErrHandler([](INT_PTR){
|
BT_SetPreErrHandler([](INT_PTR){
|
||||||
@@ -166,7 +165,7 @@ static void SetupExceptionHandler()
|
|||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
WNDCLASS wc;
|
WNDCLASS wc;
|
||||||
PIXELFORMATDESCRIPTOR pfd;
|
PIXELFORMATDESCRIPTOR pfd;
|
||||||
@@ -200,7 +199,7 @@ int main()
|
|||||||
RegisterClass(&wc);
|
RegisterClass(&wc);
|
||||||
|
|
||||||
AdjustWindowRect(&clientRect, WS_OVERLAPPEDWINDOW, false);
|
AdjustWindowRect(&clientRect, WS_OVERLAPPEDWINDOW, false);
|
||||||
hWnd = CreateWindow(wc.lpszClassName, L"New Engine", WS_OVERLAPPEDWINDOW,
|
hWnd = CreateWindow(wc.lpszClassName, L"PanoPainter", WS_OVERLAPPEDWINDOW,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT, clientRect.right - clientRect.left,
|
CW_USEDEFAULT, CW_USEDEFAULT, clientRect.right - clientRect.left,
|
||||||
clientRect.bottom - clientRect.top, 0, 0, hInst, 0);
|
clientRect.bottom - clientRect.top, 0, 0, hInst, 0);
|
||||||
|
|
||||||
@@ -279,6 +278,9 @@ int main()
|
|||||||
ShowWindow(hWnd, SW_NORMAL);
|
ShowWindow(hWnd, SW_NORMAL);
|
||||||
WacomTablet::I.init(hWnd);
|
WacomTablet::I.init(hWnd);
|
||||||
|
|
||||||
|
SendMessage(hWnd, WM_SETICON, ICON_SMALL,
|
||||||
|
(LPARAM)LoadIcon(GetModuleHandle(0), MAKEINTRESOURCE(IDI_ICON1)));
|
||||||
|
|
||||||
MSG msg;
|
MSG msg;
|
||||||
bool running = true;
|
bool running = true;
|
||||||
unsigned long t0 = GetTickCount();
|
unsigned long t0 = GetTickCount();
|
||||||
@@ -514,4 +516,29 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
|||||||
return DefWindowProc(hWnd, msg, wp, lp);
|
return DefWindowProc(hWnd, msg, wp, lp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
|
||||||
|
_In_ LPSTR lpCmdLine, _In_ int nShowCmd)
|
||||||
|
{
|
||||||
|
LPWSTR *szArgList{ nullptr };
|
||||||
|
int argc{ 0 };
|
||||||
|
char** argv{ nullptr };
|
||||||
|
|
||||||
|
szArgList = CommandLineToArgvW(GetCommandLine(), &argc);
|
||||||
|
if (szArgList == NULL)
|
||||||
|
{
|
||||||
|
MessageBox(NULL, L"Unable to parse command line", L"Error", MB_OK);
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
argv = new char*[argc + 1];
|
||||||
|
for (int i = 0; i < argc; i++)
|
||||||
|
{
|
||||||
|
auto len = wcslen(szArgList[i]) + 1;
|
||||||
|
argv[i] = new char[len];
|
||||||
|
wcstombs_s(nullptr, argv[i], len, szArgList[i], len);
|
||||||
|
}
|
||||||
|
|
||||||
|
LocalFree(szArgList);
|
||||||
|
|
||||||
|
return main(argc, argv);
|
||||||
|
}
|
||||||
|
|||||||
BIN
icon.png
BIN
icon.png
Binary file not shown.
|
Before Width: | Height: | Size: 229 KiB After Width: | Height: | Size: 40 KiB |
BIN
icon512.png
BIN
icon512.png
Binary file not shown.
|
Before Width: | Height: | Size: 40 KiB |
BIN
resource.h
Normal file
BIN
resource.h
Normal file
Binary file not shown.
Reference in New Issue
Block a user