Need help with a piece of lua code for an addon. menu

User Tag List

Results 1 to 3 of 3
  1. #1
    gezus's Avatar Contributor
    Reputation
    143
    Join Date
    Jan 2008
    Posts
    749
    Thanks G/R
    1/0
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with a piece of lua code for an addon.

    So I have this addon for Wildstar that displays the proper time. But I am new to coding.. and I need help switching it so it displays 12 hour format rather than 24 hour format.

    require "Window"

    local LocalTime = {}

    function LocalTime:new(o)
    o = o or {}
    setmetatable(o, self)
    self.__index = self

    return o
    end

    function LocalTime:Init()
    Apollo.RegisterAddon(self, false, "", { "InterfaceMenuList" })
    end

    function LocalTime:OnLoad()
    self.menu = Apollo.GetAddon("InterfaceMenuList")
    local localOnUpdateTimer = self.menu.OnUpdateTimer
    self.menu.OnUpdateTimer = function(InterfaceMenuList)
    localOnUpdateTimer(InterfaceMenuList)
    local tTime = GameLib.GetLocalTime()
    self.menu.wndMain:FindChild("Time"):SetText(string.format("%02d:%02d", tostring(tTime.nHour), tostring(tTime.nMinute)) or "")
    end
    end



    local LocalTimeInst = LocalTime:new()
    LocalTimeInst:Init()
    Thanx in advance for the help guys.
    Teh Gez (òÓ,)_\,,/

    Need help with a piece of lua code for an addon.
  2. #2
    Xalah's Avatar Contributor CoreCoins Purchaser
    Reputation
    219
    Join Date
    May 2012
    Posts
    241
    Thanks G/R
    2/11
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try having a look here, I havent really looked too much into LUA yet but this might help
    https://docs.coronalabs.com/api/library/os/date.html

  3. #3
    gezus's Avatar Contributor
    Reputation
    143
    Join Date
    Jan 2008
    Posts
    749
    Thanks G/R
    1/0
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Xalah View Post
    Try having a look here, I havent really looked too much into LUA yet but this might help
    https://docs.coronalabs.com/api/library/os/date.html
    Looking now. ty.
    Teh Gez (òÓ,)_\,,/

Similar Threads

  1. need help with simple .bat and configuring proxycap for multiple wow.exe
    By snier in forum WoW Bots Questions & Requests
    Replies: 0
    Last Post: 02-16-2015, 04:38 AM
  2. Need help with creating a public private server for 2.4.3
    By lolwtfimacow in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 03-07-2013, 03:46 PM
  3. Need help with Mod-Editing in general [+Rep for help]
    By Flesh0209 in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 08-15-2009, 07:06 PM
  4. Need Help With using Wowme.exe-WTT +Rep for Help
    By youngboii in forum WoW ME Questions and Requests
    Replies: 8
    Last Post: 07-13-2009, 12:07 PM
  5. Need help with creating a account creation website for mangos!
    By Insanity in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 07-13-2008, 04:58 AM
All times are GMT -5. The time now is 10:42 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search