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.
@@ -74,7 +74,18 @@
|
||||
</border>
|
||||
</node>
|
||||
</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-->
|
||||
<layout id="tpl-panel-brushes">
|
||||
<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">
|
||||
<image path="data/ui/stroke.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||
</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">
|
||||
<image path="data/ui/brushes.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||
</button-custom>
|
||||
|
||||
@@ -101,6 +101,10 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
@@ -114,6 +118,10 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
@@ -132,6 +140,10 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
@@ -145,11 +157,15 @@
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="engine\action.cpp" />
|
||||
@@ -301,6 +317,9 @@
|
||||
<ClInclude Include="libs\yoga\yoga\YGNodeList.h" />
|
||||
<ClInclude Include="libs\yoga\yoga\Yoga.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="PanoPainter.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -372,4 +372,9 @@
|
||||
<Filter>Header Files\ui</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="PanoPainter.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -6,8 +6,7 @@
|
||||
#include "image.h"
|
||||
#include "app.h"
|
||||
#include "keymap.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "../resource.h"
|
||||
|
||||
#pragma comment (lib, "opengl32.lib")
|
||||
#pragma comment (lib, "glew32.lib")
|
||||
@@ -158,7 +157,7 @@ static void SetupExceptionHandler()
|
||||
//
|
||||
// PCTSTR pszLogFileName = BT_GetLogFileName(g_iLogHandle);
|
||||
TCHAR wpath[1024];
|
||||
GetFullPathNameW(L"log.txt", 1024, wpath, nullptr);
|
||||
GetFullPathNameW(L"panopainter-log.txt", 1024, wpath, nullptr);
|
||||
BT_AddLogFile(wpath);
|
||||
|
||||
BT_SetPreErrHandler([](INT_PTR){
|
||||
@@ -166,7 +165,7 @@ static void SetupExceptionHandler()
|
||||
}, 0);
|
||||
}
|
||||
|
||||
int main()
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
PIXELFORMATDESCRIPTOR pfd;
|
||||
@@ -200,7 +199,7 @@ int main()
|
||||
RegisterClass(&wc);
|
||||
|
||||
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,
|
||||
clientRect.bottom - clientRect.top, 0, 0, hInst, 0);
|
||||
|
||||
@@ -279,6 +278,9 @@ int main()
|
||||
ShowWindow(hWnd, SW_NORMAL);
|
||||
WacomTablet::I.init(hWnd);
|
||||
|
||||
SendMessage(hWnd, WM_SETICON, ICON_SMALL,
|
||||
(LPARAM)LoadIcon(GetModuleHandle(0), MAKEINTRESOURCE(IDI_ICON1)));
|
||||
|
||||
MSG msg;
|
||||
bool running = true;
|
||||
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);
|
||||
}
|
||||
|
||||
#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