mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 16:52:45 +03:00
Compare commits
No commits in common. "c4077daa3f7eab3d7c9f0667b348f7424c39222e" and "61b05eb3664b1c8427aba8f1f05b3dabf987c08d" have entirely different histories.
c4077daa3f
...
61b05eb366
@ -522,6 +522,36 @@ int32_t Script_IsScanDLLFinished(lua_State* L) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsWindowsClient(lua_State* L) {
|
||||||
|
#if defined(WHOA_SYSTEM_WIN)
|
||||||
|
lua_pushnumber(L, 1.0);
|
||||||
|
#else
|
||||||
|
lua_pushnil(L);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsMacClient(lua_State* L) {
|
||||||
|
#if defined(WHOA_SYSTEM_MAC)
|
||||||
|
lua_pushnumber(L, 1.0);
|
||||||
|
#else
|
||||||
|
lua_pushnil(L);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsLinuxClient(lua_State* L) {
|
||||||
|
#if defined(WHOA_SYSTEM_LINUX)
|
||||||
|
lua_pushnumber(L, 1.0);
|
||||||
|
#else
|
||||||
|
lua_pushnil(L);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int32_t Script_SetRealmSplitState(lua_State* L) {
|
int32_t Script_SetRealmSplitState(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
WHOA_UNIMPLEMENTED(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,33 +6,3 @@
|
|||||||
int32_t Script_GetAccountExpansionLevel(lua_State* L) {
|
int32_t Script_GetAccountExpansionLevel(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
WHOA_UNIMPLEMENTED(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Script_IsLinuxClient(lua_State* L) {
|
|
||||||
#if defined(WHOA_SYSTEM_LINUX)
|
|
||||||
lua_pushnumber(L, 1.0);
|
|
||||||
#else
|
|
||||||
lua_pushnil(L);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t Script_IsMacClient(lua_State* L) {
|
|
||||||
#if defined(WHOA_SYSTEM_MAC)
|
|
||||||
lua_pushnumber(L, 1.0);
|
|
||||||
#else
|
|
||||||
lua_pushnil(L);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t Script_IsWindowsClient(lua_State* L) {
|
|
||||||
#if defined(WHOA_SYSTEM_WIN)
|
|
||||||
lua_pushnumber(L, 1.0);
|
|
||||||
#else
|
|
||||||
lua_pushnil(L);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -6,10 +6,4 @@
|
|||||||
|
|
||||||
int32_t Script_GetAccountExpansionLevel(lua_State* L);
|
int32_t Script_GetAccountExpansionLevel(lua_State* L);
|
||||||
|
|
||||||
int32_t Script_IsLinuxClient(lua_State* L);
|
|
||||||
|
|
||||||
int32_t Script_IsMacClient(lua_State* L);
|
|
||||||
|
|
||||||
int32_t Script_IsWindowsClient(lua_State* L);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -4,7 +4,6 @@
|
|||||||
#include "ui/Key.hpp"
|
#include "ui/Key.hpp"
|
||||||
#include "ui/game/CGWorldFrame.hpp"
|
#include "ui/game/CGWorldFrame.hpp"
|
||||||
#include "ui/game/GMTicketInfoScript.hpp"
|
#include "ui/game/GMTicketInfoScript.hpp"
|
||||||
#include "ui/game/GameScript.hpp"
|
|
||||||
#include "ui/game/ScriptEvents.hpp"
|
#include "ui/game/ScriptEvents.hpp"
|
||||||
#include "ui/simple/CSimpleTop.hpp"
|
#include "ui/simple/CSimpleTop.hpp"
|
||||||
#include "util/CStatus.hpp"
|
#include "util/CStatus.hpp"
|
||||||
@ -15,10 +14,6 @@ CSimpleTop* CGGameUI::s_simpleTop;
|
|||||||
void LoadScriptFunctions() {
|
void LoadScriptFunctions() {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
GameScriptRegisterFunctions();
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
|
|
||||||
ScriptEventsRegisterFunctions();
|
ScriptEventsRegisterFunctions();
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,6 +0,0 @@
|
|||||||
#ifndef UI_GAME_GAME_SCRIPT_HPP
|
|
||||||
#define UI_GAME_GAME_SCRIPT_HPP
|
|
||||||
|
|
||||||
void GameScriptRegisterFunctions();
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -73,16 +73,7 @@ int32_t CSimpleFontString_Hide(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleFontString_IsVisible(lua_State* L) {
|
int32_t CSimpleFontString_IsVisible(lua_State* L) {
|
||||||
auto type = CSimpleFontString::GetObjectType();
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto string = static_cast<CSimpleFontString*>(FrameScript_GetObjectThis(L, type));
|
|
||||||
|
|
||||||
if (string->IsVisible()) {
|
|
||||||
lua_pushnumber(L, 1.0);
|
|
||||||
} else {
|
|
||||||
lua_pushnil(L);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleFontString_IsShown(lua_State* L) {
|
int32_t CSimpleFontString_IsShown(lua_State* L) {
|
||||||
|
|||||||
@ -100,18 +100,6 @@ void CSimpleFrame::DisableDrawLayer(uint32_t drawlayer) {
|
|||||||
this->NotifyDrawLayerChanged(drawlayer);
|
this->NotifyDrawLayerChanged(drawlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSimpleFrame::DisableEvent(CSimpleEventType eventType) {
|
|
||||||
if (!(this->m_eventmask & (1 << eventType))) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this->m_visible) {
|
|
||||||
this->m_top->UnregisterForEvent(this, eventType, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
this->m_eventmask &= ~(1 << eventType);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CSimpleFrame::EnableDrawLayer(uint32_t drawlayer) {
|
void CSimpleFrame::EnableDrawLayer(uint32_t drawlayer) {
|
||||||
this->m_drawenabled[drawlayer] = 1;
|
this->m_drawenabled[drawlayer] = 1;
|
||||||
this->NotifyDrawLayerChanged(drawlayer);
|
this->NotifyDrawLayerChanged(drawlayer);
|
||||||
@ -1354,7 +1342,7 @@ void CSimpleFrame::SetBeingScrolled(int32_t a2, int32_t a3) {
|
|||||||
this->m_batchDirty |= 0x1F;
|
this->m_batchDirty |= 0x1F;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto child = this->m_children.Head(); child; child = this->m_children.Link(child)->Next()) {
|
for (auto child = this->m_children.Head(); child; this->m_children.Link(child)->Next()) {
|
||||||
if (!(child->frame->m_flags & 0x4000)) {
|
if (!(child->frame->m_flags & 0x4000)) {
|
||||||
child->frame->SetBeingScrolled(a2, -1);
|
child->frame->SetBeingScrolled(a2, -1);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -123,7 +123,6 @@ class CSimpleFrame : public CScriptRegion {
|
|||||||
CSimpleFrame(CSimpleFrame* parent);
|
CSimpleFrame(CSimpleFrame* parent);
|
||||||
void AddFrameRegion(CSimpleRegion* region, uint32_t drawlayer);
|
void AddFrameRegion(CSimpleRegion* region, uint32_t drawlayer);
|
||||||
void DisableDrawLayer(uint32_t drawlayer);
|
void DisableDrawLayer(uint32_t drawlayer);
|
||||||
void DisableEvent(CSimpleEventType eventType);
|
|
||||||
void EnableDrawLayer(uint32_t drawlayer);
|
void EnableDrawLayer(uint32_t drawlayer);
|
||||||
void EnableEvent(CSimpleEventType eventType, int32_t priority);
|
void EnableEvent(CSimpleEventType eventType, int32_t priority);
|
||||||
int32_t GetHitRect(CRect& rect);
|
int32_t GetHitRect(CRect& rect);
|
||||||
|
|||||||
@ -4,7 +4,6 @@
|
|||||||
#include "ui/FrameScript.hpp"
|
#include "ui/FrameScript.hpp"
|
||||||
#include "ui/simple/CSimpleFrame.hpp"
|
#include "ui/simple/CSimpleFrame.hpp"
|
||||||
#include "util/Lua.hpp"
|
#include "util/Lua.hpp"
|
||||||
#include "util/StringTo.hpp"
|
|
||||||
#include "util/Unimplemented.hpp"
|
#include "util/Unimplemented.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
@ -460,22 +459,7 @@ int32_t CSimpleFrame_IsKeyboardEnabled(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleFrame_EnableMouse(lua_State* L) {
|
int32_t CSimpleFrame_EnableMouse(lua_State* L) {
|
||||||
auto type = CSimpleFrame::GetObjectType();
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto frame = static_cast<CSimpleFrame*>(FrameScript_GetObjectThis(L, type));
|
|
||||||
|
|
||||||
if (!frame->ProtectedFunctionsAllowed()) {
|
|
||||||
// TODO disallowed logic
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StringToBOOL(L, 2, 1)) {
|
|
||||||
frame->EnableEvent(SIMPLE_EVENT_MOUSE, -1);
|
|
||||||
} else {
|
|
||||||
frame->DisableEvent(SIMPLE_EVENT_MOUSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleFrame_IsMouseEnabled(lua_State* L) {
|
int32_t CSimpleFrame_IsMouseEnabled(lua_State* L) {
|
||||||
|
|||||||
@ -49,10 +49,6 @@ bool CSimpleRegion::IsShown() {
|
|||||||
return this->m_shown == 1;
|
return this->m_shown == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSimpleRegion::IsVisible() {
|
|
||||||
return this->m_visible == 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CSimpleRegion::OnColorChanged(bool a2) {
|
void CSimpleRegion::OnColorChanged(bool a2) {
|
||||||
if (this->m_parent) {
|
if (this->m_parent) {
|
||||||
uint8_t effectiveAlpha = this->m_parent->m_alpha * this->m_parent->alphaBD / 255;
|
uint8_t effectiveAlpha = this->m_parent->m_alpha * this->m_parent->alphaBD / 255;
|
||||||
|
|||||||
@ -32,7 +32,6 @@ class CSimpleRegion : public CScriptRegion {
|
|||||||
void Hide();
|
void Hide();
|
||||||
void HideThis();
|
void HideThis();
|
||||||
bool IsShown();
|
bool IsShown();
|
||||||
bool IsVisible();
|
|
||||||
void OnRegionChanged();
|
void OnRegionChanged();
|
||||||
void SetVertexColor(const CImVector& color);
|
void SetVertexColor(const CImVector& color);
|
||||||
void SetVertexGradient(ORIENTATION orientation, const CImVector& minColor, const CImVector& maxColor);
|
void SetVertexGradient(ORIENTATION orientation, const CImVector& minColor, const CImVector& maxColor);
|
||||||
|
|||||||
@ -97,29 +97,11 @@ int32_t CSimpleTexture_Hide(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleTexture_IsVisible(lua_State* L) {
|
int32_t CSimpleTexture_IsVisible(lua_State* L) {
|
||||||
auto type = CSimpleTexture::GetObjectType();
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto texture = static_cast<CSimpleTexture*>(FrameScript_GetObjectThis(L, type));
|
|
||||||
|
|
||||||
if (texture->IsVisible()) {
|
|
||||||
lua_pushnumber(L, 1.0);
|
|
||||||
} else {
|
|
||||||
lua_pushnil(L);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleTexture_IsShown(lua_State* L) {
|
int32_t CSimpleTexture_IsShown(lua_State* L) {
|
||||||
auto type = CSimpleTexture::GetObjectType();
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto texture = static_cast<CSimpleTexture*>(FrameScript_GetObjectThis(L, type));
|
|
||||||
|
|
||||||
if (texture->IsShown()) {
|
|
||||||
lua_pushnumber(L, 1.0);
|
|
||||||
} else {
|
|
||||||
lua_pushnil(L);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleTexture_GetTexture(lua_State* L) {
|
int32_t CSimpleTexture_GetTexture(lua_State* L) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user