Use SpriteSheets and move server.db and server.txt to "Data" folder.
@@ -38,11 +38,19 @@ button
|
||||
line-height: 60dp;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
decorator: image(images/lce/Button/MainMenuButton_Norm.png);
|
||||
decorator: image(mainButton);
|
||||
}
|
||||
|
||||
button:hover
|
||||
{
|
||||
color: #ffff00;
|
||||
decorator: image(images/lce/Button/MainMenuButton_Over.png);
|
||||
decorator: image(mainButton_Hover);
|
||||
}
|
||||
|
||||
@spritesheet mainButton
|
||||
{
|
||||
src: "Assets/UI/images/lce/button/main-sheet.png";
|
||||
|
||||
mainButton: 0px 0px 200px 20px;
|
||||
mainButton_Hover: 0px 20px 200px 20px;
|
||||
}
|
||||
@@ -60,37 +60,37 @@ button.tab.selected
|
||||
button.tab_left
|
||||
{
|
||||
flex: 2;
|
||||
decorator: image(images/lce/LoadCreateJoinMenu/tab_left.png);
|
||||
decorator: image(tabLeft);
|
||||
}
|
||||
|
||||
button.tab_left:hover,
|
||||
button.tab_left.selected
|
||||
{
|
||||
decorator: image(images/lce/LoadCreateJoinMenu/tab_left_havon.png);
|
||||
decorator: image(tabLeft_Havon);
|
||||
}
|
||||
|
||||
button.tab_medium
|
||||
{
|
||||
flex: 2;
|
||||
decorator: image(images/lce/LoadCreateJoinMenu/tab_medium.png);
|
||||
decorator: image(tabMiddle);
|
||||
}
|
||||
|
||||
button.tab_medium:hover,
|
||||
button.tab_medium.selected
|
||||
{
|
||||
decorator: image(images/lce/LoadCreateJoinMenu/tab_medium_havon.png);
|
||||
decorator: image(tabMiddle_Havon);
|
||||
}
|
||||
|
||||
button.tab_right
|
||||
{
|
||||
flex: 2;
|
||||
decorator: image(images/lce/LoadCreateJoinMenu/tab_right.png);
|
||||
decorator: image(tabRight);
|
||||
}
|
||||
|
||||
button.tab_right:hover,
|
||||
button.tab_right.selected
|
||||
{
|
||||
decorator: image(images/lce/LoadCreateJoinMenu/tab_right_havon.png);
|
||||
decorator: image(tabRight_Havon);
|
||||
}
|
||||
|
||||
div#panel_container
|
||||
@@ -98,7 +98,7 @@ div#panel_container
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex-grow: 1;
|
||||
decorator: image(images/lce/LoadCreateJoinMenu/gui_load.png);
|
||||
decorator: image(background);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -128,23 +128,23 @@ scrollbarvertical
|
||||
scrollbarvertical sliderarrowdec
|
||||
{
|
||||
position: fixed;
|
||||
width: 48dp;
|
||||
width: 39dp;
|
||||
height: 33dp;
|
||||
right: 100dp;
|
||||
bottom: -40dp;
|
||||
cursor: pointer;
|
||||
decorator: image(images/lce/scrollUp.png);
|
||||
decorator: image(scrollUp);
|
||||
}
|
||||
|
||||
scrollbarvertical sliderarrowinc
|
||||
{
|
||||
position: fixed;
|
||||
width: 48dp;
|
||||
width: 39dp;
|
||||
height: 33dp;
|
||||
right: 58dp;
|
||||
bottom: -40dp;
|
||||
cursor: pointer;
|
||||
decorator: image(images/lce/scrollDown.png);
|
||||
decorator: image(scrollDown);
|
||||
}
|
||||
|
||||
div.list_item
|
||||
@@ -177,14 +177,14 @@ div.list_item button
|
||||
background: transparent;
|
||||
border-width: 0px;
|
||||
cursor: pointer;
|
||||
decorator: image(images/lce/button/ListButton_Norm.png);
|
||||
decorator: image(listButton);
|
||||
}
|
||||
|
||||
div.list_item button:hover,
|
||||
div.list_item button.selected
|
||||
{
|
||||
color: #ffff00;
|
||||
decorator: image(images/lce/button/ListButton_Over.png);
|
||||
decorator: image(listButton_Hover);
|
||||
}
|
||||
|
||||
div.list_item button img.thumb
|
||||
@@ -221,3 +221,39 @@ div.size_bar
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
display: none;
|
||||
}
|
||||
|
||||
@spritesheet background
|
||||
{
|
||||
src: "Assets/UI/images/lce/LoadCreateJoinMenu/background-sheet.png";
|
||||
|
||||
background: 0px 0px 1860px 1420px;
|
||||
background_None: 1860px 0px 1860px 1420px;
|
||||
}
|
||||
|
||||
@spritesheet tab
|
||||
{
|
||||
src: "Assets/UI/images/lce/LoadCreateJoinMenu/tab-sheet.png";
|
||||
|
||||
tabLeft: 0px 0px 622px 176px;
|
||||
tabLeft_Havon: 0px 176px 622px 176px;
|
||||
tabMiddle: 622px 0px 622px 176px;
|
||||
tabMiddle_Havon: 622px 176px 622px 176px;
|
||||
tabRight: 1244px 0px 622px 176px;
|
||||
tabRight_Havon: 1244px 176px 622px 176px;
|
||||
}
|
||||
|
||||
@spritesheet list
|
||||
{
|
||||
src: "Assets/UI/images/lce/button/list-sheet.png";
|
||||
|
||||
listButton: 0px 0px 200px 30px;
|
||||
listButton_Hover: 0px 30px 200px 30px;
|
||||
}
|
||||
|
||||
@spritesheet scroll
|
||||
{
|
||||
src: "Assets/UI/images/lce/scroll-sheet.png";
|
||||
|
||||
scrollUp: 0px 0px 13px 11px;
|
||||
scrollDown: 13px 0px 13px 11px;
|
||||
}
|
||||
@@ -66,16 +66,24 @@ button
|
||||
line-height: 60dp;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
decorator: image(images/lce/Button/MainMenuButton_Norm.png);
|
||||
decorator: image(mainButton);
|
||||
}
|
||||
|
||||
button:hover
|
||||
{
|
||||
color: #ffff00;
|
||||
decorator: image(images/lce/Button/MainMenuButton_Over.png);
|
||||
decorator: image(mainButton_Hover);
|
||||
}
|
||||
|
||||
button:last-child
|
||||
{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@spritesheet mainButton
|
||||
{
|
||||
src: "Assets/UI/images/lce/button/main-sheet.png";
|
||||
|
||||
mainButton: 0px 0px 200px 20px;
|
||||
mainButton_Hover: 0px 20px 200px 20px;
|
||||
}
|
||||
@@ -38,115 +38,19 @@ button
|
||||
line-height: 60dp;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
decorator: image(images/lce/Button/MainMenuButton_Norm.png);
|
||||
decorator: image(mainButton);
|
||||
}
|
||||
|
||||
button:hover
|
||||
{
|
||||
color: #ffff00;
|
||||
decorator: image(images/lce/Button/MainMenuButton_Over.png);
|
||||
decorator: image(mainButton_Hover);
|
||||
}
|
||||
|
||||
div#exit_dialog
|
||||
@spritesheet mainButton
|
||||
{
|
||||
display: none;
|
||||
width: 100%;
|
||||
margin-top: 16dp;
|
||||
text-align: left;
|
||||
padding: 24dp 32dp;
|
||||
decorator: image(images/lce/frame_MessageBox_background.png);
|
||||
}
|
||||
src: "Assets/UI/images/lce/button/main-sheet.png";
|
||||
|
||||
p#exit_text
|
||||
{
|
||||
font-effect: none;
|
||||
color: #333333;
|
||||
margin-bottom: 23dp;
|
||||
}
|
||||
|
||||
div#exit_buttons
|
||||
{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
button#exit_cancel,
|
||||
button#exit_save,
|
||||
button#exit_nosave
|
||||
{
|
||||
display: block;
|
||||
width: 600dp;
|
||||
height: 60dp;
|
||||
margin-bottom: 7.5dp;
|
||||
text-align: center;
|
||||
line-height: 60dp;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
decorator: image(images/lce/Button/MainMenuButton_Norm.png);
|
||||
}
|
||||
|
||||
button#exit_cancel:hover,
|
||||
button#exit_save:hover,
|
||||
button#exit_nosave:hover
|
||||
{
|
||||
color: #ffff00;
|
||||
decorator: image(images/lce/Button/MainMenuButton_Over.png);
|
||||
}
|
||||
|
||||
button#exit_nosave
|
||||
{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div#save_dialog
|
||||
{
|
||||
display: none;
|
||||
width: 100%;
|
||||
margin-top: 16dp;
|
||||
text-align: left;
|
||||
padding: 24dp 32dp;
|
||||
decorator: image(images/LCE/frame_MessageBox_background.png);
|
||||
}
|
||||
|
||||
p#save_text
|
||||
{
|
||||
font-effect: none;
|
||||
color: #333333;
|
||||
margin-bottom: 23dp;
|
||||
}
|
||||
|
||||
div#save_buttons
|
||||
{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
button#save_cancel,
|
||||
button#save_confirm
|
||||
{
|
||||
display: block;
|
||||
width: 600dp;
|
||||
height: 60dp;
|
||||
margin-bottom: 7.5dp;
|
||||
text-align: center;
|
||||
line-height: 60dp;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
decorator: image(images/lce/Button/MainMenuButton_Norm.png);
|
||||
}
|
||||
|
||||
button#save_cancel:hover,
|
||||
button#save_confirm:hover
|
||||
{
|
||||
color: #ffff00;
|
||||
decorator: image(images/lce/Button/MainMenuButton_Over.png);
|
||||
}
|
||||
|
||||
button#save_confirm
|
||||
{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
mainButton: 0px 0px 200px 20px;
|
||||
mainButton_Hover: 0px 20px 200px 20px;
|
||||
}
|
||||
@@ -11,21 +11,6 @@
|
||||
<button id="save_game">[IDS_SAVE_GAME]</button>
|
||||
<button id="exit_game">[IDS_EXIT_GAME]</button>
|
||||
</div>
|
||||
<div id="exit_dialog">
|
||||
<p id="exit_text">[IDS_CONFIRM_EXIT_GAME]</p>
|
||||
<div id="exit_buttons">
|
||||
<button id="exit_cancel">[IDS_CANCEL]</button>
|
||||
<button id="exit_save">[IDS_EXIT_GAME_SAVE]</button>
|
||||
<button id="exit_nosave">[IDS_EXIT_GAME_NO_SAVE]</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="save_dialog">
|
||||
<p id="save_text">[IDS_CONFIRM_SAVE_GAME]</p>
|
||||
<div id="save_buttons">
|
||||
<button id="save_cancel">[IDS_CANCEL]</button>
|
||||
<button id="save_confirm">[IDS_OK]</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</rml>
|
||||
|
||||
@@ -57,13 +57,13 @@ div#controls
|
||||
display: block;
|
||||
width: 36dp;
|
||||
height: 36dp;
|
||||
decorator: image(images/lce/Tickbox_Background.png);
|
||||
decorator: image(tickBox);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.toggle_row:hover .toggle_switch
|
||||
{
|
||||
decorator: image(images/lce/Tickbox_Over.png);
|
||||
decorator: image(tickBox_Hover);
|
||||
}
|
||||
|
||||
.toggle_row:hover .toggle_label
|
||||
@@ -75,9 +75,9 @@ div#controls
|
||||
.tick_mark
|
||||
{
|
||||
display: block;
|
||||
width: 42dp;
|
||||
width: 36dp;
|
||||
height: 36dp;
|
||||
decorator: image(images/lce/Tick.png);
|
||||
decorator: image(tick);
|
||||
}
|
||||
|
||||
.toggle_row:not(.checked) .tick_mark
|
||||
@@ -116,13 +116,13 @@ div#controls
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
border: 3dp transparent;
|
||||
decorator: image(images/lce/Slider_Background.png);
|
||||
decorator: image(sliderBackground);
|
||||
}
|
||||
|
||||
.slider_container:hover
|
||||
{
|
||||
border-color: #ffff00;
|
||||
decorator: image(images/lce/Slider_BackgroundH.png);
|
||||
decorator: image(sliderBackground_Hover);
|
||||
}
|
||||
|
||||
.slider_label
|
||||
@@ -158,3 +158,20 @@ div#controls
|
||||
cursor: resize;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
@spritesheet tickbox
|
||||
{
|
||||
src: "Assets/UI/images/lce/tickBox-sheet.png";
|
||||
|
||||
tickBox: 0px 0px 12px 12px;
|
||||
tickBox_Hover: 12px 0px 12px 12px;
|
||||
tick: 24px 0px 12px 12px;
|
||||
}
|
||||
|
||||
@spritesheet sliderBackground
|
||||
{
|
||||
src: "Assets/UI/images/lce/sliderBackground-sheet.png";
|
||||
|
||||
sliderBackground: 0px 0px 300px 16px;
|
||||
sliderBackground_Hover: 0px 16px 300px 16px;
|
||||
}
|
||||
@@ -57,13 +57,13 @@ div#controls
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
border: 3dp transparent;
|
||||
decorator: image(images/lce/Slider_Background.png);
|
||||
decorator: image(sliderBackground);
|
||||
}
|
||||
|
||||
.slider_container:hover
|
||||
{
|
||||
border-color: #ffff00;
|
||||
decorator: image(images/lce/Slider_BackgroundH.png);
|
||||
decorator: image(sliderBackground_Hover);
|
||||
}
|
||||
|
||||
.slider_label
|
||||
@@ -98,3 +98,11 @@ div#controls
|
||||
cursor: resize;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
@spritesheet sliderBackground
|
||||
{
|
||||
src: "Assets/UI/images/lce/sliderBackground-sheet.png";
|
||||
|
||||
sliderBackground: 0px 0px 300px 16px;
|
||||
sliderBackground_Hover: 0px 16px 300px 16px;
|
||||
}
|
||||
@@ -38,11 +38,19 @@ button
|
||||
line-height: 60dp;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
decorator: image(images/lce/Button/MainMenuButton_Norm.png);
|
||||
decorator: image(mainButton);
|
||||
}
|
||||
|
||||
button:hover
|
||||
{
|
||||
color: #ffff00;
|
||||
decorator: image(images/lce/Button/MainMenuButton_Over.png);
|
||||
decorator: image(mainButton_Hover);
|
||||
}
|
||||
|
||||
@spritesheet mainButton
|
||||
{
|
||||
src: "Assets/UI/images/lce/button/main-sheet.png";
|
||||
|
||||
mainButton: 0px 0px 200px 20px;
|
||||
mainButton_Hover: 0px 20px 200px 20px;
|
||||
}
|
||||
@@ -57,13 +57,13 @@ div#controls
|
||||
display: block;
|
||||
width: 36dp;
|
||||
height: 36dp;
|
||||
decorator: image(images/lce/Tickbox_Background.png);
|
||||
decorator: image(tickBox);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.toggle_row:hover .toggle_switch
|
||||
{
|
||||
decorator: image(images/lce/Tickbox_Over.png);
|
||||
decorator: image(tickBox_Hover);
|
||||
}
|
||||
|
||||
.toggle_row:hover .toggle_label
|
||||
@@ -75,9 +75,9 @@ div#controls
|
||||
.tick_mark
|
||||
{
|
||||
display: block;
|
||||
width: 42dp;
|
||||
width: 36dp;
|
||||
height: 36dp;
|
||||
decorator: image(images/lce/Tick.png);
|
||||
decorator: image(tick);
|
||||
}
|
||||
|
||||
.toggle_row:not(.checked) .tick_mark
|
||||
@@ -115,13 +115,13 @@ div#controls
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
border: 3dp transparent;
|
||||
decorator: image(images/lce/Slider_Background.png);
|
||||
decorator: image(sliderBackground);
|
||||
}
|
||||
|
||||
.slider_container:hover
|
||||
{
|
||||
border-color: #ffff00;
|
||||
decorator: image(images/lce/Slider_BackgroundH.png);
|
||||
decorator: image(sliderBackground_Hover);
|
||||
}
|
||||
|
||||
.slider_label
|
||||
@@ -157,3 +157,20 @@ div#controls
|
||||
cursor: resize;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
@spritesheet tickbox
|
||||
{
|
||||
src: "Assets/UI/images/lce/tickBox-sheet.png";
|
||||
|
||||
tickBox: 0px 0px 12px 12px;
|
||||
tickBox_Hover: 12px 0px 12px 12px;
|
||||
tick: 24px 0px 12px 12px;
|
||||
}
|
||||
|
||||
@spritesheet sliderBackground
|
||||
{
|
||||
src: "Assets/UI/images/lce/sliderBackground-sheet.png";
|
||||
|
||||
sliderBackground: 0px 0px 300px 16px;
|
||||
sliderBackground_Hover: 0px 16px 300px 16px;
|
||||
}
|
||||
|
After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 529 B |
|
Before Width: | Height: | Size: 159 B |
|
Before Width: | Height: | Size: 162 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
BIN
Minecraft.Client/Assets/UI/images/lce/button/layout-sheet.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
BIN
Minecraft.Client/Assets/UI/images/lce/button/list-sheet.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
Minecraft.Client/Assets/UI/images/lce/button/main-sheet.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 5.1 KiB |
BIN
Minecraft.Client/Assets/UI/images/lce/scroll-sheet.png
Normal file
|
After Width: | Height: | Size: 269 B |
|
Before Width: | Height: | Size: 225 B |
|
Before Width: | Height: | Size: 154 B |
|
Before Width: | Height: | Size: 142 B |
|
Before Width: | Height: | Size: 166 B |
BIN
Minecraft.Client/Assets/UI/images/lce/sliderBackground-sheet.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
Minecraft.Client/Assets/UI/images/lce/tickBox-sheet.png
Normal file
|
After Width: | Height: | Size: 264 B |
@@ -876,7 +876,7 @@ void CPlatformNetworkManagerStub::SearchForGames()
|
||||
friendsSessions[0].push_back(info);
|
||||
}
|
||||
|
||||
if (std::FILE* file = std::fopen("servers.db", "rb")) {
|
||||
if (std::FILE* file = std::fopen("Data\\servers.db", "rb")) {
|
||||
char magic[4] = {};
|
||||
if (std::fread(magic, 1, 4, file) == 4 && memcmp(magic, "MCSV", 4) == 0)
|
||||
{
|
||||
|
||||
@@ -849,7 +849,7 @@ void UIScene_JoinMenu::UpdateServerInFile(const wstring& newIP, const wstring& n
|
||||
struct ServerEntry { std::string ip; uint16_t port; std::string name; };
|
||||
std::vector<ServerEntry> entries;
|
||||
|
||||
FILE* file = fopen("servers.db", "rb");
|
||||
FILE* file = fopen("Data\\servers.db", "rb");
|
||||
if (file)
|
||||
{
|
||||
char magic[4] = {};
|
||||
@@ -888,7 +888,7 @@ void UIScene_JoinMenu::UpdateServerInFile(const wstring& newIP, const wstring& n
|
||||
entries[idx].name = std::string(narrowNewName);
|
||||
}
|
||||
|
||||
file = fopen("servers.db", "wb");
|
||||
file = fopen("Data\\servers.db", "wb");
|
||||
if (file)
|
||||
{
|
||||
fwrite("MCSV", 1, 4, file);
|
||||
@@ -916,7 +916,7 @@ void UIScene_JoinMenu::RemoveServerFromFile()
|
||||
struct ServerEntry { std::string ip; uint16_t port; std::string name; };
|
||||
std::vector<ServerEntry> entries;
|
||||
|
||||
FILE* file = fopen("servers.db", "rb");
|
||||
FILE* file = fopen("Data\\servers.db", "rb");
|
||||
if (file)
|
||||
{
|
||||
char magic[4] = {};
|
||||
@@ -953,7 +953,7 @@ void UIScene_JoinMenu::RemoveServerFromFile()
|
||||
entries.erase(entries.begin() + idx);
|
||||
}
|
||||
|
||||
file = fopen("servers.db", "wb");
|
||||
file = fopen("Data\\servers.db", "wb");
|
||||
if (file)
|
||||
{
|
||||
fwrite("MCSV", 1, 4, file);
|
||||
|
||||
@@ -1673,7 +1673,7 @@ void UIScene_LoadCreateJoinMenu::CheckAndJoinGame(int gameIndex)
|
||||
#ifdef _WINDOWS64
|
||||
{
|
||||
int serverDbCount = 0;
|
||||
FILE* dbFile = fopen("servers.db", "rb");
|
||||
FILE* dbFile = fopen("Data\\servers.db", "rb");
|
||||
if (dbFile)
|
||||
{
|
||||
char magic[4] = {};
|
||||
@@ -1867,7 +1867,7 @@ void UIScene_LoadCreateJoinMenu::BeginAddServer()
|
||||
|
||||
void UIScene_LoadCreateJoinMenu::AppendServerToFile(const wstring& ip, const wstring& port, const wstring& name)
|
||||
{
|
||||
FILE* f = fopen("servers.db", "ab");
|
||||
FILE* f = fopen("Data\\servers.db", "ab");
|
||||
if (!f) return;
|
||||
|
||||
uint32_t version = 1;
|
||||
|
||||
@@ -1190,11 +1190,11 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
MultiByteToWideChar(CP_ACP, 0, g_Win64Username, -1, g_Win64UsernameW, 17);
|
||||
|
||||
// convert servers.txt to servers.db
|
||||
if (GetFileAttributesA("servers.txt") != INVALID_FILE_ATTRIBUTES &&
|
||||
GetFileAttributesA("servers.db") == INVALID_FILE_ATTRIBUTES)
|
||||
if (GetFileAttributesA("Data\\servers.txt") != INVALID_FILE_ATTRIBUTES &&
|
||||
GetFileAttributesA("Data\\servers.db") == INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
FILE* txtFile = nullptr;
|
||||
if (fopen_s(&txtFile, "servers.txt", "r") == 0 && txtFile)
|
||||
if (fopen_s(&txtFile, "Data\\servers.txt", "r") == 0 && txtFile)
|
||||
{
|
||||
struct MigEntry { std::string ip; uint16_t port; std::string name; };
|
||||
std::vector<MigEntry> migEntries;
|
||||
@@ -1232,7 +1232,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
if (!migEntries.empty())
|
||||
{
|
||||
FILE* dbFile = nullptr;
|
||||
if (fopen_s(&dbFile, "servers.db", "wb") == 0 && dbFile)
|
||||
if (fopen_s(&dbFile, "Data\\servers.db", "wb") == 0 && dbFile)
|
||||
{
|
||||
fwrite("MCSV", 1, 4, dbFile);
|
||||
uint32_t ver = 1;
|
||||
|
||||