mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-08 18:36:00 +03:00
Compare commits
4 Commits
0950f7dae3
...
795c5cb3b5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
795c5cb3b5 | ||
|
|
e633127a0f | ||
|
|
78f1d095d6 | ||
|
|
148285ad01 |
@ -20,7 +20,14 @@ void* OsGuiGetWindow(int32_t type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool OsGuiIsModifierKeyDown(int32_t key) {
|
bool OsGuiIsModifierKeyDown(int32_t key) {
|
||||||
// TODO
|
switch (key) {
|
||||||
|
case 0:
|
||||||
|
return (GetKeyState(17) & 0xF000) != 0;
|
||||||
|
case 1:
|
||||||
|
return (GetKeyState(16) & 0xF000) != 0;
|
||||||
|
case 2:
|
||||||
|
return (GetKeyState(18) & 0xF000) != 0;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -671,11 +671,22 @@ int32_t OsWindowProc(void* window, uint32_t message, uintptr_t wparam, intptr_t
|
|||||||
auto keyDown = message == WM_KEYDOWN || message == WM_SYSKEYDOWN;
|
auto keyDown = message == WM_KEYDOWN || message == WM_SYSKEYDOWN;
|
||||||
|
|
||||||
if (wparam == VK_SHIFT) {
|
if (wparam == VK_SHIFT) {
|
||||||
// TODO
|
if (!keyDown) {
|
||||||
|
OsQueuePut(OS_INPUT_KEY_UP, 0, 0, 0, 0);
|
||||||
|
OsQueuePut(OS_INPUT_KEY_UP, 1, 0, 0, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint32_t scanCode = 0;
|
||||||
|
if (scanCode == 256) {
|
||||||
|
scanCode = MapVirtualKeyA(VK_RSHIFT, MAPVK_VK_TO_VSC);
|
||||||
|
}
|
||||||
|
|
||||||
|
wparam = ((lparam >> 24) & 0xFF) != scanCode ? VK_LSHIFT : VK_RSHIFT;
|
||||||
} else if (wparam == VK_CONTROL) {
|
} else if (wparam == VK_CONTROL) {
|
||||||
// TODO
|
wparam = ((lparam >> 24) & 0x01) | 0xA2;
|
||||||
} else if (wparam == VK_MENU) {
|
} else if (wparam == VK_MENU) {
|
||||||
// TODO
|
wparam = ((lparam >> 24) & 0x01) | 0xA4;
|
||||||
}
|
}
|
||||||
|
|
||||||
KEY key;
|
KEY key;
|
||||||
|
|||||||
55
src/ui/CSimpleHyperlinkButton.cpp
Normal file
55
src/ui/CSimpleHyperlinkButton.cpp
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
#include "ui/CSimpleHyperlinkButton.hpp"
|
||||||
|
#include "ui/CSimpleHyperlinkedFrame.hpp"
|
||||||
|
#include "ui/CSimpleFontString.hpp"
|
||||||
|
#include "gx/Coordinate.hpp"
|
||||||
|
#include <bc/Memory.hpp>
|
||||||
|
|
||||||
|
|
||||||
|
CSimpleHyperlinkButton::CSimpleHyperlinkButton(CSimpleHyperlinkedFrame* parent)
|
||||||
|
: CSimpleButton(parent) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleHyperlinkButton::SetHyperlink(CSimpleFontString* string, const GXUFONTHYPERLINKINFO* hyperlink) {
|
||||||
|
if (!string || !hyperlink) {
|
||||||
|
this->Hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this->m_hyperlink = static_cast<char*>(SMemReAlloc(this->m_hyperlink, hyperlink->linkLength + 1, __FILE__, __LINE__, 0));
|
||||||
|
SStrCopy(this->m_hyperlink, hyperlink->link, hyperlink->linkLength + 1);
|
||||||
|
|
||||||
|
CRect extent;
|
||||||
|
NDCToDDC(hyperlink->extent.minX, hyperlink->extent.minY, &extent.minX, &extent.minY);
|
||||||
|
NDCToDDC(hyperlink->extent.maxX, hyperlink->extent.maxY, &extent.maxX, &extent.maxY);
|
||||||
|
|
||||||
|
// TODO: switch()
|
||||||
|
|
||||||
|
this->ClearAllPoints();
|
||||||
|
this->SetPoint(
|
||||||
|
FRAMEPOINT_TOPLEFT,
|
||||||
|
string,
|
||||||
|
FRAMEPOINT_TOPLEFT,
|
||||||
|
extent.minX / this->m_layoutScale,
|
||||||
|
extent.minY / this->m_layoutScale,
|
||||||
|
1);
|
||||||
|
|
||||||
|
float width = (extent.maxX - extent.minX) / this->m_layoutScale;
|
||||||
|
float height = (extent.maxY - extent.minY) / this->m_layoutScale;
|
||||||
|
this->SetSize(width, height);
|
||||||
|
this->Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleHyperlinkButton::OnLayerCursorEnter(int32_t a2) {
|
||||||
|
auto frame = static_cast<CSimpleHyperlinkedFrame*>(this->m_parent);
|
||||||
|
frame->OnHyperlinkEnter(this->m_hyperlink, this->m_hyperlink);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleHyperlinkButton::OnLayerCursorExit(int32_t a2, int32_t a3) {
|
||||||
|
auto frame = static_cast<CSimpleHyperlinkedFrame*>(this->m_parent);
|
||||||
|
frame->OnHyperlinkLeave(this->m_hyperlink, this->m_hyperlink);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleHyperlinkButton::OnClick(const char* btn, int32_t a3) {
|
||||||
|
auto frame = static_cast<CSimpleHyperlinkedFrame*>(this->m_parent);
|
||||||
|
frame->OnHyperlinkClick(this->m_hyperlink, this->m_hyperlink, btn);
|
||||||
|
}
|
||||||
24
src/ui/CSimpleHyperlinkButton.hpp
Normal file
24
src/ui/CSimpleHyperlinkButton.hpp
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#ifndef UI_C_SIMPLE_HYPERLINK_BUTTON_HPP
|
||||||
|
#define UI_C_SIMPLE_HYPERLINK_BUTTON_HPP
|
||||||
|
|
||||||
|
#include "ui/CSimpleButton.hpp"
|
||||||
|
|
||||||
|
class CSimpleHyperlinkedFrame;
|
||||||
|
|
||||||
|
class CSimpleHyperlinkButton : public CSimpleButton {
|
||||||
|
public:
|
||||||
|
// Member functions
|
||||||
|
CSimpleHyperlinkButton(CSimpleHyperlinkedFrame* parent);
|
||||||
|
void SetHyperlink(CSimpleFontString* string, const GXUFONTHYPERLINKINFO* hyperlink);
|
||||||
|
|
||||||
|
virtual void OnLayerCursorEnter(int32_t a2);
|
||||||
|
virtual void OnLayerCursorExit(int32_t a2, int32_t a3);
|
||||||
|
virtual void OnClick(const char* btn, int32_t a3);
|
||||||
|
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
char* m_hyperlink = nullptr;
|
||||||
|
TSLink<CSimpleHyperlinkButton> m_link;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -1,5 +1,60 @@
|
|||||||
#include "ui/CSimpleHyperlinkedFrame.hpp"
|
#include "ui/CSimpleHyperlinkedFrame.hpp"
|
||||||
|
#include "util/Lua.hpp"
|
||||||
|
|
||||||
CSimpleHyperlinkedFrame::CSimpleHyperlinkedFrame(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
CSimpleHyperlinkedFrame::CSimpleHyperlinkedFrame(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FrameScript_Object::ScriptIx* CSimpleHyperlinkedFrame::GetScriptByName(const char* name, ScriptData& data) {
|
||||||
|
auto result = this->CSimpleFrame::GetScriptByName(name, data);
|
||||||
|
if (result)
|
||||||
|
return result;
|
||||||
|
|
||||||
|
if (!SStrCmpI(name, "OnHyperlinkEnter", STORM_MAX_STR)) {
|
||||||
|
data.wrapper = "return function(self,link,text) %s end";
|
||||||
|
return &this->m_onHyperlinkEnter;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!SStrCmpI(name, "OnHyperlinkLeave", STORM_MAX_STR)) {
|
||||||
|
data.wrapper = "return function(self,link,text) %s end";
|
||||||
|
return &this->m_onHyperlinkLeave;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!SStrCmpI(name, "OnHyperlinkClick", STORM_MAX_STR)) {
|
||||||
|
data.wrapper = "return function(self,link,text,button) %s end";
|
||||||
|
return &this->m_onHyperlinkClick;
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleHyperlinkedFrame::OnHyperlinkClick(const char* link, const char* text, const char* button) {
|
||||||
|
if (this->m_onHyperlinkClick.luaRef) {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
lua_pushstring(L, link);
|
||||||
|
lua_pushstring(L, text);
|
||||||
|
lua_pushstring(L, button);
|
||||||
|
|
||||||
|
this->RunScript(this->m_onHyperlinkClick, 3, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleHyperlinkedFrame::OnHyperlinkLeave(const char* link, const char* text) {
|
||||||
|
if (this->m_onHyperlinkLeave.luaRef) {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
lua_pushstring(L, link);
|
||||||
|
lua_pushstring(L, text);
|
||||||
|
|
||||||
|
this->RunScript(this->m_onHyperlinkLeave, 2, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleHyperlinkedFrame::OnHyperlinkEnter(const char* link, const char* text) {
|
||||||
|
if (this->m_onHyperlinkEnter.luaRef) {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
lua_pushstring(L, link);
|
||||||
|
lua_pushstring(L, text);
|
||||||
|
|
||||||
|
this->RunScript(this->m_onHyperlinkEnter, 2, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -7,6 +7,16 @@ class CSimpleHyperlinkedFrame : public CSimpleFrame {
|
|||||||
public:
|
public:
|
||||||
// Member functions
|
// Member functions
|
||||||
CSimpleHyperlinkedFrame(CSimpleFrame* parent);
|
CSimpleHyperlinkedFrame(CSimpleFrame* parent);
|
||||||
|
virtual ScriptIx* GetScriptByName(const char* name, ScriptData& data);
|
||||||
|
|
||||||
|
void OnHyperlinkClick(const char* a2, const char* a3, const char* a4);
|
||||||
|
void OnHyperlinkLeave(const char* a2, const char* a3);
|
||||||
|
void OnHyperlinkEnter(const char* a2, const char* a3);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
ScriptIx m_onHyperlinkEnter;
|
||||||
|
ScriptIx m_onHyperlinkLeave;
|
||||||
|
ScriptIx m_onHyperlinkClick;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
39
src/ui/CSimpleMessageScrollFrame.cpp
Normal file
39
src/ui/CSimpleMessageScrollFrame.cpp
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#include "ui/CSimpleMessageScrollFrame.hpp"
|
||||||
|
#include "ui/CSimpleMessageScrollFrameScript.hpp"
|
||||||
|
|
||||||
|
int32_t CSimpleMessageScrollFrame::s_metatable = 0;
|
||||||
|
int32_t CSimpleMessageScrollFrame::s_objectType = 0;
|
||||||
|
|
||||||
|
void CSimpleMessageScrollFrame::CreateScriptMetaTable() {
|
||||||
|
lua_State* L = FrameScript_GetContext();
|
||||||
|
int32_t ref = FrameScript_Object::CreateScriptMetaTable(L, &CSimpleMessageScrollFrame::RegisterScriptMethods);
|
||||||
|
CSimpleMessageScrollFrame::s_metatable = ref;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleMessageScrollFrame::GetObjectType() {
|
||||||
|
if (!CSimpleMessageScrollFrame::s_objectType) {
|
||||||
|
CSimpleMessageScrollFrame::s_objectType = ++FrameScript_Object::s_objectTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CSimpleMessageScrollFrame::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleMessageScrollFrame::RegisterScriptMethods(lua_State* L) {
|
||||||
|
CSimpleFrame::RegisterScriptMethods(L);
|
||||||
|
FrameScript_Object::FillScriptMethodTable(L, SimpleMessageScrollFrameMethods, NUM_SIMPLE_MESSAGE_SCROLL_FRAME_SCRIPT_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
|
CSimpleMessageScrollFrame::CSimpleMessageScrollFrame(CSimpleFrame* parent)
|
||||||
|
: CSimpleHyperlinkedFrame(parent) {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CSimpleMessageScrollFrame::IsA(int32_t type) {
|
||||||
|
return type == CSimpleMessageScrollFrame::s_objectType
|
||||||
|
|| type == CSimpleFrame::s_objectType
|
||||||
|
|| type == CScriptRegion::s_objectType
|
||||||
|
|| type == CScriptObject::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleMessageScrollFrame::GetScriptMetaTable() {
|
||||||
|
return CSimpleMessageScrollFrame::s_metatable;
|
||||||
|
}
|
||||||
25
src/ui/CSimpleMessageScrollFrame.hpp
Normal file
25
src/ui/CSimpleMessageScrollFrame.hpp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#ifndef UI_C_SIMPLE_MESSAGE_SCROLL_FRAME_HPP
|
||||||
|
#define UI_C_SIMPLE_MESSAGE_SCROLL_FRAME_HPP
|
||||||
|
|
||||||
|
#include "ui/CSimpleHyperlinkedFrame.hpp"
|
||||||
|
|
||||||
|
class CSimpleMessageScrollFrame : public CSimpleHyperlinkedFrame {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CSimpleMessageScrollFrame(CSimpleFrame* parent);
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual bool IsA(int32_t type);
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
248
src/ui/CSimpleMessageScrollFrameScript.cpp
Normal file
248
src/ui/CSimpleMessageScrollFrameScript.cpp
Normal file
@ -0,0 +1,248 @@
|
|||||||
|
#include "ui/CSimpleMessageScrollFrameScript.hpp"
|
||||||
|
#include "ui/CSimpleMessageScrollFrame.hpp"
|
||||||
|
#include "util/Lua.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
static int32_t Script_SetFontObject(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetFontObject(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetFont(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetFont(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetTextColor(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetTextColor(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetShadowColor(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetShadowColor(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetShadowOffset(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetShadowOffset(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetSpacing(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetSpacing(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetJustifyH(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetJustifyH(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetJustifyV(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetJustifyV(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_AddMessage(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetMessageInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_RemoveMessagesByAccessID(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_ScrollUp(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_ScrollDown(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_PageUp(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_PageDown(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_ScrollToTop(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_ScrollToBottom(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetScrollOffset(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_AtTop(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_AtBottom(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_UpdateColorByID(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetNumMessages(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetNumLinesDisplayed(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetCurrentScroll(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetCurrentLine(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetMaxLines(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetMaxLines(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetFading(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetFading(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetTimeVisible(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetTimeVisible(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetFadeDuration(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetFadeDuration(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_Clear(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetInsertMode(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetInsertMode(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetIndentedWordWrap(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetIndentedWordWrap(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_SetHyperlinksEnabled(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetHyperlinksEnabled(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FrameScript_Method SimpleMessageScrollFrameMethods[NUM_SIMPLE_MESSAGE_SCROLL_FRAME_SCRIPT_METHODS] = {
|
||||||
|
{ "SetFontObject", &Script_SetFontObject },
|
||||||
|
{ "GetFontObject", &Script_GetFontObject },
|
||||||
|
{ "SetFont", &Script_SetFont },
|
||||||
|
{ "GetFont", &Script_GetFont },
|
||||||
|
{ "SetTextColor", &Script_SetTextColor },
|
||||||
|
{ "GetTextColor", &Script_GetTextColor },
|
||||||
|
{ "SetShadowColor", &Script_SetShadowColor },
|
||||||
|
{ "GetShadowColor", &Script_GetShadowColor },
|
||||||
|
{ "SetShadowOffset", &Script_SetShadowOffset },
|
||||||
|
{ "GetShadowOffset", &Script_GetShadowOffset },
|
||||||
|
{ "SetSpacing", &Script_SetSpacing },
|
||||||
|
{ "GetSpacing", &Script_GetSpacing },
|
||||||
|
{ "SetJustifyH", &Script_SetJustifyH },
|
||||||
|
{ "GetJustifyH", &Script_GetJustifyH },
|
||||||
|
{ "SetJustifyV", &Script_SetJustifyV },
|
||||||
|
{ "GetJustifyV", &Script_GetJustifyV },
|
||||||
|
{ "AddMessage", &Script_AddMessage },
|
||||||
|
{ "GetMessageInfo", &Script_GetMessageInfo },
|
||||||
|
{ "RemoveMessagesByAccessID", &Script_RemoveMessagesByAccessID },
|
||||||
|
{ "ScrollUp", &Script_ScrollUp },
|
||||||
|
{ "ScrollDown", &Script_ScrollDown },
|
||||||
|
{ "PageUp", &Script_PageUp },
|
||||||
|
{ "PageDown", &Script_PageDown },
|
||||||
|
{ "ScrollToTop", &Script_ScrollToTop },
|
||||||
|
{ "ScrollToBottom", &Script_ScrollToBottom },
|
||||||
|
{ "SetScrollOffset", &Script_SetScrollOffset },
|
||||||
|
{ "AtTop", &Script_AtTop },
|
||||||
|
{ "AtBottom", &Script_AtBottom },
|
||||||
|
{ "UpdateColorByID", &Script_UpdateColorByID },
|
||||||
|
{ "GetNumMessages", &Script_GetNumMessages },
|
||||||
|
{ "GetNumLinesDisplayed", &Script_GetNumLinesDisplayed },
|
||||||
|
{ "GetCurrentScroll", &Script_GetCurrentScroll },
|
||||||
|
{ "GetCurrentLine", &Script_GetCurrentLine },
|
||||||
|
{ "GetMaxLines", &Script_GetMaxLines },
|
||||||
|
{ "SetMaxLines", &Script_SetMaxLines },
|
||||||
|
{ "SetFading", &Script_SetFading },
|
||||||
|
{ "GetFading", &Script_GetFading },
|
||||||
|
{ "SetTimeVisible", &Script_SetTimeVisible },
|
||||||
|
{ "GetTimeVisible", &Script_GetTimeVisible },
|
||||||
|
{ "SetFadeDuration", &Script_SetFadeDuration },
|
||||||
|
{ "GetFadeDuration", &Script_GetFadeDuration },
|
||||||
|
{ "Clear", &Script_Clear },
|
||||||
|
{ "SetInsertMode", &Script_SetInsertMode },
|
||||||
|
{ "GetInsertMode", &Script_GetInsertMode },
|
||||||
|
{ "SetIndentedWordWrap", &Script_SetIndentedWordWrap },
|
||||||
|
{ "GetIndentedWordWrap", &Script_GetIndentedWordWrap },
|
||||||
|
{ "SetHyperlinksEnabled", &Script_SetHyperlinksEnabled },
|
||||||
|
{ "GetHyperlinksEnabled", &Script_GetHyperlinksEnabled }
|
||||||
|
};
|
||||||
10
src/ui/CSimpleMessageScrollFrameScript.hpp
Normal file
10
src/ui/CSimpleMessageScrollFrameScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_C_SIMPLE_MESSAGE_SCROLL_FRAME_SCRIPT_HPP
|
||||||
|
#define UI_C_SIMPLE_MESSAGE_SCROLL_FRAME_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
|
||||||
|
#define NUM_SIMPLE_MESSAGE_SCROLL_FRAME_SCRIPT_METHODS 48
|
||||||
|
|
||||||
|
extern FrameScript_Method SimpleMessageScrollFrameMethods[NUM_SIMPLE_MESSAGE_SCROLL_FRAME_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -8,6 +8,7 @@
|
|||||||
#include "ui/CSimpleModel.hpp"
|
#include "ui/CSimpleModel.hpp"
|
||||||
#include "ui/CSimpleMovieFrame.hpp"
|
#include "ui/CSimpleMovieFrame.hpp"
|
||||||
#include "ui/CSimpleScrollFrame.hpp"
|
#include "ui/CSimpleScrollFrame.hpp"
|
||||||
|
#include "ui/CSimpleMessageScrollFrame.hpp"
|
||||||
#include "ui/CSimpleSlider.hpp"
|
#include "ui/CSimpleSlider.hpp"
|
||||||
#include "util/CStatus.hpp"
|
#include "util/CStatus.hpp"
|
||||||
#include "util/SFile.hpp"
|
#include "util/SFile.hpp"
|
||||||
@ -77,7 +78,8 @@ CSimpleFrame* Create_SimpleScrollFrame(CSimpleFrame* parent) {
|
|||||||
CSimpleFrame* Create_SimpleScrollingMessageFrame(CSimpleFrame* parent) {
|
CSimpleFrame* Create_SimpleScrollingMessageFrame(CSimpleFrame* parent) {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
return nullptr;
|
auto m = SMemAlloc(sizeof(CSimpleMessageScrollFrame), __FILE__, __LINE__, 0x0);
|
||||||
|
return new (m) CSimpleMessageScrollFrame(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSimpleFrame* Create_SimpleSlider(CSimpleFrame* parent) {
|
CSimpleFrame* Create_SimpleSlider(CSimpleFrame* parent) {
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
#include "ui/CSimpleScrollFrame.hpp"
|
#include "ui/CSimpleScrollFrame.hpp"
|
||||||
#include "ui/CSimpleSlider.hpp"
|
#include "ui/CSimpleSlider.hpp"
|
||||||
#include "ui/CSimpleTexture.hpp"
|
#include "ui/CSimpleTexture.hpp"
|
||||||
|
#include "ui/CSimpleMessageScrollFrame.hpp"
|
||||||
#include "ui/FrameScript.hpp"
|
#include "ui/FrameScript.hpp"
|
||||||
|
|
||||||
void CharacterCreateRegisterScriptFunctions() {
|
void CharacterCreateRegisterScriptFunctions() {
|
||||||
@ -79,7 +80,7 @@ void RegisterSimpleFrameScriptMethods() {
|
|||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
// CSimpleMessageFrame::CreateScriptMetaTable();
|
// CSimpleMessageFrame::CreateScriptMetaTable();
|
||||||
// CSimpleMessageScrollFrame::CreateScriptMetaTable();
|
CSimpleMessageScrollFrame::CreateScriptMetaTable();
|
||||||
|
|
||||||
CSimpleModel::CreateScriptMetaTable();
|
CSimpleModel::CreateScriptMetaTable();
|
||||||
CSimpleModelFFX::CreateScriptMetaTable();
|
CSimpleModelFFX::CreateScriptMetaTable();
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
#define UI_TYPES_HPP
|
#define UI_TYPES_HPP
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <tempest/Rect.hpp>
|
||||||
|
|
||||||
struct lua_State;
|
struct lua_State;
|
||||||
class CSimpleFrame;
|
class CSimpleFrame;
|
||||||
@ -103,4 +104,11 @@ struct FrameScript_Method {
|
|||||||
int32_t (*method)(lua_State*);
|
int32_t (*method)(lua_State*);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct GXUFONTHYPERLINKINFO {
|
||||||
|
CRect extent;
|
||||||
|
const char* link;
|
||||||
|
uint32_t linkLength;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user