Commit 33113981 authored by nanahira's avatar nanahira

Merge branch 'master' into another

parents 95a88eee 2608424b
......@@ -411,6 +411,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break;
}
int sel = mainGame->cbDBDecks->getSelected();
if(sel >= 0)
deckManager.LoadDeck(mainGame->cbDBDecks->getItem(sel));
prev_deck = sel;
is_modified = false;
......
......@@ -948,12 +948,13 @@ void Game::DrawSpec() {
showChat = false;
hideChatTimer--;
}
int maxChatLines = dInfo.isStarted ? 5 : 8;
for(int i = 0; i < maxChatLines; ++i) {
for(int i = 0; i < 8; ++i) {
static unsigned int chatColor[] = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff8080ff, 0xffff4040, 0xffff4040,
0xffff4040, 0xff40ff40, 0xff4040ff, 0xff40ffff, 0xffff40ff, 0xffffff40, 0xffffffff, 0xff808080, 0xff404040};
if(chatTiming[i]) {
chatTiming[i]--;
if(mainGame->dInfo.isStarted && i >= 5)
continue;
if(!showChat && i > 2)
continue;
int w = textFont->getDimension(chatMsg[i].c_str()).Width;
......
......@@ -958,18 +958,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
UpdateDeclarableCode(true);
break;
}
case EDITBOX_CHAT: {
if(mainGame->dInfo.isReplay)
break;
const wchar_t* input = mainGame->ebChatInput->getText();
if(input[0]) {
unsigned short msgbuf[256];
int len = BufferIO::CopyWStr(input, msgbuf, 256);
DuelClient::SendBufferToServer(CTOS_CHAT, msgbuf, (len + 1) * sizeof(short));
mainGame->ebChatInput->setText(L"");
}
break;
}
}
break;
}
......@@ -1776,13 +1764,17 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
s32 id = event.GUIEvent.Caller->getID();
switch(event.GUIEvent.EventType) {
case irr::gui::EGET_ELEMENT_HOVERED: {
if(event.GUIEvent.Caller->getType() == EGUIET_EDIT_BOX)
if(event.GUIEvent.Caller->getType() == EGUIET_EDIT_BOX) {
mainGame->SetCursor(event.GUIEvent.Caller->isEnabled() ? ECI_IBEAM : ECI_NORMAL);
return true;
}
break;
}
case irr::gui::EGET_ELEMENT_LEFT: {
if(event.GUIEvent.Caller->getType() == EGUIET_EDIT_BOX)
if(event.GUIEvent.Caller->getType() == EGUIET_EDIT_BOX) {
mainGame->SetCursor(ECI_NORMAL);
return true;
}
break;
}
case irr::gui::EGET_BUTTON_CLICKED: {
......@@ -1872,6 +1864,24 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
}
break;
}
case irr::gui::EGET_EDITBOX_ENTER: {
switch(id) {
case EDITBOX_CHAT: {
if(mainGame->dInfo.isReplay)
break;
const wchar_t* input = mainGame->ebChatInput->getText();
if(input[0]) {
unsigned short msgbuf[256];
int len = BufferIO::CopyWStr(input, msgbuf, 256);
DuelClient::SendBufferToServer(CTOS_CHAT, msgbuf, (len + 1) * sizeof(short));
mainGame->ebChatInput->setText(L"");
return true;
}
break;
}
}
break;
}
default: break;
}
break;
......
......@@ -27,6 +27,8 @@ void UpdateDeck() {
DuelClient::SendBufferToServer(CTOS_UPDATE_DECK, deckbuf, pdeck - deckbuf);
}
bool MenuHandler::OnEvent(const irr::SEvent& event) {
if(mainGame->dField.OnCommonEvent(event))
return false;
switch(event.EventType) {
case irr::EET_GUI_EVENT: {
irr::gui::IGUIElement* caller = event.GUIEvent.Caller;
......@@ -40,16 +42,6 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
break;
}
switch(event.GUIEvent.EventType) {
case irr::gui::EGET_ELEMENT_HOVERED: {
if(event.GUIEvent.Caller->getType() == EGUIET_EDIT_BOX)
mainGame->SetCursor(event.GUIEvent.Caller->isEnabled() ? ECI_IBEAM : ECI_NORMAL);
break;
}
case irr::gui::EGET_ELEMENT_LEFT: {
if(event.GUIEvent.Caller->getType() == EGUIET_EDIT_BOX)
mainGame->SetCursor(ECI_NORMAL);
break;
}
case irr::gui::EGET_BUTTON_CLICKED: {
if(id < 110)
soundManager.PlaySoundEffect(SOUND_MENU);
......@@ -510,49 +502,6 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
}
break;
}
case irr::gui::EGET_EDITBOX_ENTER: {
switch(id) {
case EDITBOX_CHAT: {
if(mainGame->dInfo.isReplay)
break;
const wchar_t* input = mainGame->ebChatInput->getText();
if(input[0]) {
unsigned short msgbuf[256];
if(mainGame->dInfo.isStarted) {
if(mainGame->dInfo.player_type < 7) {
if(mainGame->dInfo.isTag && (mainGame->dInfo.player_type % 2))
mainGame->AddChatMsg((wchar_t*)input, 2);
else
mainGame->AddChatMsg((wchar_t*)input, 0);
} else
mainGame->AddChatMsg((wchar_t*)input, 10);
} else
mainGame->AddChatMsg((wchar_t*)input, 7);
int len = BufferIO::CopyWStr(input, msgbuf, 256);
DuelClient::SendBufferToServer(CTOS_CHAT, msgbuf, (len + 1) * sizeof(short));
mainGame->ebChatInput->setText(L"");
}
break;
}
}
break;
}
default: break;
}
break;
}
case irr::EET_KEY_INPUT_EVENT: {
switch(event.KeyInput.Key) {
case irr::KEY_KEY_R: {
if(!event.KeyInput.PressedDown && !mainGame->HasFocus(EGUIET_EDIT_BOX))
mainGame->textFont->setTransparency(true);
break;
}
case irr::KEY_ESCAPE: {
if(!mainGame->HasFocus(EGUIET_EDIT_BOX))
mainGame->device->minimizeWindow();
break;
}
default: break;
}
break;
......
Subproject commit dd94d5d8d565fd25b07f1955d44d1e4537218e5f
Subproject commit b38256f356997ff8dc2f361f357d5193f7acf46b
Subproject commit 803af5d691b39a4a36661150dc4f957ba8f20187
Subproject commit 57e5a9c68d9abc95fda4b0fdb60b69a5d5aacce2
Open [Your ygopro folder]\system.conf with a text editor.
Change the following settings:
use_d3d = 1
use_skin = 1
To make your own skin just replace the images in this skin folder.
\ No newline at end of file
<?xml version="1.0"?>
<!-- Config file for the GUI Skin (CImageGUISkin) -->
<!-- Source border is the border width (in pixels) on the texture. -->
<!-- Dest border is the border width on the screen (also in pixels). -->
<!-- Order of elements dosn't matter -->
<!-- <NodeNames> are not case sensitive -->
<!-- attribute= ARE case sensitive -->
<!-- Texture = filename -->
<!-- SrcBorder = top,left,bottom,right -->
<!-- DstBorder = top,left,bottom,right -->
<Skin>
<Properties>
<Name data="Dark Red Phoenix" />
<Author data="sAsUk3" />
<Version data="1.0" />
<Date data="17-May-2013"/>
<Desc data="A skin that looks like Windows XP"/>
<Fallback skin="Dark Red Phoenix" />
<Font texture="fontTahoma.png" />
</Properties>
<Global guialpha="255">
<EGDC_3D_DARK_SHADOW a="255" r="255" g="255" b="255" /> --> <!-- Dark shadow for three-dimensional display elements. -->
<EGDC_3D_SHADOW a="255" r="255" g="255" b="255" /> --> <!-- Shadow color for three-dimensional display elements (for edges facing away from the light source). -->
<EGDC_3D_FACE a="255" r="255" g="255" b="255" /> --> <!-- Face color for three-dimensional display elements and for dialog box backgrounds. -->
<EGDC_3D_HIGH_LIGHT a="255" r="255" g="255" b="255" /> --> <!-- Highlight color for three-dimensional display elements (for edges facing the light source.). -->
<EGDC_3D_LIGHT a="255" r="255" g="255" b="255" /> --> <!-- Light color for three-dimensional display elements (for edges facing the light source.). -->
<EGDC_ACTIVE_BORDER a="255" r="255" g="0" b="0" /> --> <!-- Active window border. -->
<EGDC_ACTIVE_CAPTION a="255" r="255" g="255" b="255" /> --> <!-- Active window title bar text -->
<EGDC_APP_WORKSPACE a="255" r="255" g="255" b="255" /> --> <!-- Background color of multiple document interface (MDI) applications. -->
<EGDC_BUTTON_TEXT a="255" r="255" g="255" b="0" /> --> <!-- Text on a button. -->
<EGDC_GRAY_TEXT a="255" r="255" g="255" b="255" /> --> <!-- Grayed (disabled) text. -->
<EGDC_HIGH_LIGHT a="255" r="255" g="255" b="255" /> --> <!-- Item(s) selected in a control. -->
<EGDC_HIGH_LIGHT_TEXT a="255" r="255" g="255" b="255" /> --> <!-- Text of item(s) selected in a control. -->
<EGDC_INACTIVE_BORDER a="255" r="255" g="255" b="255" /> --> <!-- Inactive window border. -->
<EGDC_INACTIVE_CAPTION a="255" r="255" g="255" b="255" /> --> <!-- Inactive window caption. -->
<EGDC_TOOLTIP a="255" r="255" g="255" b="255" /> --> <!-- Tool tip text color. -->
<EGDC_TOOLTIP_BACKGROUND a="255" r="255" g="255" b="255" /> --> <!-- Tool tip background color. -->
<EGDC_SCROLLBAR a="255" r="255" g="255" b="255" /> --> <!-- Scrollbar gray area. This ONLY applies to the default scrollbar, if you want to change the colors of the graphical one, change the color attributes in the section near the bottom -->
<EGDC_WINDOW a="255" r="40" g="40" b="40" /> --> <!-- Window background. -->
<EGDC_WINDOW_SYMBOL a="255" r="255" g="255" b="255" /> --> <!-- Window symbols like on close buttons, scroll bars and check boxes. -->
<EGDC_ICON a="255" r="255" g="255" b="255" /> --> <!-- Icons in a list or tree. -->
<EGDC_ICON_HIGH_LIGHT a="255" r="255" g="255" b="255" /> --> <!-- Selected icons in a list or tree. -->
<Caption tbardistancex="2" tbardistancey="9" />
<WindowButton width="24" />
<CheckBoxColor a="255" r="33" g="161" b="33" />
</Global>
<Button texture="button.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Pressed texture="ButtonPressed.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Color r="255" g="255" b="255" a="255" />
</Pressed>
<ButtonDisabled texture="ButtonDisabled.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Color r="255" g="255" b="255" a="255" />
</ButtonDisabled>
</Button>
<MenuBar texture="MenuBar.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<MenuPane texture="MenuPane.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Color r="255" g="255" b="255" a="255" />
</MenuPane>
<MenuPressed texture="MenuPressed.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Color r="255" g="255" b="255" a="255" />
</MenuPressed>
</MenuBar>
<CheckBox texture="CheckBox.png">
<SrcBorder tlx="1" tly="1" brx="1" bry="1" />
<DstBorder tlx="1" tly="1" brx="1" bry="1" />
<CheckBoxDisabled texture="CheckBoxDisabled.png">
<SrcBorder tlx="1" tly="1" brx="1" bry="1" />
<DstBorder tlx="1" tly="1" brx="1" bry="1" />
</CheckBoxDisabled>
</CheckBox>
<ComboBox texture="sunkenpane.png">
<SrcBorder tlx="1" tly="1" brx="1" bry="1" />
<DstBorder tlx="1" tly="1" brx="1" bry="1" />
<ComboBoxDisabled texture="CheckBoxDisabled.png">
<SrcBorder tlx="1" tly="1" brx="1" bry="1" />
<DstBorder tlx="1" tly="1" brx="1" bry="1" />
</ComboBoxDisabled>
</ComboBox>
<SunkenPane texture="sunkenpane.png">
<SrcBorder tlx="10" tly="10" brx="10" bry="10" />
<DstBorder tlx="10" tly="10" brx="10" bry="10" />
</SunkenPane>
<TabControl texture="TabControl.png">
<SrcBorder tlx="10" tly="10" brx="10" bry="10" />
<DstBorder tlx="10" tly="10" brx="10" bry="10" />
<TabButton texture="TabButton.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
</TabButton>
<TabButtonPressed texture="TabButtonPressed.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
</TabButtonPressed>
</TabControl>
<Window texture="windowbg.png">
<SrcBorder tlx="25" tly="10" brx="10" bry="10" />
<DstBorder tlx="25" tly="10" brx="10" bry="10" />
</Window>
<ProgressBar texture="gauge1.png">
<SrcBorder tlx="16" tly="16" brx="16" bry="16" />
<DstBorder tlx="16" tly="16" brx="16" bry="16" />
<Color a="150" r="255" g="255" b="255"/>
<Filled texture="gauge2.png">
<SrcBorder tlx="16" tly="16" brx="16" bry="16" />
<DstBorder tlx="16" tly="16" brx="16" bry="16" />
<Color a="255" r="255" g="255" b="255" />
</Filled>
</ProgressBar>
</Skin>
<?xml version="1.0"?>
<!-- Config file for the GUI Skin (CImageGUISkin) -->
<!-- Source border is the border width (in pixels) on the texture -->
<!-- Dest border is the border width on the screen (also in pixels) -->
<!-- Order of elements dosn't matter -->
<!-- <NodeNames> are not case sensitive -->
<!-- attribute = ARE case sensitive -->
<!-- Texture = filename -->
<!-- SrcBorder = top,left,bottom,right -->
<!-- DstBorder = top,left,bottom,right -->
<Skin>
<Properties>
<Name data="YGOPro Skin" />
<Author data="calo001" />
<Version data="1.0" />
<Date data="21-Jul-2014"/>
<Desc data="A elegance skin"/>
<Fallback skin="" />
<Font texture="fontTahoma.png" />
</Properties>
<Global guialpha="255">
<EGDC_3D_DARK_SHADOW a="255" r="140" g="140" b="140" />
<EGDC_3D_SHADOW a="255" r="255" g="255" b="255" />
<EGDC_3D_FACE a="255" r="255" g="255" b="255" />
<EGDC_3D_HIGH_LIGHT a="255" r="250" g="250" b="250" />
<EGDC_3D_LIGHT a="255" r="255" g="255" b="255" />
<EGDC_ACTIVE_BORDER a="255" r="200" g="200" b="200" />
<EGDC_ACTIVE_CAPTION a="255" r="35" g="45" b="95" />
<EGDC_APP_WORKSPACE a="255" r="255" g="255" b="255" />
<EGDC_BUTTON_TEXT a="0" r="0" g="0" b="0" />
<EGDC_GRAY_TEXT a="255" r="60" g="60" b="60" />
<EGDC_HIGH_LIGHT a="0" r="0" g="0" b="0" />
<EGDC_HIGH_LIGHT_TEXT a="255" r="255" g="255" b="255" />
<EGDC_INACTIVE_BORDER a="0" r="255" g="255" b="255" />
<EGDC_INACTIVE_CAPTION a="255" r="75" g="75" b="95" />
<EGDC_TOOLTIP a="255" r="40" g="40" b="40" />
<EGDC_TOOLTIP_BACKGROUND a="150" r="70" g="190" b="240" />
<EGDC_SCROLLBAR a="255" r="200" g="200" b="200" />
<EGDC_WINDOW a="255" r="255" g="255" b="255" />
<EGDC_WINDOW_SYMBOL a="255" r="0" g="0" b="0" />
<EGDC_ICON a="255" r="45" g="70" b="135" />
<EGDC_ICON_HIGH_LIGHT a="255" r="70" g="190" b="240" />
<Caption tbardistancex="4" tbardistancey="8" />
<WindowButton width="24" />
<CheckBoxColor a="255" r="33" g="161" b="33" />
</Global>
<Button texture="button.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Pressed texture="ButtonPressed.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Color r="255" g="255" b="255" a="255" />
</Pressed>
<ButtonDisabled texture="ButtonDisabled.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Color r="255" g="255" b="255" a="255" />
</ButtonDisabled>
</Button>
<MenuBar texture="MenuBar.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<MenuPane texture="MenuPane.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Color r="255" g="255" b="255" a="255" />
</MenuPane>
<MenuPressed texture="MenuPressed.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Color r="255" g="255" b="255" a="255" />
</MenuPressed>
</MenuBar>
<CheckBox texture="CheckBox.png">
<SrcBorder tlx="1" tly="1" brx="1" bry="1" />
<DstBorder tlx="1" tly="1" brx="1" bry="1" />
<CheckBoxDisabled texture="CheckBoxDisabled.png">
<SrcBorder tlx="1" tly="1" brx="1" bry="1" />
<DstBorder tlx="1" tly="1" brx="1" bry="1" />
</CheckBoxDisabled>
</CheckBox>
<ComboBox texture="ComboBox.png">
<SrcBorder tlx="1" tly="1" brx="1" bry="1" />
<DstBorder tlx="1" tly="1" brx="1" bry="1" />
<ComboBoxDisabled texture="ComboBoxDisabled.png">
<SrcBorder tlx="1" tly="1" brx="1" bry="1" />
<DstBorder tlx="1" tly="1" brx="1" bry="1" />
</ComboBoxDisabled>
</ComboBox>
<SunkenPane texture="sunkenpane.png">
<SrcBorder tlx="10" tly="10" brx="10" bry="10" />
<DstBorder tlx="10" tly="10" brx="10" bry="10" />
</SunkenPane>
<TabControl texture="TabControl.png">
<SrcBorder tlx="10" tly="10" brx="10" bry="10" />
<DstBorder tlx="10" tly="10" brx="10" bry="10" />
<TabButton texture="TabButton.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
</TabButton>
<TabButtonPressed texture="TabButtonPressed.png">
<SrcBorder tlx="10" tly="10" brx="10" bry="10" />
<DstBorder tlx="10" tly="10" brx="10" bry="10" />
</TabButtonPressed>
</TabControl>
<Window texture="windowbg.png">
<SrcBorder tlx="25" tly="5" brx="5" bry="1" />
<DstBorder tlx="25" tly="5" brx="5" bry="1" />
</Window>
<ProgressBar texture="gauge1.png">
<SrcBorder tlx="16" tly="16" brx="16" bry="16" />
<DstBorder tlx="16" tly="16" brx="16" bry="16" />
<Color a="150" r="255" g="255" b="255"/>
<Filled texture="gauge2.png">
<SrcBorder tlx="16" tly="16" brx="16" bry="16" />
<DstBorder tlx="16" tly="16" brx="16" bry="16" />
<Color a="255" r="255" g="255" b="255" />
</Filled>
</ProgressBar>
</Skin>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment